This is one of several possible projects for CSCI 1300. The following link tells how the projects are used:
Please note that these projects indicate precisely what your program should accomplish, without a precise indication of how the program works. Part of your assignment is designing the techniques of how the program works.
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.
Note: Within the program's
loop you can execute the statement
to cause the program to pause for 1000 milliseconds.