Dale - Computer Science Illuminated 207

Dale - Computer Science Illuminated 207 - 180 Chapter 6...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
180 Chapter 6 Problem Solving and Algorithm Design Object-oriented design focuses on determining the objects within a problem, and abstracting (grouping) the objects into classes based on like properties and behaviors. Classes and objects can relate to each other in three ways: containment, inheritance, and collaboration. Containment is a has a relationship, where a class contains an object of another class. Inheri- tance is an is a relationship, where one class inherits the properties and behaviors of another class. Collaboration is a works with relationship, where one class calls upon another class for information or a service. There are four stages to object-oriented decomposition: Brainstorming , in which we make a first pass at determining the classes in the problem Filtering , in which we review the proposed classes •S cenarios , in which the responsibilities of each class are determined Responsibility algorithms , in which the algorithms are written for each of the responsibilities
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Ask a homework question - tutors are online