class PiePiece { public: PiePiece(int percent, Pattern* pattern); /* * Construct a piece of a PieChart (q.v.), of the given percentage of the * total pie and the given pattern. The given percent should be between 1 * and 100, inclusive. If < 1, 1 will be used. If > 100, 100 will be * used. */ int GetSize(); /* * Return the size of the piece, as a percentage between 1 and 100, * inclusive. */ protected: int percent; /* The percent of a whole pie. */ Pattern* pattern; /* The pattern to draw the piece in. */ }; class PieChart : Picture { public: PieChart(int n, int r, ...); /* * Consruct a pie chart of n pieces, radius length r. The varargs that * follow must be n args of type PiePiece. The numeric percentage of all n * pieces should total 100. If the total is < 100, a white piece will be * added to fill the remainder. If the total is > 100, only as many pieces * will be drawn as total < 100, and the last piece will be truncated in * size, if necessary, to fill the remainder, if any. */ };