Question: Implement a class Employee. An employee has a name (a string) and a salary (a dou ble). Provide a constructor with two arguments: public Employee
Implement a class Employee. An employee has a name (a string) and a salary (a dou ble).
Provide a constructor with two arguments:

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 employee's salary by a certain percentage. Sample usage: Employee harry = new Employee ("Hacker, Harry", 50000); harry. raiseSalary(10); // Harry gets a 10 percent raise Supply an EmployeeTester class that tests all methods.
Step by Step Solution
3.39 Rating (155 Votes )
There are 3 Steps involved in it
To implement the Employee class with the specifications provided in the image you should follow thes... View full answer
Get step-by-step solutions from verified subject matter experts
