Shapes 1: Classes, Inheritance etc.
=================================== 

This directory contains code to illustate some aspects of using C++.

As before, in the Person example:

  - the definition of classes; 
       - and the separation of their interface from implementation, in .h and
        .cpp files, respecively.  The files here are shape.h and shape.cpp for
         the Shape class; and the corresponding files for the Circle class.
  - the definition and use of constructors

And in addition:

  - the syntax and use of inheritance, with the Circle class inheriting from 
    the Shape class.

The code in main.cpp exercises these classes, creating one object of each type,
and shows how to call a member function (draw()) on these objects.  The code 
also shows that the compiler can select the version of the draw() member 
function to use, based on the type of the object making the call.

There is an xxx...line_by_line file in the directory, with detailed explanatory 
comments, in this case on the file shape.h.

The program can be built using:

g++ main.cpp shape.cpp circle.cpp -o shapes


As we have seen, the program can then be run by entering the command:

./shapes


This Shape_1 directory also contains a main_1.cpp file, which demonstrates
that the base class draw() function is inherited by the derived class (Circle).
In other words, Circle has its own draw(), plus that inherited from Shape.

Of course you can test that this works by building and running the code, as in:

g++ main_1.cpp shape.cpp circle.cpp -o shapes

./shapes



