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() }; }
public virtual void Visit(Piston piston) { pistonCount++; }
public virtual void Visit(Piston piston) { Console.WriteLine("Diagnosing the piston"); }