package chain_project;

public class Main {

	public static void main(String[] args) {
		Unit president = new PresidentUnit();
		Unit general = new GeneralUnit();
		Unit colonel = new ColonelUnit();
		Unit pilot = new PilotUnit();
		Unit privateFC = new PrivateUnit();
		
		president.setSuccesor(general);
		general.setSuccesor(colonel);
		colonel.setSuccesor(pilot);
		pilot.setSuccesor(privateFC);
		
		Message a = new Message("giving orders", "Plan an invasion of the Moon");		
		Message b = new Message("writing reports","Get 100 pages on my desk by 1800.");		
		Message c = new Message("giving speechs","Fix everything and not make anyone angry.");		
		Message d = new Message("flying planes","Do a Loop-Dee-Loop");
		Message e = new Message("fighting","Save Private Ryan");
		Message f = new Message("getting coffee","get me coffee");
		
		president.handleRequest(a);
		president.handleRequest(b);
		president.handleRequest(c);
		president.handleRequest(d);
		president.handleRequest(e);
		president.handleRequest(f);
	}

}
