1. Engineering
  2. Computer Science
  3. computer science ii function assignment 6 this is an...

Question: computer science ii function assignment 6 this is an...

Question details

Computer Science II - function assignment #6 This is an example of using default parameters. The function will accept up to 2 parameters and calculate a gross pay The function header is similar to float calcGrossPay(float hours, float rate) return hours * rate if there is no rate in the function call, the pay rate defaults to $8.75 if no hours are in the function call, the hours defaults to 20 hours call the function three times to ensure the function works 1. calcGrossPay() 2. calcGrossPay(hours, rate) 3. calcGrossPay(hours) float calcGrossPay(float hours=20 float rate=8.75) { return hours * rate } float calcGrossPay(float hours=20 float rate=8.75) calcGrossPay( ) calcGrossPay(5, 3.33) calcGrossPay(5) calcGrossPay( nill, 3.33)

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution