Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. Max Method: Write and test a method that returns the value of the largest of 3 integers, x, y, z (or returns any
1. Max Method: Write and test a method that returns the value of the largest of 3 integers, x, y, z (or returns any one, if they are equal). Do not use any methods of the Math class. public static int max(int n1, int n2, int n3) { } 2. Calculate Pay Method: This returns the pay a person would receive based on the parameters hours, rate and holiday hours. For 40 hours or below, you earn 1 times the rate. Hours above 40 are paid at 1.5 times the rate. Holiday hours are paid at 2 times the rate. Holiday hours are subtracted from normal hours before the normal 40 hours are paid. { } Ex if hours = 50, rate = 5, hHours = 3, pay = 40*5 + 7*5*1.5 + 3*5*2 Ex if hours = 100, rate = 10, hHours = 20, pay = (40*10) + 40*10*1.5 + 20*10*2 public static double calculate Pay(double hours, double rate, double hHours)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started