Multiple Choice
Suppose you are developing a payroll application that computes and displays weekly paycheck amounts for various employees. As a result of the design phase, the partial Employee class below is developed. Select the method header that best completes the class, according to the method comments. public class Employee
{
Private double hourlyRate;
Private int hoursWorked;
/**
Modifies the hourly rate for this employee.
@param newHourlyRate the rate per hour earned by the employee
*/
_________________________________________
{
// method body
}
}
A) public void changeRate(double newHourlyRate)
B) public void changeRate(double newHourlyRate, int hoursWorked)
C) public double changeRate(double newHourlyRate)
D) public double changeRate(double newHourlyRate, int hoursWorked)
Correct Answer:

Verified
Correct Answer:
Verified
Q18: Given the following diagram showing class relationships:
Q19: Consider the following code snippet: public class
Q22: Consider the following code snippet: public class
Q23: You are designing a software solution for
Q25: Consider the following code snippet: public class
Q31: Before you begin designing a solution, you
Q47: Which of the following would be an
Q69: A Quiz class contains an array of
Q76: If many classes of a program depend
Q93: During the implementation phase, which of the