daily pastebin goal
58%
SHARE
TWEET

Untitled

a guest May 19th, 2017 34 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  * Title: WorkingStudent.java
  3.  * Abstract: This program is derived from Student.java and adds the name of the company.
  4.  * Author: Rex Keane-Stein
  5.  * ID: 8888
  6.  * Date: 4/9/2010
  7.  */
  8.  
  9. public class WorkingStudent extends Student
  10. {
  11.     private String company="NOCOMP";
  12.     private double salary=0;
  13.    
  14.     WorkingStudent(String aName, int aID, String aMajor, String aCompany, double aSalary)
  15.     {
  16.         super(aName, aID, aMajor);
  17.         company=aCompany;
  18.         salary=aSalary;    
  19.     }
  20.    
  21.     String getCompany()
  22.     {return company;}
  23.    
  24.     double getSalary()
  25.     {return salary;}
  26.    
  27.     void report() // This method is never utilized in HW6Demo.java
  28.     {
  29.         System.out.println("---------------------------------------------------");
  30.         System.out.println("Company: " + company);
  31.         System.out.println("Salary: " + salary);
  32.         System.out.println("---------------------------------------------------");
  33.     }
  34. }
RAW Paste Data
Top