protected override void StartEngine(Key key) { if (!IsKeyApproved(key)) { throw new SecurityException("Invalid key"); } }
public void Start(Key key) { CheckSeat(); CheckMirrors(); if (BeforeStartEngine != null) { BeforeStartEngine(this, new EventArgs()); } StartEngine(key); }
protected override void StartEngine(Key key) { Debug.WriteLine("Hand cranking car to start"); }
protected abstract void StartEngine(Key key);
protected bool IsKeyApproved(Key key) { return key.KeySignature == keySignature; }