subject

Employees example: Abstract class and interface. The classes below describe an abstract class named EmployeePerson and two derived concrete classes, EmployeeManager and EmployeeStaff, both of which extend the EmployeePerson class. The main program creates objects of type EmployeeManager and EmployeeStaff and prints them.
1. Run the program. The program prints manager and staff data using the EmployeeManager's and EmployeeStaff's printInfo methods. Those classes override EmployeePerson's getAnnualBonus() method but simply return 0.
2. Modify the EmployeeManager and EmployeeStaff getAnnualBonus methods to return the correct bonus rather than just returning 0. A manager's bonus is 10% of the annual salary and a staff's bonus is 7.5% of the annual salary.
Current file: EmployeeMain. java
1
2
3 public static void main(String [] args)
4
5 // Create the objects
6 EmployeeManager managernew EmployeeManager (25);
7 EmployeeStaff stafflnew EmployeeStaff("Michele")
8
9 // Load data into the objects using the Person class's method
10 manager. setData("Michele", "Sales", "03-03-1975", 70000);
11 staffl. setData ("Bob", "Sales", "02-02-1980", 50000);
12
13 // Print the objects
14 manager. printInfo);
15 System. out. println("Annual bonus: " manager. getAnnualBonus)
16 staff1.printInfo);
17 System. out. println("Annual bonus: "+ staff1.getAnnualBonus))
18 }
19 }
20

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:00
Someone with this coz i don’t really know what i can choose, just pick whatever u want. homework - you need to choose a website that you like or use frequently. you must visit the website and discuss 6 different features/parts/aspects of the website that you think makes it good. (100 words)
Answers: 2
question
Computers and Technology, 22.06.2019 10:40
"it security policy enforcement and monitoring" respond to the following: describe how monitoring worker activities can increase the security within organizations. describe the rationale that managers should use to determine the degree of monitoring that the organization should conduct. explain the extent to which you believe an organization has the right to monitor user actions and traffic. determine the actions organizations can take to mitigate the potential issues associated with monitoring user actions and traffic.
Answers: 3
question
Computers and Technology, 22.06.2019 14:30
The “rule of 72” is used to approximate the time required for prices to double due to inflation. if the inflation rate is r%, then the rule of 72 estimates that prices will double in 72/r years. for instance, at an inflation rate of 6%, prices double in about 72/6 or 12 years. write a program to test the accuracy of this rule. for each interest rate from 1% to 20%, the program should display the rounded value of 72/r and the actual number of years required for prices to double at an r% inflation rate. (assume prices increase at the end of each year.)
Answers: 1
question
Computers and Technology, 23.06.2019 10:50
Your friend kayla is starting her own business and asks you whether she should set it up as a p2p network or as a client-server network. list three questions you might ask to kayla decide which network to use and how her answers to those questions would affect your recommendation.
Answers: 2
You know the right answer?
Employees example: Abstract class and interface. The classes below describe an abstract class name...
Questions
question
History, 04.11.2021 14:00
Questions on the website: 13722367