Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started