Example Code Used in This Chapter

The following code is presented in C# .NET. Code for other languages, such as VB .NET and Objective-C, are available electronically on the publisher’s website. These examples correspond to the Java code that is listed inside the chapter itself:

using System;namespace TestShape{    public class TestShape    {        public static void Main()        {            Circle circle = new Circle();            Rectangle rectangle = new Rectangle();            circle.draw();            rectangle.draw();        }    }    public abstract class Shape    {        public abstract void draw();    }    public class Circle : Shape    {        public override void draw()        {            Console.WriteLine("I ...

Get The Object-Oriented Thought Process, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.