LuigiEnzoFerrari / Java-path

In order to create great software, one doesn’t only write code, one needs to design it first. This project will introduce to you the concept of UML class diagrams and object oriented design patterns, all implemented in the Java language.
0 stars 0 forks source link

Make the simulation #7

Closed LuigiEnzoFerrari closed 4 months ago

LuigiEnzoFerrari commented 4 months ago

Output example:

$java ro.academyplus.avaj.simulator.Simulator scenario.txt $cat -e simulation.txt Tower says: Baloon#B1(1) registered to weather tower. Tower says: JetPlane#J1(2) registered to weather tower. Tower says: Helicopter#H1(3) registered to weather tower. Tower says: Helicopter#H4(4) registered to weather tower. Baloon#B1(1): Let's enjoy the good weather and take some pics. JetPlane#J1(2): It's raining. Better watch out for lightings. Helicopter#H1(3): This is hot. Helicopter#H4(4): My rotor is going to freeze! Baloon#B1(1): Damn you rain! You messed up my baloon. JetPlane#J1(2): OMG! Winter is coming! Helicopter#H1(3): This is hot. Helicopter#H4(4): My rotor is going to freeze! Baloon#B1(1): It's snowing. We're gonna crash. JetPlane#J1(2): It's raining. Better watch out for lightings. Helicopter#H1(3): This is hot. Helicopter#H4(4): My rotor is going to freeze! Baloon#B1(1): Damn you rain! You messed up my baloon. Baloon#B1(1) landing. Tower says: Baloon#B1(1) unregistered from weather tower. JetPlane#J1(2): OMG! Winter is coming! Helicopter#H1(3): This is hot. Helicopter#H4(4): My rotor is going to freeze!

LuigiEnzoFerrari commented 4 months ago

Scenario file

The first line of the file contains a positive integer number. This number represents the number of times the simulation is run. In our case, this will be the number of times a weather change is triggered. Each following line describes an aircraft that will be part of the simulation, with this format: TYPE NAME LONGITUDE LATITUDE HEIGHT

Weather generation

There are 4 types of weather:

Aircrafts

Simulation