Answer to Question #242464 in Java | JSP | JSF for Hamza

Question #242464

3. A method to calculate overtime pay. This method should be called from calculatePay if and when

required.

public static double calculateOverTimePay(int OverTimeHours, double

basePay)


4. A method to display information

public static void displayInfo(String empName, int workingHours, double

totalPay)


1
Expert's answer
2021-09-26T11:42:21-0400
/**
	 * A method to calculate overtime pay. This method should be called from calculatePay if and when required.
	 * @param OverTimeHours
	 * @param basePay
	 * @return
	 */
	public static double calculateOverTimePay(int OverTimeHours, double basePay) {
		return 40 * basePay + ((OverTimeHours) * basePay) * 1.5;
	}
	
	/***
	 * A method to display information
	 * @param empName
	 * @param workingHours
	 * @param totalPay
	 */
	public static void displayInfo(String empName, int workingHours, double totalPay) {
		System.out.println("Employee Name: " + empName);
		System.out.println("Employee working hour: " + workingHours);
		System.out.println("Employee total pay: " + totalPay);
	}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS