[Cs3] CS3 Lab 4

Mikhail Nesterenko mikhail at cs.kent.edu
Thu Feb 13 22:34:01 EST 2014


> I'm not sure what to do when changing the origin. I understand what you did
> in the example, but in our projects we don't know what the shape is to make
> a new shape. How do I make the function that changes the origin, and how do
> I put it in the main?

You do not put it in the main(). You create a function in your base
class that takes origin parameters (X,Y) and updates it. Then the
template method may invoke the (overridden) draw() function that draws
the specific figure.

thanks,
--
Mikhail


More information about the cs3 mailing list