Caption: : Good upfront design will save you a lot of time and frustration in the end!
Slide 2
A fundamental part of object-oriented software design is determining the classes that will contribute to the program. One way to identify potential classes is to identify the objects discussed in the program requirements. Objects are generally the nouns in a program description. Classes that represent objects should generally be given names that are singular nouns, such as Student, Dice, or Coin.
Slide 3
Here are some helpful tips:
During the design stage, classes and objects need to be identified
Examine the program requirements
Objects are generally nouns
A class represents a group of objects with similar behavior
For example, to represent products, we may need a class called Product
Strike a good balance between classes that are too general and those that are too specific
Slide 4
When designing classes, there are two pieces of information to take into consideration:
State - how an object is represented
Behavior - what an object does
The state becomes the instance variables of an object. The behavior becomes the methods. When thinking about behavior, you should think about how others might want to use the object.