Exemplo n.º 1
0
        public AbstractEngine(int size, bool turbo)
        {
            this.size  = size;
            this.turbo = turbo;

            // Create a camshaft, piston and 4 spark plugs...
            camshaft   = new Camshaft();
            piston     = new Piston();
            sparkPlugs = new SparkPlug[]
            {
                new SparkPlug(), new SparkPlug(),
                new SparkPlug(), new SparkPlug()
            };
        }
Exemplo n.º 2
0
 public virtual void Visit(Camshaft camshaft)
 {
     Console.WriteLine("Diagnosing the camshaft");
 }
 public virtual void Visit(Camshaft camshaft)
 {
     camshaftCount++;
 }