Question: Write in java language the declaration for the following. In a Company there are three departments HR,Finance,Sales. Each department has employees, the employees can be
Write in java language the declaration for the following.
In a Company there are three departments HR,Finance,Sales. Each department has employees, the employees can be full-time or part-time.
Class company, Fields : Nameof the comapny , Location.
Class HR, Fields : any 2 Fields.
Class Finance, Fields : any 3 fields
Class Sales, Fields : any 2 fields
Class employee, Fields : tName,Id,Age.
Class Full-time_Employee , Fields : any fields of your choice
Class Part-time _Employee, Fields: any fields of your choice
Class StaffMembers , Fields: staffID.
a. Define all the given classes and Draw an inheritance relationship between the classes.
b. The Company class should have a list of staff members, use ArrayList
c. Declare a method display() in the company class and override the display() method in all subclasses.
d. In class Finance, show how the call to a base class contrcutor is made.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
