Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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. All the Methods in the comapny class should be declared as protected.

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

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

Students also viewed these Databases questions

Question

Identify conflict triggers in yourself and others

Answered: 1 week ago