Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

java Java the files have to be separate employee.Java part_time.java full_time.java employeedemo.java 1. An Employee class maintains the information for a number of employees. The

java
Java the files have to be separate employee.Java
part_time.java full_time.java employeedemo.java
image text in transcribed
1. An Employee class maintains the information for a number of employees. The data describing each employee consists of name, age, and weekly_income. The constructor method should accept the name and age as parameters. Methods should be provided to get and set both name and age. There are two types of employees: Part_time and Full_time. Part_time Employee's weekly_income = num_hrs x rate_hr. Make num_hrs and rate_hr as members of the class Part_time. Implement both get_wk_income and set_wk_income methods. Full_time Employee's weekly income = num_yrs_services x factor where factor is 1000. Make num_ yrs services and factor as members of the class Full_time and declare factor as a constant integer. Implement both get wk_income and set wk income methods. Set up classes Employee, Part_time and Full_time with maximum use of inheritance. Implement class EmployeeDemo to test your program (get: read set: write). (14\%)

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

Building The Data Lakehouse

Authors: Bill Inmon ,Mary Levins ,Ranjeet Srivastava

1st Edition

1634629663, 978-1634629669

More Books

Students also viewed these Databases questions

Question

Choosing Your Topic Researching the Topic

Answered: 1 week ago

Question

The Power of Public Speaking Clarifying the

Answered: 1 week ago