I am having a terribly hard time getting this to work.
The system consists of a tank of water with a filling line that allows water to flow into the tank and a dumping line that removes water from the tank. The water level in the tank must always be maintained between the low water danger level and the high water danger level. If the level of water in the tank exceeds the high water level, the dumping line begins emptying the tank until it falls below the high water level. If the level of water in the tank falls below the low water level, the filling line begins filling the tank until the water level reaches the safe zone. You must create a program that allows the tank operator to see the status of the tank and active the filling and dumping pumps manually, or switch the system to automatic leveling mode. The user must also be able to switch the flow rate of the filling and dumping lines between several predefined rates. The following is just a sample interface, you can be creative. Note that this is just a simulation; you just need to decide on what capacity tank you have and what capacity indicates low and high level the visual does not have to be scaled to adjust to the calculation and the rate of flow.
Make appropriate use of classes and methods to simplify the design and support the abstraction of the various data objects and operations. Do not create many classes in one file. Try to have a separate file for each class.
You MUST put the required comment information at the beginning of every class you write and use appropriate comments throughout the code to explain general functionality.
User Interface Requirements:
A single JFrame must be used for the application
The high level or low level indicator lights should change to red color when the water level in the tank is not within required levels
Upon exiting the application, it must save the state of the application to an output file of a specified format.
Upon starting the application, it must load the previously saved state from a file.
The system shall monitor the level of water within the virtual water tank.
Upon the tank water level hitting a critical level, the system shall notify the user of the situation.
The system shall allow for automatic level control of the water tanks filling and dumping operations (open for interpretation).
The system shall allow for manual filling and dumping of the water in the virtual tank.
The system shall allow for the water to be filled or dumped at various predefined flow rates.