Added Virtual Friend Function Idiom

Now using operator<< to print shapes to the console.

See http://www.parashift.com/c++-faq/virtual-friend-fns.html for more
details.