Question: using java, public class employee erences Mailings Review View Help ruses. Unless you need to edit, it's safer to stay in Protected View How to

using java, public class employee  using java, public class employee erences Mailings Review View Help ruses.
Unless you need to edit, it's safer to stay in Protected View

erences Mailings Review View Help ruses. Unless you need to edit, it's safer to stay in Protected View How to Submit Enable Editing This homework must be done in Eclipse and your java and class files uploaded to icollege. Please follow directions carefully for each part. public class Employee public int getHours() { return 40; // works 40 hours / week public double getSalary() { return 40000.0; 11 $40,000.00 / year public int getVacationDays() { return 10; // 2 weeks' paid vacation } public String getVacationForm() { // use yellow form } return "yellow"; public class Lawyer extends Employee { public int getVacationDays() { return super.getVacationDays() + 5; public String getVacationForm() { return "pink"; public void sue() { System.out.println("I'll see you in court!"); Given Employee class and Lawyer class above a. Implement a class Programmer, that extends Employee to accompany other employees. Programmers make $30,000 more than default employees, get 5 days vacation, and have an additional method named "code" that prints "Coding!." Use "super" keyword to interact with when needed. "getVacationForm" method should return "grey". b. Implement a class Senior Programmer, that extends Programmer to accompany other employees. Senior programmers are like normal programmers, but they make 30% more money than a normal programmer, get 5 days more vacation, and have to fill out four of programmer's forms to go on vacation. That is, "get Vacation Form" method should return "greygreygreygrey". (If normal Programmer vacation form ever changed, Senior Programmer version should change too without need to explicitly modify the code (use"super"). .. c. Implement a client class called Employee Main that creates objects of Programmer and Senior Programmer class in main method. Implement a method called "printEmployee()", that takes an object of Employee as a parameter and prints out salary, hour, vacation days and vacation form for employee. Also call "code()" method if you are printing a Programmer object. Call "printEmployee()"method from main method. Example output for Programmer object Programmer: Salary: $70000 Hours: 40 Vacation days: 5 Vacation form: grey

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!