This is a program that will calculate the the tollcost of vehicles. Fees will differ between 8 SEK and 18 SEK, where a Motorbike is tolled 8kr, and car is tolled 11kr, depending on the time of day.
Rush-hour traffic will render the highest fee 18kr. Rush-hour is between 8.00-9.00 and 16.00-17.00. The maximum fee for one day is 60 SEK. Weekends are fee-free
How to run the Program.
- Main File. #Via Terminal. 1.1 Git clone git@github.com:RenasSaid/TollCalcJava.git 1.2 Navigate to project\src 1.3 Write "javac Main.java" to compile. 1.4 Write "java Main" to run the program.
#Via IntelliJ IDE
Open cloned project via IntelliJ.
Just click on run button in the Main file, it will compile automatically and run the code.
Now you will see the tollCalculation for Vehicle Car and Vehicle Motorbike. You will also see Timestamps and total fee, when the Vehicles passes through the camera. We have put together 3 examples. The examples are in the TimeStamps.java.
TEST FILE This test file will test different outcomes of the tollCalculator.
Testfile is named "TollCalculatorTest" and is under src folder TollCalculatorTest.
To run The Testing just click the "Play button" in the right upper corner if you run an IDE like IntelliJ.