Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package assignment2;
- public class Main {
- private static double payRoll = 0;
- public static void main(String[] args) {
- Person one = new Person("Bob Bridge", "123 Main Street", "January 1, 1990");
- Employee two = new Employee("Gerald Geeg", "124 Main Street", "January 2, 1984", 19999, "September 3, 2001");
- Doctor three = new Doctor("Gregory House", "125 Main Street", "June 11, 1959", 12345, "August 11, 1995", 2000000, "Diagnostician", 2);
- Staff four = new Staff("Lisa Cuddy", "929 Rocky Road", "February 30, 1962", 98765, "November 20, 1994", "Administrator", "Management", 50.00, 46.5);
- Patient five = new Patient("Wil Smith", "9999 Nine Avenue", "July 1, 1965 ", 1111111, "September 25, 2014 ", 202);
- Person[] myStringArray = {one, two, three, four, five};
- for (int i=0; i<(myStringArray.length); i++) {
- System.out.println(myStringArray[i].toString());
- }
- payRoll = payRoll + ((four.getsalaryPerHour() * four.gethoursPerWeek() * 52) + three.getsalary());
- }
- System.out.println(payRoll);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement