Coded by: Jose Antonio Rodriguez Rivera
This program simulates a System that you can control (similar to a Car). It contains a Graphical User Interface (GUI), so that it can be easy to control. All the graphics were made by code in Java.
To compile this program, use your terminal window and locate the src folder in this directory, and type:
javac CarDashSimulator.java
To run this program, type:
java CarDashSimulator
When you run the program, you will be greeted by the system window. The window contains:
-
SpeedMeter - shows the speed of the system in RPM
-
Fuel Meter/Fuel Tank - displays the current gas in the tank
-
Revolutions Counter - displays the number of revolutions in the current session
-
Wheel - the visual representation of the System
-
System Controller - a slider that you cant move to control the speed of the system
-
Add Gas button - click it to fill the gas tank
To start, you need to add gas to the tank, so you must click the Add Gas button. Now that the gas is full, you can move the slider, and the wheel will start moving. If you move the slider to the right, the speed increases; if moving to the left, the speed decreases. If the system runs out of gas, the wheel will stop moving, so keep an eye on the gas!