Shapes 4: run-time control of object creation 
============================================= 
                 
This example is based on that of Step 2.  What it adds is an illustration of
using run-time decisions on which objects to create, and assemble into our 
heterogeneous collection.  Here that choice is being made on the basis of 
user input.

Our main() function has been changed to allow the user the choice of which
objects to create and logically add into the collection.  We build up this  
collection of Shapes and Circles by repeatedly entering text starting with an 
's' or 'c'.  Even a single one of these characters (followed by pressing the 
Enter key) is sufficient text to create and use the corresponding shape.  
We repeat this entry at will when offered the choice: and our selection will 
add a Shape or Circle object correspondingly.  Entering any other character as 
the first character, or simply pressing the Enter key will stop the build up of
the collection.  

At that point the collection is printed out. 

(Aside: The objects use an incrementing number sequence for their co-ordinates,
and if a circle, also for their radius.  We could have used user input of these
arguments, as well as of the object type.  But for simplicity we are using the
incrementing values as shown.) 

The code here uses a few language features for the first time in this tutorial.
It is left to the reader to try to follow the logic of the code, and to look up
any features on which they wish further understanding. 


Build lines could be, for example: 

g++ -std=c++0x main.cpp shape.cpp circle.cpp -o shapes 
or 
g++ -std=c++11 main.cpp shape.cpp circle.cpp -o shapes 



