E0 257 - Software Architecture

Y. Narahari

Department of Computer Science and Automation
Indian Institute of Science
Bangalore - 560 012
INDIA


 PROBLEM SET #2

  1. Classify the following into generalization, association, aggregation,or composition:
    (a)  A country has a capital city
    (b)  A dining philosopher uses a fork
    (c)  A file is an ordinary file or a directory file
    (d)  Files contain records
    (e)  A polygon is composed of an ordered set of points
    (f)  A person uses a computer language on a project
    (g)  A class can have several attributes
    (h)  A relationship can be an association or a generalization
    (i)  A student takes a course from a Professor
    (j)  A course has registrants
     
  2. Prepare class diagrams showing appropriate relationships (association, aggregation, generalization, etc. ) in the UML notation between the classes given.
    (a)  file system, file, directory, user, authorization, ASCII file, executable file, directory file, disk, drive, track, sector
    (b)  IISc, director, employee, faculty, instructor, student, library,hostel,department, research-advisor, research student, course student
     
  3. With concrete examples, discuss the implications of the following tradeoffs:
    (a)  Association versus generalization
    (b)  Aggregation versus association
    (c)  Single inheritance versus multiple inheritance
    (d)  Class inheritance versus object composition
     
  4. Identify classes and create a class diagram for the following: A desktop publishing system is required to support text and graphics. Graphics include lines,squares, boxes, polygons, circles, and ellipses. The system should support interactive, graphical editing of documents.
     
  5. Find an appropriate many-to-one matching from the left items to right items:

    1. Abstraction            A. Structural relationship

    2. Encapsulation        B. Hierarchy

    3. Inheritance             C. Implementation

    4. Interface                 D. Business objects

    5. Persistence            E. Observable behavior of objects

    6. Aggregation

    7. Information hiding

    8. Association
     

  6. For each following task, state whether it is relevant for analysis (A) or for design (D) or for both (AD)

    (a)  Decide a software architecture for the given application
    (b)  Choose the window classes for the GUI
    (c)  Develop Use Case Diagrams
    (d)  Write down sequence diagrams for use cases
    (e)  Write down a state diagram describing the steps of an algorithm
    (f)  Remove a use case from the use case diagram
    (g)  Use a stereotype
    (h)  Select a data structure



    BACK TO HOME

     Modified by: Sandhya G & Shijesta Victor on 03.11.2003