CSCI 1300
Project: Emptying a Tank

This is one of several possible projects for CSCI 1300. The following link tells how the projects are used:


What the Program Should Do

Write a program which draws a side view of a large cylindrical fuel tank on the graphics screen. The tank has a small valve on the side, which is initially shut. The input to the program (from the keyboard) consists of three numbers: The height and diameter of the tank (in feet) and the diameter of the nozzle (in inches). After reading the diameter of the nozzle, the program should convert this number to feet (so that all measurements are stored using feet as the unit).

The program should allow the user to click the right mouse button to open the valve (and the tank starts draining), or click the left mouse button to close the value. While the tank is emptying, the graphical display should show a representation of how high the full is using some appropriate scale.

Use these equations to figure out how fast the tank drains:

The program uses multiplicative factors of 60 and 8.02. Declare these as constants in your program.

NOTES:

Estimated Difficulty Level for First Semester Students:


On a scale of 50 (easy) to 500 (hard): 200