The Avaj Launcher project is an introduction to the Java world, developed as part of the curriculum at 42. This project focuses on building a simulation of an aviation scenario, where different aircraft interact with each other and with weather conditions.
- Java 17 - Programming language used
- IntelliJ IDEA - IDE used
- Maven - Dependency manager
To run the project using maven, run the following command in the root directory of the project:
mvn clean package
This will generate a target
directory in the root directory of the project, which will contain the compiled classes and the jar file.
To run the project, run the following command in the root directory of the project:
java -jar target/avaj-launcher-1.0-SNAPSHOT.jar scenario.txt
To run the project using the command line, run the following commands in the root directory of the project:
find * -name "*.java" > sources.txt
javac @sources.txt
java -cp ./src/main/java org.launcher.Avaj scenario.txt
The main objectives of the Avaj Launcher project are as follows:
- Gain familiarity with Java programming language.
- Understand object-oriented programming concepts.
- Implement a simulation using classes and interfaces.
- Handle file I/O operations.
- Generate and handle random weather conditions.
- Simulate aircraft behavior based on weather and user-defined scenarios.
- Validate the correctness of the simulation.
The mandatory part of the project includes the following components:
- Read a scenario file containing instructions for the simulation.
- Generate weather conditions randomly.
- Create and simulate multiple aircraft based on the scenario and weather conditions.
- Write the output of the simulation to an output file.
The scenario file is a text file that contains instructions for the simulation. It defines the number of times the simulation should run and specifies the initial state of the aircraft.
This program generate weather conditions randomly using the timestamp of the sistem. The weather can be one of the following: SUN, RAIN, FOG, or SNOW.
This program simulate different types of aircraft, each with its own behavior and characteristics. The aircraft types include Helicopter, JetPlane, and Balloon.
Uml diagram is a visual representation of the classes and their relationships in the project. this project's UML diagram is as follows:
If you have any questions, suggestions, or critiques, please contact me using email or through LinkedIn.