forked from JohannesHaering/PCM2Java4Joana
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Main.java
32 lines (21 loc) · 1 KB
/
Main.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package travelplannerpcm;
import travelplannerpcm.components.Airline;
import travelplannerpcm.components.AirlineLogger;
import travelplannerpcm.components.CreditCardCenter;
import travelplannerpcm.components.TravelAgency;
import travelplannerpcm.components.TravelPlanner;
import travelplannerpcm.components.UserInterface;
public class Main {
public static void main(String[] args) {
Airline airline = new Airline(null, new AirlineLogger() ,0, "FlyingDonkey");
TravelAgency travelAgency = new TravelAgency(airline);
airline.setCommission(travelAgency);
CreditCardCenter creditCardCenter = new CreditCardCenter(null);
UserInterface simulation = new UserInterface(null, creditCardCenter, creditCardCenter);
creditCardCenter.setConfirmation(simulation);
TravelPlanner planner = new TravelPlanner(travelAgency, airline, creditCardCenter, simulation, simulation);
creditCardCenter.setDeclassificationReceiver(planner);
simulation.setBookingSelection(planner);
planner.startScenario();
}
}