Question: 6 . What a toString ( ) method will display in this class? Open Eclipse, and develop this class on the basis of information you
What a toString method will display in this class?
Open Eclipse, and develop this class on the basis of information you have written in answers above.
FulltimeEmployee Class
Consider FulltimeEmployee class as a sub class of Employee
What is the additional attribute that a FulltimeEmplloyee class can have?
Discuss the different types of constructor that this class can have and how will you use Super keyword?
Write getter and setter for additional attributes and override the toString method of Employee class which will display the all details of that particular FulltimeEmployee.
CasualEmployee Class
Consider CasualEmployee class as a sub class of Employee
What is the additional attribute that a CasualEmployee class can have?
Discuss the different types of constructor that this class can have and how will you use Super keyword?
Write getter and setter for additional attributes and override the toString method of Employee class which will display the all details of that particular CasualEmployee.
Create a test class and test all classes by creating their objects and by calling their toString method.
Create a rough class diagram for above scenario.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
