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

User Tools

Site Tools

Assignment 8: Aspect Oriented Software Development

Release date: Tuesday, 04.12.12 - Due date: Sunday, 09.12.12, 23:59

Task 33: Automated Teller Machine

17 points

[Taken with slight modifications from the exam 2011]

a) Name the four steps to write Agile Use Cases. We named already the first:

(1) Identify the actors and their goals.




b) In the use case description below1) add in the empty brackets the number of the step in which the information was written. As an example we added “1” for the actors and the goal.

Use Case: “Withdraw Money” (and “Contact personal bank assistant”)

(1) Actors: Bank Customer, Bank System
Goal (Bank Customer): Withdraw money from own account
( ) Bank Customer inserts card
Valid Card Invalid Card
Bank customer enters PIN
( ) Valid PIN Code ( ) Invalid PIN Code
Bank customer enters amount
Invalid Amount Amount > Daily Limit Amount > Account Balance Amount valid and in Range
( ) The ATM checks with the bank system whether the ATM is close to the personal bank assistant. If yes, it offers to contact him. ( ) The ATM dispenses the amount of cash

The use case diagram below shows the use cases “Transfer Between Accounts”, “Deposit Money”, “Withdraw Money”, and “Contact personal bank assistant”.

Use Case Diagram of the ATM

c) Explain the «extend» relation in general and why we use it here (1-2 sentences).

d) Which relation do you expect between use case slices that realize the extended and the extending use case? Why? (1-2 sentences).

e) Explain the terms “scattering” and “tangling”. (1-2 sentences)

f) Have a look at the responsibilities of the «boundary» class ATM Interface. Can you see “scattering” or “tangling” here? Explain! (1-2 sentences)

Interface of the “ATM Interface”

Below you see an analysis object model for the use cases that we created for you.

Analysis Object Model of the ATM

g) Which analysis objects realize the “Withdraw Money” Use Case?

h) Which analysis objects realize the “Contact personal bank assistant” Use Case?

i) Complete the corresponding use case slices for this two use cases in the model below.

Template for the Use Case Slices of the ATM

j) Add the appropriate stereotypes to the dependencies between the usecase slices and non-usecase-specific slices.

k) Add a note to each of the three analysis objects that are extended by an aspect that explains, which responsibility is added by the aspect to the analysis object.

Task 34: Simple Mobile Phonebook

15 points

[Taken from an older exam]

SimpleMobilePhonebook is a small application running on mobile devices. A user can edit the details of his contacts. A contact has a name, a phone number and an address. For every contact there can be a voice file recorded as an alternative mean to identify the contact. A user can make a call by entering the name of a contact or by voice lookup. To call a contact identified by voice file, he presses a special button on the screen; the device records his voice and compares it to the voice files for the contacts. If none of the voice files matches with a high enough score a list with the best matches will be presented from which the user can select the contact. After successful selection of a contact the call is initiated.

Use Case Diagram for the Simple Mobile Phonebook

a) Study the Use Case Diagram thoroughly.

b) Draw a class diagram showing the Domain Object Model (= the entities). It’s quite simple.

c) Based on your Domain Object Model and the Use Case Diagram create an Analysis Object Model using the «boundary», «controller», «entity» stereotypes.

d) Which of the elements (including all three stereotypes) in your Analysis Object Model realize the following use cases?

  1. Edit Contact
  2. Call Contact identified by Voice File
  3. Handle no precise match found

e) In which sense it there “scattering” or “tangling” in your model?

f) Draw a version of the Analysis Object Model separated into Use Case Specific Slices. Either use a graphic program and edit the picture below or bring a print out to the presentation.

Template for the Use Case Slices of the Simple Mobile Phonebook

Task 35: Develop our Hotel Management System with AOSD (optional)

[20 points]

Develop our Hotel Management System following the aspect-oriented approach presented in today's lecture. You are free to reuse any model that was present in the lecture or that you (not by other groups) created during any of the previous assignments. We want to see models as well as code. Your solution doesn't need to be a complete Hotel Management System, but the model you are suggesting should be sound and your code should be doing his job.

Your solution has to contain:


  1. An Use Case Diagram including at least one «extends» relationship.
  2. A Model showing Use-Case-Slices and Non-Use-Case-Specific-Slices as packages that depend on each other. (If you want to show a fancy solution, create a UML profile that provides these stereotypes.)
  3. Use Case Realizations of the extended and the extending Use Case. (Use Case Realizations are Analysis Object Models just for one Use Case.)
  4. Transform these two Use Case Realizations into Use Case Slices that depend on each other.

Source Code

  1. A user interface, controller objects, and entities. (You do not need to implement persistence, but you can.)
  2. Some use case specific behavior introduced into an entity or boundary object via an inter-type declaration.
  3. An implementation of a non-functional requirement with an Aspect. (The Aspect has to have at least one pointcut that matches at at least three places in the code.)

Hint: The important thing for us here is that model and code match. Neither of them has to include all the different features we talked about. It is completely sufficient to have a small core functionality included. The code does not have to be perfect. You can get full points even if something is not working.

Presented in a form close to the good old Nassi-Shneiderman Diagram. It should be straightforward to understand.
teaching/lectures/atsc/2012/assignment_8.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2020