Computers and Technology
Computers and Technology, 13.02.2020 18:33, kaleec

Which raiseSalary() method does e1.raiseSalary(10) execute? Why? What concept does this demonstrate?Traits. javapublic interface Traits{public String getName();public String getTitle();}Employee. javapublic class Employee implements Traits{private String myName;private String myTitle;protected double mySalary;private int myAge;public Employee(String name, String title, double salary, int age){myName = name;myTitle = title;mySalary = salary;myAge = age;}public String getName(){return myName;}public String getTitle(){return myTitle;}public double getSalary(){return mySalary;}public int getAge(){return myAge;}public void raiseSalary(int percent){mySalary = mySalary + percent * 0.01 * mySalary;}public void raiseSalary(int percent, int cost_of_living_adjustment){mySalary = mySalary + percent * 0.01 * mySalary + cost_of_living_adjustment * 0.01 * mySalary;}} Manager. javapublic class Manager extends Employee{private int yearsWorked;private String highestDegree;private double promotionBonus;public Manager(String name, String title, double salary, int age, int experience, String degree, double bonus){super(name, title, salary, age);yearsWorked = experience; highestDegree = degree; promotionBonus = bonus;}public int getExperience(){ return yearsWorked;}public String getDegree(){return highestDegree;}public double getBonus(){return promotionBonus;}public void raiseSalary(int percent){mySalary = mySalary + percent * 0.01 * mySalary + promotionBonus;}}Test. javapublic class Test{public static void main(String args[]){Manager m = new Manager("John Doe", "Department Head", 100000.0, 55, 30, "PhD", 5000.0);Employee e1 = new Employee("Jane Doe", "Resource Analyst", 75000.0, 40);Employee e2 = new Employee("Jim Doe", "Engineer", 85000.0, 46);System. out. println("Name : " + m. getName()); System. out. println("Title : " + m. getTitle());System. out. println("Age : " + m. getAge()); System. out. println("Years of Experience : " + m. getExperience());System. out. println("Highest Degree Earned : " + m. getDegree()); System. out. println("Salary : " + m. getSalary());System. out. println("Promotion Bonus : " + m. getBonus()); m. raiseSalary(10);System. out. println("Salary Raised!");System. out. println("New Salary : " + m. getSalary());System. out. println("n");System. out. println("Name : " + e1.getName());System. out. println("Title : " + e1.getTitle());System. out. println("Age : " + e1.getAge());System. out. println("Salary : " + e1.getSalary()); e1.raiseSalary(10);System. out. println("Salary Raised");System. out. println("New Salary : " + e1.getSalary());System. out. println("n");System. out. println("Name : " + e2.getName());System. out. println("Title : " + e2.getTitle());System. out. println("Age : " + e2.getAge());System. out. println("Salary : " + e2.getSalary()); e2.raiseSalary(10,1);System. out. println("Salary Raised");System. out. println("New Salary : " + e2.getSalary());}}

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 19:30, muffinman97
Which of the following are types of formatting you can apply to a spreadsheet? choose all that apply.
Answers: 3
image
Computers and Technology, 23.06.2019 06:20, Ab20600
Which text function capitalizes the first letter in a string of text? question 10 options: upper capital first proper
Answers: 1
image
Computers and Technology, 24.06.2019 13:30, lorelaistudent
Does anybody know how to hack into a google account? i had important information on it and it is gone now and i need getting it back.
Answers: 1
image
Computers and Technology, 24.06.2019 15:50, coralaguilar1702
Andy would like to create a bulleted list. how should he do this? andy should click on the bullet icon or select the bullet option from the menu and then type the list. andy should press the shift key and the 8 key at the beginning of each line of text. andy should type the text and then click on the bullet command. andy should press return and the bullets will automatically
Answers: 2
Do you know the correct answer?
Which raiseSalary() method does e1.raiseSalary(10) execute? Why? What concept does this demonstrate?...

Questions in other subjects: