Monday, May 16, 2011

Metaphors for Classes and Objects

Recipes in cooking

A cupcake recipe contains instruction on how to make a cupcake. The basic ingerdentis for making a cupcake are the like the constants in a class. The variables are the things such as the different toppings and decorations you can place on them

Patterns for making clothes

The sewing insturction are like the constant in the class and different fabrics used are like the varirables.

No comments:

Post a Comment