Advertisement
Guest User

Untitled

a guest
Feb 26th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. public class SalaryInfo
  2. {
  3. String name, jobTitle;
  4. double salary;
  5. public SalaryInfo(String name, String jobTitle, double salary){
  6. this.name = name;
  7. this.jobTitle = jobTitle;
  8. this.salary = salary;
  9. }
  10. public String getName() { //returns the employee's name
  11. return name;
  12. }
  13. public String getJobTitle() { //returns the employee's job title
  14. return jobTitle;
  15. }
  16. public double getSalary() { //returns the employee's salary
  17. return salary;
  18. }
  19. public void updateJobTitle(String newJobTitle){ //updates the employee's job title to newTitle
  20. jobTitle.equals(newJobTitle);
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement