previous | start | next

Classes and Problem Descriptions

Classes describe objects.

Function members describe actions or queries about properties of objects: Change your size! What is your size?

So a simple guide is classes will likely correspond to names of objects (nouns) in a problem description.

Function members of classes will correspond to actions or queries (verbs) in the problem description.

Of course, not all nouns will correspond to classes. Data members of classes will likely correspond to named properties of objects.



previous | start | next