Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

CSC110AA and CIS163AA Ch 8 – Inheritance Ch 8 Program 1 – HospitalEmployee Inheritance Please adhere to the Standards for Programming Assignments and the Java Code and Style Guidelines.

CSC110AA and CIS163AA Ch 8 – Inheritance Ch 8 Program 1 – HospitalEmployee Inheritance Please adhere to the Standards for Programming Assignments and the Java Code and Style Guidelines. Submit the following:  List of source code with comments to document  Test output listed as comments at the end of your program 1. (10 points) Implement a Doctor class based on the UML below. The Doctor class extends/inherits the HospitalEmployee class. Download the HospitalEmployee class. Doctor – specialty : String //area of expertise such as Pediatrics, Surgery, Internal Medicine + Doctor(eName:String, eNumber : int, hours : double, pay : double, special : String) //must call super class constructor + getSpecialty( ) : String + setSpecialty(special : String) : void + calculateBonus(shift : String) : double //night shift = 10%. evening shift = 5%. day shift = 0%. //Use calculateBonus(percent) method in HospitalEmployee + createLogin() : String //create and return a login. first 2 letters of name + random number between 0-9 + employee number + toString( ) : String //must call super class toString 2. (10 points) Implement a tester class called Hospital. Specifically, Hospital should do the following in this order:  Create/instantiate a HospitalEmployee object called luke that has the name Luke Skywalker, an employee number of 5432, hours worked of 40 and a payrate of $20.50.  Display the status of luke using toString.  Calculate and display luke’s bonus. He is a satisfactory employee.  Create/instantiate a Doctor object called darth with the name Darth Vader, and employee number of 9876, hours worked of 17, a payrate of $150.00. His specialty is Plastic Surgery.  Display the status of darth using toString.  Calculate and display darth’s bonus using the calculateBonus method from the Doctor class. He works the evening shift.  Create and display Darth’s login.  Display the number of HospitalEmployee objects created. Hints: Order of compilation: HospitalEmployee, Doctor, Hospital. All files should be in the same folder/package. You may change the visibility modifier of the HospitalEmployee instance variables to protected. Example output: Welcome to our Hospital ======================= Beginning state of luke : empName: Luke Skywalker empNumber: 5432 hoursWorked: 40.0 payRate: $20.50 Luke Skywalker is a satisfactory HospitalEmployee. Bonus = $300.00. Beginning state of darth : empName: Darth Vader empNumber: 9876 hoursWorked: 17.0 payRate: $150.00 specialty: Plastic Surgery Darth Vader is a Doctor and works the evening shift. Bonus = $127.50 Darth Vader’s login is: Da39876 Number of HospitalEmployees created : 2 Goodbye ©pbaker

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"