subject
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());}}

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 21:40
Develop a function to create a document in the mongodb database “city” in the collection “inspections.” be sure it can handle error conditions gracefully. a. input -> argument to function will be set of key/value pairs in the data type acceptable to the mongodb driver insert api call b. return -> true if successful insert else false (require a screenshot)
Answers: 2
question
Computers and Technology, 22.06.2019 23:30
Define a function printfeetinchshort, with int parameters numfeet and numinches, that prints using ' and " shorthand. ex: printfeetinchshort(5, 8) prints: 5' 8"
Answers: 1
question
Computers and Technology, 23.06.2019 18:30
How often does colleges update the cost of attendance on their website? . a)every two years b) every four years c) every year d) every semester
Answers: 1
question
Computers and Technology, 23.06.2019 22:50
An environmental protection agency study of 12 automobiles revealed a correlation of 0.47 between engine size and emissions. at 0.01 significance level, can we conclude that there is a positive association between the variables? what is the p value? interpret.
Answers: 2
You know the right answer?
Which raiseSalary() method does e1.raiseSalary(10) execute? Why? What concept does this demonstrate?...
Questions
question
Mathematics, 21.06.2020 05:57
Questions on the website: 13722361