Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Files Navigator File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help Projects X > Assignment1 > BarChart > CircleArea >

image text in transcribedimage text in transcribed

Files Navigator File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help Projects X > Assignment1 > BarChart > CircleArea > ComputerAssisted Instruction > Date > DiceRolling1 Employee Source Packages employee Employee.java > > Libraries Test Packages >> Test Libraries employee1 Source Packages employee1 BasePlusCommission Employee.java Commission Employee.java Date.java Employee1.java HourlyEmployee.java PayrollSystemTest.java Salaried Employee.java > Test Packages > Libraries >> Test Libraries > Multiple > OddIntergers > Part2 > Part3 Part4 Part5 > > > PayrollModification > Rectangle > SalaryCalculator1 > SalaryCalculator2 >Salary Calculator Assignment > VariableLength Type here to search O ...va Source 6 7 8 9 10 11 13 14 15 16 17 18 8 29 DD D 705.0/1.388MB o I Salaried Employee.java X History // Figure 10.9: PayrollsystemTest.java // Employee hierarchy test program public class PayrollSystemTest { HourlyEmployee.java X 87284 PD public static void main(String[] args) { employee1 - Apache NetBeans IDE 13 Commission Employee.java X BasePlusCommission Employee.java X PayrollSystem Test.java X || int current Month = Calendar.getInstance().get (Calendar. MONTH) + 1; hourlyEmployee, "earned", hourlyEmployee.earnings ()); employee 1.PayrollSystem Test > main commission Employee Output - employee1 (run) X //create subclass objects SalariedEmployee salariedEmployee = new SalariedEmployee ("John", "Smith", "111-11-1111", 800.00, new Date (04, 14, 1999)); HourlyEmployee hourlyEmployee = new HourlyEmployee ("Karen", "Price", "222-22-2222", 16.75, 40, new Date (07, 21, 1964)); Commission Employee commission Employee = new Commission Employee ("Sue", "Jones", "333-33-3333", 10000, .06, new Date (03, 03, 1994)); BasePlus Commission Employee basePlus Commission Employee = new BasePlus Commission Employee ("Bob", "Lewis", "444-44-4444", 5000, 04, 300, new Date (11, 08, 2000)); System.out.println("Employees processed individually: "); run: BUILD SUCCESSFUL (total time: 2 seconds) System.out.printf("%ntsints: $, .2f%n%n", salariedEmployee, "earned", salariedEmployee.earnings () ); System.out.printf("%sints: $%,.2f%n%n", Q Search (Ctrl+l) Rain coming 20:108 666 I X < > E X INS Windows (CRLF) 7:51 AM 5/1/2022 Files Navigator File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help Projects X > Assignment1 > BarChart > CircleArea > ComputerAssisted Instruction > Date > DiceRolling1 Employee Source Packages employee Employee.java > Test Packages > Libraries >> Test Libraries employee1 Source Packages employee1 BasePlusCommission Employee.java Commission Employee.java Date.java Employee1.java HourlyEmployee.java PayrollSystemTest.java Salaried Employee.java > Test Packages > Libraries >> Test Libraries > Multiple > OddIntergers > Part2 > Part3 Part4 Part5 > > > PayrollModification > Rectangle > SalaryCalculator1 > SalaryCalculator2 >Salary Calculator Assignment > VariableLength Type here to search O ...va Source 64 65 66 67 SA 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 775:0/1384MB L I Salaried Employee.java X History HourlyEmployee.java X 77480 P & D } 77 end if } else { System.out.printf( }//end for employee1 - Apache NetBeans IDE 13 System.out.printf("Birthday bonus: $%,.2f%n", 100.00); System.out.printf ("earned $%,.2f%n%n", current Employee.earnings () + 100); Commission Employee.java X BasePlusCommission Employee.java X PayrollSystemTest.java X //add a $100.00 bonus to the person's payroll amount if the current month is the one in which the Employee's birthday occurs. if (current Employee.getbirthDate ().getMonth () == currentMonth) { U "earned $%,.2f%n%n", current Employee.earnings () ); }//end main } // end class PayrollsystemTest } //get type name of each object in employees array for (int j = 0; j < employees.length; j++) System.out.printf("Employee %d is a sin", j, employees [j].getClass().getName()); employee1.PayrollSystemTest main> commission Employee > Output - employee1 (run) X DD D run: BUILD SUCCESSFUL (total time: 2 seconds) Q Search (Ctrl+l) Rain coming 20:108 I 66 0 X < > T I INS Windows (CRLF) 7:57 AM 5/1/2022

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

Starting Out With Python Global Edition

Authors: Tony Gaddis

4th Edition

1292225750, 9781292225753

More Books

Students also viewed these Programming questions