CORRECT Answers
Object-Oriented Program Flow - CORRECT ANSWER✔✔- Instantiation
•Creation of an object in memory.
Method
•The function executed within an object when invoked by a message request (method call)
Steps of Object-Oriented Design
3 Paths - CORRECT ANSWER✔✔- -Simple use case use CRC Cards
-Medium use case use Communication Diagram
-Complex use case use Sequence Diagram
CRC Cards—Classes, Responsibilities, Collaboration Cards - CORRECT ANSWER✔✔- -
Assigning Responsibilities to Classes for how they Collaborate to accomplish a use case
-Usually a manual process done in a brainstorming session
u3 X 5 note cards
-One card per class
-Front has responsibilities and collaborations
-Back has attributes needed
CRC suggestions - CORRECT ANSWER✔✔- •User interface classes or even data access
classes can be added
•Add collaborators showing which collaborate with which.
•Sometimes different designers play the role of each class.
•Ask what this first class needs to carry out the responsibility.
•Start with the class that gets the first message from the controller
Object Responsibility - CORRECT ANSWER✔✔- -Objects are responsible for carrying out
system processing
, -A fundamental assumption of OO design and programming
-Responsibilities include "knowing" and "doing"
separation of responsibilities - CORRECT ANSWER✔✔- -AKA Separation of Concerns
-Applied to a group of classes
-Segregate classes into packages
-Basis for multi-layer design
Protection from Variations - CORRECT ANSWER✔✔- -Parts of a system unlikely to change
are separated (protected) from those that will surely change
-Separate user interface forms and pages that are likely to change from application logic
-Put database connection and SQL logic that is likely to change in separate classes from
application logic
-Use adaptor classes (next week) that are likely to change when interfacing with other
systems
Indirection - CORRECT ANSWER✔✔- -An intermediate class is placed between two classes
to decouple them
-A controller class between UI classes and problem domain classes is an example
-Supports low coupling
-Indirection is used to support security by directing messages to an intermediate class as in a
firewall
Coupling - CORRECT ANSWER✔✔- -A measure of how closely related classes are linked
(tightly or loosely coupled)
-Two classes are tightly coupled if there are lots of associations with another class
-Two classes are tightly coupled if there are lots of messages to another class
-It is best to have classes that are loosely coupled
Cohesion - CORRECT ANSWER✔✔- -A measure of the focus or unity of purpose within a
single class.