Two Way Adapter Pattern Code Review

Define the Seabird Two Way Adapter Object

Code Review

Code Walkthrough

The SeabirdAdapter class (object) represents the two-way adapter class, and is the common interface between the two adapted classes (objects).

class SeabirdAdapter : Seacraft, IAircraft { public Int32 Height { get; private set; }
public void TakeOff() { while (!this.Airbourne) { this.IncreaseRevs(); } }
public Boolean Airbourne { get { return (this.Height > 50); } }
public override void IncreaseRevs() { base.IncreaseRevs();
if (this.Speed > 40) { this.Height += 100; } } }