Aqua Phoenix
     >>  Lectures >>  Java 3  
 

Navigator
   
 
       
   

3.6 Homework 3 Solutions

  Student.java  
  SupportStaff.java  
  Professor.java  
  Payable.java  
  EmployeeManager.java  
  HW3.java  
Example output:

> java HW3
An employee by this name (Clementine) already exists
An employee by this name (Clementine) already exists
An employee by this name (Clementine) already exists
An employee by this name (Alice Snuffleupagus) already exists
An employee by this name (Gladys) already exists
An employee by this name (Elefante) already exists
An employee by this name (Bart) already exists
An employee by this name (Alice Snuffleupagus) already exists
An employee by this name (Gladys) already exists
An employee by this name (Elefante) already exists
An employee by this name (Cookie Monster) already exists
An employee by this name (Ernie) already exists
The University is Full
The University is Full
The University is Full

Employee Bruce Stringbean has been paid: $460.0
Employee Zoe has been paid: $900.0
Employee Little Bird has been paid: $380.0
An employee by name Papa Bear does not exist and cannot be paid
Cannot set a zero or negative hourly (0.0) wage
An employee by name Elizabeth does not exist and cannot be paid
An employee by name Lulu does not exist and cannot be paid
An employee by name Elizabeth does not exist and cannot be paid
An employee by name Lulu does not exist and cannot be paid
Employee Bruce Stringbean has been paid: $260.0
Cannot set a zero or negative hourly (0.0) wage
Employee Angry Guy has been paid: $300.0
An employee by name Rumpelstiltskin does not exist and cannot be paid
An employee by name Elizabeth does not exist and cannot be paid
An employee by name The Count von Count does not exist and cannot be paid
Employee Rubber Duckie has been paid: $220.0
Cannot set a zero or negative hourly (0.0) wage
Employee Aloysius Snuffleupagus has been paid: $131.25
Employee Placido Flamingo has been paid: $100.0
An employee by name Oscar the Grouch does not exist and cannot be paid
An employee by name Papa Bear does not exist and cannot be paid
Employee Angry Guy has been paid: $15.0
Employee Clementine has been paid: $200.0
Cannot set a zero or negative hourly (0.0) wage
Cannot add negative (-3.0) hours worked
An employee by name Elizabeth does not exist and cannot be paid
Employee Gladys has been paid: $30.0
Employee Bert has been paid: $380.0
Employee Alice Snuffleupagus has been paid: $90.0
An employee by name Papa Bear does not exist and cannot be paid
Employee Elefante has been paid: $132.0
An employee by name Humpty Dumpty does not exist and cannot be paid
Employee Rubber Duckie has been paid: $168.0
Employee Elefante has been paid: $640.0
An employee by name Papa Bear does not exist and cannot be paid
An employee by name Baby Bear does not exist and cannot be paid
Cannot add zero (0) hours worked
An employee by name Ernestine does not exist and cannot be paid
An employee by name Irvine does not exist and cannot be paid
Cannot set a zero or negative hourly (0.0) wage

Student Little Bird in school SEAS, year 2009, with major Computer Science
  Current hourly wage: $20.0, Total Salary: $380.0, Total Hours Worked: $19.0
Student Clementine in school SEAS, year 2009, with major Computer Science
  Current hourly wage: $10.0, Total Salary: $200.0, Total Hours Worked: $10.0
Student Cookie Monster in school SEAS, year 2009, with major Computer Science
  Current hourly wage: $0.0, Total Salary: $0.0, Total Hours Worked: $0.0
Support Staff Angry Guy in area Machine Shop NOT UNIONIZED
  Current hourly wage: $15.0, Total Salary: $315.0, Total Hours Worked: $26.0
Support Staff Sully in area Machine Shop UNIONIZED
  Current hourly wage: $0.0, Total Salary: $0.0, Total Hours Worked: $0.0
Professor Alice Snuffleupagus in Department Computer Science TENURED
  Current hourly wage: $15.0, Total Salary: $90.0, Total Hours Worked: $6.0
Student Gladys in school SEAS, year 2009, with major Computer Science
  Current hourly wage: $15.0, Total Salary: $30.0, Total Hours Worked: $2.0
Professor Athena in Department Computer Science TENURED
  Current hourly wage: $0.0, Total Salary: $0.0, Total Hours Worked: $0.0
Student Bart in school SEAS, year 2009, with major Computer Science
  Current hourly wage: $0.0, Total Salary: $0.0, Total Hours Worked: $0.0
Student Bert in school SEAS, year 2009, with major Computer Science
  Current hourly wage: $20.0, Total Salary: $380.0, Total Hours Worked: $19.0
Professor Aloysius Snuffleupagus in Department Computer Science NOT TENURED
  Current hourly wage: $6.25, Total Salary: $131.25, Total Hours Worked: $21.0
Student Elefante in school SEAS, year 2009, with major Computer Science
  Current hourly wage: $20.0, Total Salary: $772.0, Total Hours Worked: $43.0
Student Placido Flamingo in school SEAS, year 2009, with major Computer Science
  Current hourly wage: $6.25, Total Salary: $100.0, Total Hours Worked: $16.0
Student Zoe in school SEAS, year 2009, with major Computer Science
  Current hourly wage: $50.0, Total Salary: $900.0, Total Hours Worked: $18.0
Student Ernie in school SEAS, year 2009, with major Computer Science
  Current hourly wage: $0.0, Total Salary: $0.0, Total Hours Worked: $0.0
Support Staff Rubber Duckie in area Machine Shop UNIONIZED
  Current hourly wage: $12.0, Total Salary: $388.0, Total Hours Worked: $36.0
Support Staff Bruce Stringbean in area Machine Shop UNIONIZED
  Current hourly wage: $20.0, Total Salary: $720.0, Total Hours Worked: $36.0
Professor Elmo in Department Computer Science NOT TENURED
  Current hourly wage: $0.0, Total Salary: $0.0, Total Hours Worked: $0.0
Professor Brad in Department Computer Science NOT TENURED
  Current hourly wage: $15.0, Total Salary: $0.0, Total Hours Worked: $0.0
Support Staff Cinderella in area Machine Shop UNIONIZED
  Current hourly wage: $0.0, Total Salary: $0.0, Total Hours Worked: $0.0