Draw Uml Diagram Project Details Matter Lab Consists Following Files Hospitaljava Driver Q37234049

a.   Draw the UML Diagram for the project;details matter!

This lab consists of the following files:

  1. Hospital.java (driver)
  2. HospitalEmployee.java (super class)
  3. Doctor.java (subclass of HospitalEmployee)
  4. Nurse.java (subclass of HospitalEmployee)

// Doctor

public class Doctor extends HospitalEmployee
{
protected String specialty;
protected String insurer;
protected double salary;

public Doctor (String name, String SSN, int dep, String special,String ins)
{
super (name, SSN, dep);
specialty = special;
insurer = ins;
salary = 2345.67;
}
/**
* specific to each HospitalEmployee
* @return
*/
protected void issuePayCheck() {
netPay = salary;
System.out.println(“————————————————-“);
System.out.println ( “Staff Physician”);
System.out.println(” Name: ” + getName() + “tID ” + ssn);
System.out.println(“nnAmount electronically deposited: $” +netPay);
System.out.println(“————————————————-“);
}
//—————————————————————–
// Sets this doctor’s specialty.
//—————————————————————–
public void setSpecialty (String special)
{
specialty = special;
}

//—————————————————————–
// Returns this doctor’s specialty.
//—————————————————————–
public String getSpecialty()
{
return specialty;
}

//—————————————————————–
// Sets this doctor’s

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.