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