Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class SalaryInfo
- {
- String name, jobTitle;
- double salary;
- public SalaryInfo(String name, String jobTitle, double salary){
- this.name = name;
- this.jobTitle = jobTitle;
- this.salary = salary;
- }
- public String getName() { //returns the employee's name
- return name;
- }
- public String getJobTitle() { //returns the employee's job title
- return jobTitle;
- }
- public double getSalary() { //returns the employee's salary
- return salary;
- }
- public void updateJobTitle(String newJobTitle){ //updates the employee's job title to newTitle
- jobTitle.equals(newJobTitle);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement