Beispiel #1
0
        private static void Main(string[] args)
        {
            Hole       hole       = new Hole(10);
            RoundThing roundThing = new RoundThing {
                Radius = 8
            };
            SquareThing squareThing = new SquareThing(10);

            hole.Fits(roundThing);
            hole.Fits(new SquareThingAdapter(squareThing));

            Console.ReadKey();
        }
Beispiel #2
0
 public void Fits(RoundThing roundThing)
 {
     Console.WriteLine(_radius > roundThing.Radius ? "It FITS!!" : "It does not fit!");
 }