Case Study: Drawing Shapes with Turtle Graphics
Graphics programming is a very satisfying activity, because you get immediate visual feedback. Most introductory C++ books don't do graphics for the simple reason that there are no standard graphics calls, unlike with Java. However, the principles are usually the same. Doing some graphics is (a) enjoyable and (b) better than doing no graphics at all.
This case study shows how structures can be used to store information about shapes, and how then these shape objects can be drawn using turtle graphics in more detail. At the end, there is some more advanced but optional material.
The Specification
You need to write a program that takes a file describing shapes and draws the shapes on a window. Initially, ...
Get C++ By Example: UnderC Learning 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.