Week of February 14, 2016
Topics for this week: Object Oriented Design
It is expected that you will meet the objectives outlined here by the end of the week.
You might want to test yourself to see how well you fare. You can be guaranteed that you
will be tested on these concepts on your next exam. By the end of this unit, you should
be able to:
- explain what a class is, and the relationship between objects and classes.
- correctly create a class in a program, including member data and member methods.
- create correct and accurate UML class diagrams.
- explain the notion of encapsulation and why it is important.
- Chapter 7 of the course packet will introduce you to the concept
of a class.
Be sure that you understand the following important ideas presented in this unit.
- Any time that you find yourself wanting to use a set of closely related data elements in a program,
or you are modelling something in the real world, you should consider creating an object to hold and manage that data.
- A class is a blueprint that your program uses to create objects. An object is said to belong to a given class.
- All objects share two characteristics: They all have state and behaviour
- We represent the state of an object in the object's data members.
- In a class (the blueprint) data members are almost always declared as private.
- Private data cannot be seen from outside of an object. It is hidden from view.
- Behaviors are defined by writing member methods in the class (the blueprint) from which an object is derived.
- We create UML class diagrams to describe a class and the relationships between classes.
This week you should complete labs 12 and 13.
* Lab #12 will introduce you to class diagrams.
* Lab #13 shows you how to integrate a class into a GUI program.
A class is sort of a software blueprint that your program uses to create objects. The class
describes all of the data elements in an object and provides the functions that will manipulate