Computer Science 223 Discussion Questions

Riel, Chapter 7

Discussion Questions submitted for Chapter 7 of Riel

Definition of the Association Relationship

  1. How do we distinguish between the types of association relationships? --Khong
  2. Can we assume that all the relationship except for uses, containment, or inheritance are association? --Hisako
  3. Is there any other way to describe the association relationship without saying that it is not any of the other types of relationships? -Jim Finnessy
  4. Could you clarify how associations are implemented through a third party class? (Sam Vanderhyden)
  5. Could you illustrate association relationship more? -George
  6. Can you give some Java examples of association? -Kensler
  7. How often are association relationships required?
  8. It seems as though associations tend to be relatively uncommon in programs...how true is this? -Todd
  9. Could the necessity for an association relationship be an indication for rethinking the design?

Referential Attributes

  1. Was Output Interface attribute a referential attribute in approach R in question 3 on the exam? Desi Dimova
  2. What is the difference between containment by reference and a referential attribute? (Sam Vanderhyden)
  3. What is the difference between containment by reference and association through a referential attribute?
  4. What are the differences between a referential attribute and an attribute that can be obtained from an inheritance relationship? ~yasir.
  5. Can you go over the difference between containment by reference and association through a referential attribute? -Kensler

Examples from the Scheduler Project

  1. Do we have any good examples of association in our project? I can't think of any, but wondered if they exist.
  2. Is the relationship between Days and Appointments a contains relationship, or an association? And how about between Days and Weeks? According to Riel, it should be implemented as a contains relationship, but it seems like we might have referential attributes rather than actually containing the class? -Peter Likarish
  3. Could you give an example of association in our project. taha
  4. Do we have any two classes in our scheduler project that are related through association? ~yasir.

Third-Party Classes

  1. Is it possible for proliferation of classes to occur in some designs because of too many third-party classes? (Raz Magar)
  2. If we make a third-party class like the ones in Ch.7, it has the name that is a verb. It seems that it is a violation of Heuristics 2.11. Or isn't it? -- Hisako
  3. When are associations implemented through a referential attribute and when through a third-party class? Desi Dimova

Distinguishing Relationships: Uses, Inheritance, Containment, Associations

  1. When deciding between association relationship and uses/inheritance, what is the recommended choice? Anthony
  2. I am not quite sure that I understand Heuristic 7.1. Why does Riel suggest that a designer should pick a containment relationship over an association relationship? -George
  3. Why do we choose a containment relationship if we are given a choice in an object oriented design between a containment relationship and an association relationship?
  4. In what situations is there going to be a choice between containment and association? Steve F
  5. If we are given the choice, we should choose a containment relationship instead of an association. Why do we need to have a special kind of relationship then? - Elias Vafiadis
  6. How does containment look any different from association on the code level? Steve F.

Other Questions

  1. What does it mean to say a code is reverse-engineered? Anthony
  2. Could you clarify the difference in the implementation of one-to-many versus many-to-one association? (Raz Magar)
  3. What is the difference in the definitions of associations and simple associations? --Khong
  4. What factors should be used in determining whether association is appropriate, and which type to use?
  5. It seems to me that simplifying the heating design in Riel should be worth room knowing that furnace also has a valve. Why should simplicity be overridden just so we can implement at containment relationship? -Peter Likarish
  6. What does the author mean by reverse engineering? (p.140) - Jim Finnessy
  7. Could you give more example(s) of descriptive and referential attributes? -Todd
  8. Could you differentiate association from simple association and containment. taha
  9. What is the use of associations? Why can't this be done through a relational database system? - Elias Vafiadis


This document is available on the World Wide Web as

http://www.walker.cs.grinnell.edu/courses/223.sp02/read-riel-7.html

created April 22, 2002
last revised April 22, 2002
Valid HTML 3.2!
For more information, please contact Henry M. Walker at walker@cs.grinnell.edu.