// Yazzy Latif // TA: Grace Hopper // CSE 142 // Prints out some information about the Employee, Server, Chef, and HeadChef classes to // demonstrate the mechanics of inheritance and polymorphism. import java.util.*; public class EmployeeClient { public static void main(String[] args) { Employee pam = new Employee(); System.out.println("Employee:"); printInfo(pam); Server dwight = new Server(); System.out.println("Server:"); printInfo(dwight); System.out.println(" Tip: " + dwight.collectTips(3.00)); Chef sanji = new Chef(); System.out.println("Chef:"); printInfo(sanji); HeadChef drake = new HeadChef(); System.out.println("HeadChef:"); printInfo(drake); System.out.println(" Specials: " + Arrays.toString(drake.getSpecials())); } // Prints out hours, pay, and vacation days information about the given Employee // Employee worker: the Employee whose information is printed public static void printInfo(Employee worker) { System.out.println(" Works " + worker.getHours() + " hours"); System.out.printf(" Earns $%.2f per hour\n", worker.getHourlyRate()); System.out.println(" Gets " + worker.getVacationDays() + " vacation days"); } }