Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please help me on all of question 1 a number D) number Oradea - 3. trades - 189.0 umberor Grades S. Grades - 279.0 d

please help me on all of question 1
image text in transcribed
image text in transcribed
a number D) number Oradea - 3. trades - 189.0 umberor Grades S. Grades - 279.0 d number Oradea - 5. smotrades - 189.0 tuberotarades t rades - 279.0 10. What is printed to the screen when this code is executed? 720 6. 54.0 72.0 c. 81.0 05 d030 05 a. 540 94.5 Free Response Questions 1. Anployee object has a first name (a String), a last name (a String), and a salary (a double). An incomplete class definition is given below. public class mployee Constructa default Employee public ployee() my PirstName * myLast Name * mysalary - 45000; // Other constructor) here Returneployee's salary. return esployee's salary publie double getSalary) return y Salary Ranit Chapter Implementing Classes 45 Employee salary increased by byPercent percent. public void raiseSalary(double by Percent) // Code goes here private String myFirst Name; private String myLastName; private double mysalary: a. Write a constructor for the Employee class that has three parameters: firstName (a String), lastName (a String), and moneyEarned a double). The private instance variables should be initialized to the values of the parameters. b. Write a method raiseSalary for the Employee class. The method raiseSalary will raise the employee's salary by a given percentage passed as a parameter to the method. For example: Employee workeri - new Employee ("John", "Smith", 50000); // John Smith has salary = $50,000. workeri.raiseSalary (20); // John Smith now has salary = $60,000. Use the method header below to write raiseSalary. public void raiseSalary (double by Percent) c. Write a method calculateBonusAmount for the Employee class. The method calculateBonusAmount will calculate and return the amount of money to be given to an employee as a holiday bonus. This amount is based on the salary of the employee and the given percent passed as a parameter to the method. For example: Employee workerl - new Employee ("John", "Smith", 50000); // John Smith has salary = $50,000. System.out.println(workeri.calculate BonusAmount (3)); // 1500.0 will be printed Use the method header below to write calculateBonusAmount. public double calculateBonusAmount (double by Percent) A B l ace ie to be implemented with the following

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 10g Database Administrator Implementation And Administration

Authors: Gavin Powell, Carol McCullough Dieter

2nd Edition

1418836656, 9781418836658

More Books

Students also viewed these Databases questions

Question

Provide the correct systematic name for the compound shown here

Answered: 1 week ago

Question

Did you follow BANGPP design checklist to review the layout?

Answered: 1 week ago

Question

Explain the key areas in which service employees need training.

Answered: 1 week ago

Question

Understand the role of internal marketing and communications.

Answered: 1 week ago