SDA SE Wiki

Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering

User Tools

Site Tools


Assignment 8: Object Design

Release date: Monday, 06.06.11 - Due date: Sunday, 19.06.11, 23:59

By now over half of the sheets are solved! You need 50% of the total points for the exam admission, thus if you are missing points you definitely need to catch up.

Task 1: Design Goals & Patterns

2 points

Consider the following design goals. Indicate the candidate patterns you would consider to satisfy each goal.

  • Given a legacy banking application, encapsulate the existing business logic component.
  • Given a chess application, enable future developers to substitute a planning algorithm that decides on the next move with a better one.
  • Given a simulation of a rabbit searching for a carrot. The application should support different search algorithms for each rabbit.
  • Given a news board application which allows adding unstructured comments to your postings. It shall be possible to add comments to existing comments.

Task 2: Design Patterns in Action - A Lending Library

6 points

The initial Java program code - the library application - can be found in the SVN (https://svn.iai.uni-bonn.de/repos/IAI_Software/se/oosc2011/group00/Assignment8/LendingLibrary.zip). The goal of this task is to enhance the given application by the use of design patterns.

  1. When a customer is interested in a loaned medium, she can append herself to a waiting list for this medium. After the medium is returned, the first customer on the waiting list should be informed by email. Accomplish this with an appropriate design pattern. For simplicity reasons, the email should be represented as a simple text (“Send Mail to <Customer Name>: <Medium Title> is now available for you”) on the console.
  2. As an extension of the previous step, the lending library system is extended by a mail transfer agent. This class should contain the method sendMail(String customerName, String mediumTitle) with the same behavior as before. Ensure - with a design pattern - that there is only one instance of the mail transfer agent at maximum. At last, integrate the new class into your existing system.

Task 3: Proxy Pattern

3 points
  1. Explain shortly the motivation and the functionality of the proxy pattern.
  2. Which are the participating roles of the proxy pattern? Which responsibilities do they have? Which operations are necessary?
  3. Present one example for each proxy variant, discuss the differences and present the motivation behind each one.
  4. What is the difference between the proxy and adapter pattern?

Task 4: Breaking the Cycle

2 points

Take a look at the cyclic dependency expressed in the following UML class diagram: Can you think of a way to break this cycle without loosing any functionality?

Task 5: Identify Boundary Controller Entity

2 points

For the use case to print an email with an attached file the requirements elicitation identified the following objects:

  • Printer Interface
  • File
  • Print Dialog
  • Printing Processor
  • Email Handler
  • Email Window
  • Email
  • Printer

Categorize the objects into boundary, controller and entity objects. There might be an actor as well.

The following multiple choice tasks are taken from old exams, we suggest everyone also to solve these only by pen and paper without any additional help.
The tasks are not optional, thus are considered in the total points for your exam admission. We still only accept one solution per group, so better agree on your solution ;-).

Multiple Choice 1: Software Process

6 points

a.) Requirements Elicitation

0-1,5 points: +0.5 per correct answer, -0,5 per incorrect
In the Requirements Eliciation… Yes No
…the focus is on the description of the system goals.
…a technical system specification for the developer is generated.
…entities, boundaries and controllers are identified.

b.) Requirements Analysis

0-1,5 points: +0.5 per correct answer, -0,5 per incorrect
At the end of the Requirements Analysis… Yes No
…for each use case there is only one domain object.
…the system is structured as a set of classes that are the base for the further development.
…there may be redundant requirements.

c.) System Design

0-1,5 points: +0.5 per correct answer, -0,5 per incorrect
During the System Design… Yes No
…the design goals are obtained based on the non-functional requirements.
…related operations are combined to a service.
…subsystems with maximal coherence and minimal coupling are defined.

d.) Object Design

0-1,5 points: +0.5 per correct answer, -0,5 per incorrect
At the end of the Object Design… Yes No
…the created class diagrams are the basis for the real implementation.
…the checking of the model is done by a new system design iteration.
…there needs to be a 100% test coverage.

Multiple Choice 2: UML Diagrams

3 points

a.) Structure Diagrams

0-1,5 points: +0.5 per correct answer, -0,5 per incorrect
The diagram is a UML structure diagram: Yes No
Use-case diagram
Class diagram
Componentdiagram

b.) Behaviour Diagrams

0-1,5 points: +0.5 per correct answer, -0,5 per incorrect
The diagram is a UML behaviour diagram: Yes No
Deployment diagram
State machine diagram
Class diagram

Multiple Choice 3: Use-case diagrams in detail

6 points

a.) Extends

0-2 points: +0.5 per correct answer, -0,5 per incorrect
The “extends”-relation in use case diagrams… Yes No
…may be used between two actors.
…may be used between two use cases.
…may be used between a actor and a use case.
…is not permitted.

b.) Inheritance

0-2 points: +0.5 per correct answer, -0,5 per incorrect
The “inheritance”-relation in use case diagrams… Yes No
…may be used between two actors.
…may be used between two use cases.
…may be used between a actor and a use case.
…is not permitted.

c.) External System

0-2 points: +0.5 per correct answer, -0,5 per incorrect
In a use case diagram an external system is represented by… Yes No
…a system box, similar to the modeled system.
…an actor figure.
…a symbol for an active class.
…a normal class symbol together with an adapter.

Multiple Choice 4: Design Patterns

0-3 points: +0.5 per correct answer, -0,5 per incorrect

In the following picture connect each application example on the left to the corresponding design pattern on the right.

teaching/lectures/oosc/2011/assignment_8.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2025