Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Can you please help me the JAVA program? Write a class Employee with a name and salary. Make a class Manager inherit from Employee Add
Can you please help me the JAVA program?
Write a class Employee with a name and salary. Make a class Manager inherit from Employee Add an instance variable department of type String. Make a class Executive inherit from Manager. In addition to a base salary. Executives receive a bonus, which is expressed as a ratio added to their base salary. For example, if an Executive's base salary is $230,000, a he (or she) has a bonus of 0.2, the Executive's salary would be $230 000 + $230,000 * 0.2. Supply toString methods for all classes. Supply a test program that test all classes and methods. The tests should include (but not be limited to) tests such as Employee dilbert = new Employee(... System.out.println(dilbert); Employee pointyHairedBoss = new Manager(... System.out.println(pointyHairedBoss ); Employee clueless = new Executive(... System.out.println(clueless); Which toString method is called in each of these casesStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started