Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Employee {
- private String name;
- private double salary;
- /**
- * constructor
- */
- public Employee(String employeeName, double currentSalary){
- name = employeeName;
- salary = currentSalary;
- }
- public String getName(){
- return name;
- }
- public double getSalary(){
- return salary;
- }
- public void raiseSalary(double byPercent){
- salary = (salary * (byPercent / 100)) + salary;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment