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 int hoursWorked;
/**
Computes the weekly salary for this employee.
@param hourlyRate the rate per hour earned by the employee
@return the weekly salary
*/
_________________________________________
{
// method body
}
}
A) public void computeSalary(double hourlyRate)
B) public double computeSalary(double hourlyRate, int hoursWorked)
C) public double computeSalary(double hourlyRate)
D) public double computeSalary(int hoursWorked)
Correct Answer:

Verified
Correct Answer:
Verified
Q37: How does a UML diagram denote a
Q53: Which of the following questions should you
Q70: When designing classes, if you find classes
Q71: A CashRegister class contains an array list
Q73: In a UML diagram, the relationship symbol
Q74: Select a code segment to complete the
Q75: Which of the following can be used
Q78: Select a code segment to complete the
Q80: In a UML diagram, the relationship symbol
Q94: You are designing a software solution for