Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

for beginner java The code of the following classes is given in the attached sre.rar (From Java 9 for Programmers, by Paul Deitel and Harvey

for beginner java image text in transcribed
image text in transcribed
The code of the following classes is given in the attached sre.rar (From Java 9 for Programmers, by Paul Deitel and Harvey Deitel). - Payable.java is an interface that declares the getPaymentAmount method. - Employee java is an abstract class that is a subclass of Payable and has three fields. It is abstract because it does not implement getPayment.imount. - CommissionEmployee-java is a concrete class that is a subclass of Employee and adds two fields. - BaseplusComissionEmployee. Java is a concrete class that is a subclass of commissionEmployee and adds one field. - HourlyEmployee, java is a concrete class that is a subclass of Employee and adds two fields. - SalariedEmployee. java is a concrete class that is a subclass of Employee and adds one field. - Invoice. java is a concrete class that is a subclass of Payable and has four fields. - The main method in PayrollSystemTest.java uses the Employee class and its subclasses. It creates four objects, one for each subclass of Employee and then prints their payment amount. In this question, you are going to add a new class called PartTimeEmployee. java that extents from SalariedEmployee. java. The new class has an attribute, salaryPercentage, which gives the percentage of weekly salary paid to part-time employees. The new class should include the necessary constructors, getPaymentAmount and toString methods, setter and getter methods for the attribute salaryPercentage. Modify PayrollSystemTest.java to include the following two new part time employees with salary percentages 50 and 20 for testing: - new SalariedEmployee("Bill", "Gates", "222-22-2222", 2400.00, 50); - new SalariedEmployee("Tim", "Andersen", "888-88-8888", 1200.00, 20)

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

Professional IPhone And IPad Database Application Programming

Authors: Patrick Alessi

1st Edition

0470636173, 978-0470636176

More Books

Students also viewed these Databases questions

Question

1. Which position would you take?

Answered: 1 week ago