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 22:50
Which is the best minecraft server? a. mineplex b. worldonecraft c. 9b9t d. 2b2t
Answers: 2
question
Computers and Technology, 24.06.2019 15:00
Universal windows platform is designed for which windows 10 version?
Answers: 1
question
Computers and Technology, 24.06.2019 18:50
Write a program that reads in a series of lines of input character by character (using the library function the first line of the input contains an integer which specifies the number of remaining lines of input, each of which contains a floating point number. the integer value on the first line can be read with (the library function) but all of the following lines can only be read with each line, after the first, contains a single floating point value, with up to four digits before the decimal point, and up to four digits following the decimal point, but there is not necessarily a decimal point in each number; i.e., it may appear to be an integer, but the digits should be read by your program, and the number should be converted to a corresponding floating point number. for instance, suppose the following input: 5 3.1255 20.25 0.875 1921.50 31 the required output is: − each of the input floating point values, printed on a separate line with four digits of precision, using printf(); − on the last line of the output, the string “total: ” followed by the sum of the input values, printed with printf() to 4 digits of precision. for example, the total of the sample input given above is 1976.7505, so the required output for this input would be: 3.1255 20.2500 0.8750 1921.5000 31.0000 total: 1976.7505 do not concern yourself with small differences in the total due to rounding, as the grader will not deduct points for this. constraints: − you are not allowed to use arrays on this portion of the lab assignment. − there is no maximum number of lines allowable. it all depends upon the first value of input. since you aren’t saving anything, it doesn’t matter. − you can assume that input will not contain more than 4 digits before or after the decimal point. you do not need to error check for this condition. -you must use getchar() to read in the floating point values one character at a time (i.e. do not use -you must declare and use your floating point values as a double to minimize rounding errors. -only use printf() to output the floating point numbers and the total (do not use − be sure your directions to the user are clear so they are sure to enter the input data correctly.
Answers: 1
question
Computers and Technology, 25.06.2019 04:40
Ineed ! i need a computer whiz to me complete my study guide on computers, it's 50 questions. if anyone can me i'll be greatly appreciated.
Answers: 1
You know the right answer?
Which raiseSalary() method does e1.raiseSalary(10) execute? Why? What concept does this demonstrate?...
Questions
Questions on the website: 13722363