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 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.º 3
0
 public virtual void Visit(Piston piston)
 {
     Console.WriteLine("Diagnosing the piston");
 }
Exemplo n.º 4
0
 public virtual void Visit(Piston piston)
 {
     pistonCount++;
 }
Exemplo n.º 5
0
 public virtual void Visit(Piston piston)
 {
     Console.WriteLine("Diagnosing the piston");
 }
 public virtual void Visit(Piston piston)
 {
     pistonCount++;
 }