Systems Analysis and Design

45-878

Suggested Answers to Exercise 5

 

  1. Explain the inheritance principle as used in OOA. How does it apply to classification and assembly structures? (5)
  2. Inheritance implies that any object acquires the attributes and methods of a class. It applies to any object belonging to a class. It also applies to classification structures where an object in one class inherits the properties of the super class. An object belonging to a child class may be allowed to enhance / modify an operation defined in the parent class. Inheritance does not apply to assembly structures.

  3. How is the encapsulation principle used in OOA? (5)
  4. Encapsulation means that the attributes and methods of a class are packaged and hidden from other classes. Thus an object to class B, for example, does not have to understand the inner details of class A, yet can request the attribute values or operations of A; thus B cannot change the properties of A, but request A to change itself. This principle of information hiding reduces coupling between classes.

  5. How would you distinguish an <<extends>> relationship from a <<uses>> relationship in Use-Case models? (5)
  6. Relationships -

    Extends: An alternative use case <<extends>> a basic use case that tests if the alternative use case should be invoked

    Uses: A specialized use case <<uses>> a generalized use case which must be invoked to complete the specialized use case

  7. Explain the concept of an Association Class. (5)

When an Association itself has attributes or operations of its own, or when it participates in relationship with other classes, it is modeled as an Association Class.

 

Object Diagram:

Prepare an object diagram showing at least ten relationships among the following object classes. Include associations, aggregations, and generalizations. As you prepare the diagram, you may need additional object classes. Finally add 15 attributes and at lest 5 operations to the object diagram.

School, playground, principal, school board, classroom, book, student, teacher, cafeteria, rest room, computer, desk. (20)

Click here for a suggested diagram