Question: Write a function called tankVolume that computes the volume of water in the tank. The function should take exactly five input arguments in this order:

Write a function called tankVolume that computes the volume of water in the tank. The function
should take exactly five input arguments in this order: ,,,, and . It should return exactly one
return value, the volume of water in the tank. Your function should validate the input. More specifically,
check that all input values are greater than zero and that <=(+). If any of the inputs are invalid,
the function should return a value of -1. Test your function by the using the testTankVolume test stub.

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!