![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 24.11.2021 08:50 bandiadummy8595
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](/tpl/images/cats/User.png)
Answers: 1
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 21.06.2019 22:50
Explain why it is reasonable to assume that receiving 3 duplicate acks in tcp is an indication that the network is not currently congested.
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 00:00
Ahorse is how much percent more powerful than a pony
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 02:00
Alocal reaction will occur at the site of the exposure such as irritation or damage to the skin eye or local reaction will occur at the site of the exposure such as irritation or damage to the skin ireland lounges
Answers: 3
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 10:30
You have a large, late-model pick-up truck with a rear seat. the pick-up truck weighs 6,500 pounds. the florida seat belt law
Answers: 1
You know the right answer?
Employees example: Abstract class and interface.
The classes below describe an abstract class name...
Questions
![question](/tpl/images/cats/mat.png)
Mathematics, 14.01.2021 21:40
![question](/tpl/images/cats/mat.png)
Mathematics, 14.01.2021 21:40
![question](/tpl/images/cats/mat.png)
Mathematics, 14.01.2021 21:40
![question](/tpl/images/cats/mat.png)
Mathematics, 14.01.2021 21:40
![question](/tpl/images/cats/mat.png)
Mathematics, 14.01.2021 21:40
![question](/tpl/images/cats/biologiya.png)
Biology, 14.01.2021 21:40
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/obshestvoznanie.png)
Social Studies, 14.01.2021 21:40
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 14.01.2021 21:40
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 14.01.2021 21:40
![question](/tpl/images/cats/ap.png)
Advanced Placement (AP), 14.01.2021 21:40
![question](/tpl/images/cats/mat.png)
Mathematics, 14.01.2021 21:40
![question](/tpl/images/cats/pravo.png)
![question](/tpl/images/cats/obshestvoznanie.png)
Social Studies, 14.01.2021 21:40
![question](/tpl/images/cats/mat.png)
Mathematics, 14.01.2021 21:40
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 14.01.2021 21:40