Question: Computer Science II - function assignment #6 This is an example of using default parameters. The function will accept up to 2 parameters and calculate

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)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!