This preview shows page 1. Sign up to view the full content.
Unformatted text preview: and a salary (a double). Provide a constructor with two parameters Public Employee(String employeeName, double currentSalary) And methods public String getName() public double getSalary() public void raiseSalary(double byPercent) These methods return the name and salary, and raise the employees salary by a certain percentage. Simple usage: Employee harry = new Employee(Hacker, Harry, 50000); Harry.raiseSalary(10); //Harry gets a 10% raise Supply an EmployeeTester class that tests all methods....
View Full Document
This note was uploaded on 11/10/2010 for the course PROGRAMMIN 2860U taught by Professor Saman during the Fall '10 term at UOIT.
- Fall '10