package com.fifino.patterns.visitor;

/**
 * Created by porfiriopartida on 2/22/16.
 */
public class Main {
    public static void main(String[] args){
        Engine engine = new Engine();
        Wheels wheels = new Wheels();
        Radiator radiator = new Radiator();

        Visitor mechanic = new Mechanic();
        Visitor owner = new Owner();


        //Testing owner as a visitor
        engine.accept(owner);
        wheels.accept(owner);
        wheels.accept(owner);
        radiator.accept(owner);

        //Testing mechanic as a visitor
        engine.accept(mechanic);

        wheels.accept(mechanic);
        wheels.accept(mechanic);

        radiator.accept(mechanic);
        radiator.accept(mechanic);
    }
}
