Answered step by step
Verified Expert Solution
Link Copied!

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

6. 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
1. What is the additional attribute that a FulltimeEmplloyee class can have?
2. Discuss the different types of constructor that this class can have and how will you use Super keyword?
3. 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
1. What is the additional attribute that a CasualEmployee class can have?
2. Discuss the different types of constructor that this class can have and how will you use Super keyword?
3. 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Image Databases Towards Advanced Image Retrieval

Authors: Yihong Gong

1st Edition

1461375037, 978-1461375036

More Books

Students also viewed these Databases questions