HOMEWORK 4
CS332
1) Study Chapter 6 of the textbook (ALL).
2)
Finish
up Chapter 13 ( Note: ALL the material of this
chapter will be covered in the midterm test )
3)
Write
an interface representing a Developer: it will include public methods returning
whether or not he/she is currently employed, his/her name, if he/she is a Java
or VB programmer, number of years of experience, and the public method
void
writeCode()
; then write 2 implementations of Developer, VBDeveloper
and JavaDeveloper.
The two
implementation will differ only in the writeCode() method: when writeCode() is called on a VBDeveloper, it says:
”VB is
pretty easy”. When it is called on a JavaDeveloper, it says: “hey, java is not
so bad!”.
Finally, write a Factory class for Developer, with a
method Developer createDeveloper(boolean switch):
if switch is true, the developer is actually a VBDeveloper,
else he/she is a JavaDeveloper.
Write a test driver for this HW.
Zip the entire source code and send it to
cs332@cs.gmu.edu