Question: [Use Java language ] please solve it urgently. Humble request to u guys Question 01: Implement the following UML class diagrams which include an abstract

 [Use Java language ] please solve it urgently. Humble request to

u guys Question 01: Implement the following UML class diagrams which include

[Use Java language ] please solve it urgently. Humble request to u guys

Question 01: Implement the following UML class diagrams which include an abstract class Employee, an interface TaxCalculator, and a child class Faculty. Employee > TaxCalculator +TAX PERCENT Hinta 15 - id:int name : String - age : int + yearlyIncome Tax(: double + yearlyIncome WithoutTax(: double Employee (id: int, name: String, age int) + Getters + Setters + yearlySalaryo : int //abstract + yeanyIncome() : int l'abstract Faculty - initial : String monthly Salary: int - yearlyBonus : int + Faculty (id:int, name : String, age : int, initial : String, monthly Salary: int, yearlyBonus : int) + Getters + Setters + toString : String Now write a test program that performs the following tasks: 1. Create a Faculty object with an id of 1001, name as Gareth Bale, age of 43 years, initial as GB, the monthly salary of 30000 BDT, the yearly bonus of 40000 BDT. 2. Call the toString() method of the Faculty class where yearlySalary.yearlylncome, yearlyIncome Tax, yearlyIncome Without Tax are included. In console: Faculty (initial=GB, monthlySalary=30000, yearlyBonus=40000, yearlySalary=360000, yearlyIncome=400000, yearlyIncome Tax=60000.0, yearlyIncome Without Tax=340000.0 3. Now modify the Faculty class in such a way so that objects can't be created with a negative yearly bonus. If any Faculty object is created with a negative yearly bonus, it'll throw an exception such as IllegalArgumentException with an appropriate error message like "Yearly bonus can't be negative". 4. Create another Faculty object with an id of 1002, name as lan Goodfellow, age of 46 years, initial as IGF, the monthly salary of 30000 BDT, the yearly bonus of - 40000 BDT. 5. Then catch with an appropriate error message, if any exception occurs here

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!