Avaj Launcher: Enter The Java Path
Avaj Launcher: Enter The Java Path
Alex [email protected]
42 Staff [email protected]
II Introduction 3
III Goals 5
IV General instructions 7
V Mandatory part 8
V.1 Program behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
V.2 Scenario file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
V.3 Weather generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
V.4 Aircrafts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
V.5 Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
V.6 Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
VI Bonus part 11
1
Chapter I
Forewords
2
Chapter II
Introduction
This is the first project in a series of 4 projects with a focus on Java and the first
project created by Academy+Plus. We are the counterpart of 42 located in Cluj-Napoca,
Romania, and the first implementation of the 42 program outside of France. We started
in 2014, and each year with a growing number of students that apply and also a growing
number of students we can accomodate. Feel free to pay us a visit when you feel like
traveling (Ping me if you need info about cheap flights).
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 ob-
ject oriented design patterns, all implemented in the Java language. Writing Java code
is easy since it’s very similar to C, but the real challenge is to write good OO code in Java.
Figure II.1: A sample UML diagram. It can contain many more symbols.
3
Avaj Launcher Enter the Java path
You will have to implement a minimal aircraft simulation program based on a given
UML class diagram. The Unified Modeling Language is used in software engineering
for visualizing the design of an application. It offers programmers a standardized way of
thinking about Object Oriented software, before writing any line of code.
Thinking in Java
4
Chapter III
Goals
Frankfurt airport recently discovered that due to frequent weather changes they have a
bottleneck on some of the landing tracks. In order to find a solution, they first need to
know which scenarios create the worst bottlenecks. So they decided to use a simulator
where they configure and analyze multiple scenarios and hope that this will highlight
them were the real problem is.
So they reach out to their local top software shop and assign them this task. Here
the chief designer starts working on the concept and after analysing all the facets of the
software, he makes some design decisions which, he then passes on to you in order to
create the simulator.
Since the software will run on a multitude of operating systems in a very strict enter-
prise environement, he decides to use a classic Object-Oriented language: Java.
Object Oriented Design and design patterns are topics that cover by themselves thou-
sands of pages, so feel free to explore this domain and you will discover a new way of
thinking about software engineering. And who knows? Maybe you will take that archi-
tects place one day.
Only a good implementation will be accepted, since this is the top software shop in the
city. For this to happen, it will have a clean design, will be easy to read and understand
by your peers and will be easy to change in case the requirements are modified.
5
Avaj Launcher Enter the Java path
Gang of Four
6
Chapter IV
General instructions
7
Chapter V
Mandatory part
You need to implement an aircraft simulation program based on the class diagram pro-
vided to you. All classes are required to be implemented respecting every detail provided
in the diagram. Feel free to add more classes or include additional attributes if you think
it is necessary, but do not change access modifiers or the class hierarchy for the classes
provided in the diagram.
8
Avaj Launcher Enter the Java path
• RAIN
• FOG
• SUN
• SNOW
Each 3 dimensional point has its own weather. Feel free to use whatever generation
algorithm you want, as long as it takes into account the point’s coordinates.
V.4 Aircrafts
• JetPlane:
• Helicopter:
• Baloon:
9
Avaj Launcher Enter the Java path
V.5 Simulation
• Coordinates are positive numbers.
• The height is in the 0-100 range.
• If an aircraft needs to pass the upper limit height it remains at 100.
• Each time an aircraft is created, it receives a unique ID. There can’t be 2 aircrafts
with the same ID.
• If an aircraft reaches height 0 or needs to go below it, the aircraft lands, unregisters
from the weather tower and logs its current coordinates.
• When a weather change occurs, each aircraft type needs to log a message, as seen in
the example. The message format is: TYPE#NAME(UNIQUE_ID): SPECIFIC_MESSAGE.
A funny message will be appreciated during the correction.
• Each time an aircraft registers or unregisters to/from the weather tower, a message
will be logged.
V.6 Validation
The input file needs to be validated. Any abnormal behaviour due to invalid input data
is not acceptable. If the input file data is not correct the program stops execution. Any
error messages will be printed to the standard output.
10
Chapter VI
Bonus part
• You create your own custom exceptions for treating abnormal behaviour.
• Your program can read the input file contents when they are encrypted in MD5.
11
Chapter VII
Turn your work in using your GiT repository, as usual. Only work present on your
repository will be graded in defense.
12