CPlusOOP
SiteMap
OO Analysis
Problem Analysis
OO Concepts
«Prev
Next»
OO-Design
Detailed Design
OO Programming
Procedural Programming
Object Oriented Approach
Design Process
Eliminate Classes Problem Domain
OO Design Conclusion
Object Oriented Concepts
Responsibilities Collaborators
Video Store Example
OOA Benefits Encapsulation
Structured Programming
Benefits OOA
OO Conclusion
Object Oriented Approach
OOA Simpler Analysis
OOA Enables Reuse
Simplifies Team Work
OOP Conclusion
User Defined Data Types
Classes Objects
Class Data Type
Choosing Class Attributes
Object Instance
Class Object Difference
Class Composition
When to use Composition
Build Complex Objects
Drawing Class Diagram
Class Construction Conclusion
Identify responsibilities and collaborators - Quiz
Each question is worth one point. Select the best answer for each question.
1.
The Checkbook Manager has a class called CheckingAccount. Which of the following is a good responsibility for the CheckingAccount class?
Please select the best answer.
A.
Print the bank's name and address on reports.
B.
Track the balance in the account.
C.
Report on interest rates available on savings accounts.
D.
Prepare a summary for tax calculations.
2.
CheckingAccount has a responsibility to provide the account balance on request. Which statement about collaborations is most correct?
Please select the best answer.
A.
CheckingAccount will collaborate with Deposit and Withdrawal classes to get the amounts of all outstanding transactions and total them.
B.
CheckingAccount will collaborate with AccountHolder to find the individual's current checking balance.
C.
CheckingAccount will not collaborate with another class to perform this responsibility.
D.
CheckingAccount will collaborate with Statement because Statement requests the balance.
3.
CheckingAccount has a responsibility to print certain reports for the user. These reports require the bank's name and address on them. CheckingAccount will collaborate with the Bank object to get this information. Which one of the following statements best describes a relationship needed by this collaboration?
Please select the best answer.
A.
The checking account should know its bank, so it can delegate the work.
B.
The CheckingAccount class should be part of the Bank class.
C.
There should be a global Bank variable all CheckingAccount objects can reach.
D.
The Bank class should be part of the CheckingAccount class.
Correct answers:
Your Score: 0
Submit
Quiz Explanation