Class Inheritance with abstract class Define a class Employee with the following fields: _name, _empId, _department, _position (_title), _yearlySalary, _fullTime (a boolean: true/false) , _month , _year (time of hire) Add constructor and properties Define an abstract method GetBiMonthlySalary() (if the employee is paid twice a month) Define an abstract method GetVacationTime() that returns the number of vacation time this employee would have based on time of hire Override the ToString() method to return a string that contains the information pertaining to an employee such as: name, empId, department, and where full time or not.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Class Inheritance with abstract class

 

Define a class Employee with the following fields: _name, _empId, _department, _position (_title), _yearlySalary, _fullTime (a boolean: true/false) , _month , _year (time of hire)

 

Add constructor and properties

 

Define an abstract method GetBiMonthlySalary() (if the employee is paid twice a month)

 

Define an abstract method GetVacationTime() that returns the number of vacation time this employee would have based on time of hire

 

 

Override the ToString() method to return a string that contains the information pertaining to an employee such as: name, empId, department, and where full time or not.

 

 

Define a class HourlyEmployee that inherits from Employee.

This class should have 2 fields of its own: _hours (hours worked in half a month) and _wage (hourly wage)

Provide necessary constructor, properties and methods

 

Override the ToString() to also return the additional fields

 

Gets 3 days of vacation after first year if the employee works at least 40 hours a month.

Vacation time does not increase after that

 

Define a class SeasonalEmployee that also inherits from Employee

This is a temporary employee, who is paid on hourly basis. Make it part of the Employee class

family, by inheriting one of the above classes.

 

This class should have an additional field: _contractDuration (in month)

 

Provide necessary constructor, properties and methods

 

Gets no vacation time.

 

Also override the ToString() method

 

 

Define a class RegularEmployee (gets a yearly salary)

Provide necessary constructor, propereties and method

Rule for Vacation time: one week after first year for the next 5 years of work. Earn an extra day each year after that. After 20 years of work vacation time stays constant

 

 

 

In Form1:

Create a List of Employees

Define a method preloadEmployeeList with at least 2 employees of each type

Define a method displayEmployeeList (name, empid, bimonthsalary,vacation accrued) to a JTable

Define a method DisplayEmployeeList2. To display to a JTextArea the data returned by ToString() method.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 5 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY