Employee - idnum = id public double getannsalary return(annsalary public int gethiredate return(hiredate public String getidnum return(idnum public

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
//Matt Hergenrether //CS 2133 //February 25, 2009 public class Employee extends Person { //declares variables public double annsalary; public int hiredate; public String idnum; public double raise = 1000; public Employee() { annsalary = 0; hiredate = 0; idnum = "No id number yet"; } //constructor: initiates variables and calls on the class person public Employee(double salary, int yearhired, String id, String initialName) { super(initialName); annsalary = salary; hiredate = yearhired;
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: idnum = id; } public double getannsalary() { return(annsalary); } public int gethiredate() { return(hiredate); } public String getidnum() { return(idnum); } public void writeOutput2() { System.out.println("Identification Number: " + idnum); System.out.println("Date Hired: " + hiredate); System.out.println("Annual Salary: " + annsalary); } //allows user to modify salary public void setSalary(double newSalary) { annsalary = newSalary; } }...
View Full Document

This note was uploaded on 09/28/2011 for the course CS 2133 taught by Professor Rao during the Fall '10 term at Oklahoma State.

Page1 / 2

Employee - idnum = id public double getannsalary return(annsalary public int gethiredate return(hiredate public String getidnum return(idnum public

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online