The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 3 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
The overall question is in the assignment, but I would like detailed comments off to the side, so I can understand what is going on.Â
Â
Salaries for a buisnessYou are assigned the task of creating a program for your boss that will help him keep track of hisemployee’s salaries and ensure that an employee is not entering their salary twice.There are two typesof employee’s full time and part time.Implement a superclass named Employee that contains a salary instance variable, a getSalary method,and a 1-parameter constructor. The getSalary method is a simple accessor method that returns the salaryinstance variable’s value. The 1-parameter constructor receives a weeklywage parameter and assigns avalue to the salary instance variable based on this formula:salary = weeklywage * 52;Implement two classes named FullTime and PartTime; they are both derived from the Employeesuperclass. FullTime should contain a fullhours instance variable (the employees hours per week).PartTime should contain a parthours instance variable (the employees hours per week). The FullTime andPartTime classes should each contain a 2-parameter constructor, an equals method, and a displaymethod. In the interest of elegance and maintainability, don’t forget to have your subclass constructorscall your superclass constructors when appropriate. The display method should print the values of all theinstance variables within its class.Provide a driver class that tests your three employee classes. Your driver class should contain this mainmethod:public static void main(String[] args){FullTime FullT1 = new FullTime(3000.00, 50);FullTime FullT2 = new FullTime(3000.00, 50);if (FullT1.equals(FullT2)){FullT1.display();}PartTime PartT1 = new PartTime(1500.00, 20);PartTime PartT2 = new PartTime(1500.00, 20);if (PartT1.equals(PartT2))
Attachments: