I need Help in Java..,
January 25, 2010 at 12:55 PM
i'm a new student, and i learn java. I need your help how to do this question. please help me, and i hope you can reply this at my email. zam8585@yahoo.com
Question: Create a class named Employee with name and salary. Make a class Manager inherit from Employee with an instance field named department. Supply a method to String() that prints the manager’s name, department and salary. Make another class named Director which inherits from Manager that has an instance field name carAllowanceAmount. Supply the toString() method for Director that prints all of its instance variables. Also, write a program name TestQ3 that instantiates an object of each of these classes and invokes the String() method of each of these object. (Note: all instance variable must be assigned with private accessibility and methods with public accessibility)
View All Comments
| View Tutorial