|
HTW Berlin Fachbereich 4 Internationaler Bachelor Studiengang Internationale Medieninformatik (Bachelor) Informatik 3 Winter Term 2023/24 |
|
|
Info 3: Informatik III Modern Software Engineering |
||
|
Lab
3: Scenarios, Use Cases, and Use Case Diagrams
|
Your job
Your job over the course of the semester will be to design (but not implement) an app for dealing with the Corona crisis. I have a few ideas for apps you could be designing, you are free in your team of 3-4 people to choose what exactly you want to do.
Choose a team name, if you wish. Please inform me by email the day before your lab who you want to work with. If you don't know people, let me know and I will put teams together.
This first exercise in UML spans two weeks. The first week you need to form your team and start reading up about use cases. Begin discussing what kind of an app you want to specify, but don't start drawing your diagrams until the second week, by which time you should have the scenarios done. Lab reports are due week 20. Each team will submit a core report that can be the same for all members of the team, each team member includes a personal reflection on what they learned in this exercise and states the amount of time spent individually on the exercise.
Use cases
Use cases are a szenario-based technique for requirements elicitation. They were first proposed by Ivar Jacobson as part of his Objectory methodology. There are many different variations on use cases, but the basic idea is to record the situation in which something happens, explain what should happen, and describe any exceptional circumstances which might arise.
In a scenario you describe a concrete use of the proposed system, using the names of a proposed user. In the use case we abstract away from the concrete situations in the scenarios and try and describe the general case. We have user roles and system functionality, which are depicted in diagrams as little stick figures and circles, respectively:

| An actor is something or someone that interacts with the target system to produce an observable result. There are active and passive actors. They are usually drawn with a stick figure, although I sometimes enjoy using a stick-woman figure just to be ornery. | ![]() |
A use case is an instance of how an actor would use a software system or a service offered by the system. More than one actor can participate in a use case. We draw use case diagrams to visualize the use cases and write out the use cases using templates, such as the one given in Wikipedia. Use case diagrams are decorated with the name given to the use case.
A scenario will typically describe the sequence of concrete activities that happen when a user is interacting with the proposed system. It is a detailed, step-by-step description of observable behaviors - that is, it does not describe the internal workings of the machine, but what a user can observe from the outside. We are not worried about how it will be done on the inside, but instead just want to see if the use of the system makes sense.
We can branch inside a scenario using an if statement and can repeat steps using a while statement. A scenario will not have exceptional conditions. If it is describing one such exceptional interaction, then it explains each step of what happens. A scenario also does not extend another scenario - it just describes what happens in this concrete instance.
We give names to scenarios, so that we can talk about them. The name should somehow be connected to the use case it is describing. Then we describe any precondition that must hold before the scenario can commence. For example: The user has a valid EC card. Then the sequence of steps is listed, followed by a postcondition describing what must hold at the end of the scenario. For example, the account linked to the EC card has been debited by 100 Euros and the user now has 100 Euros cash in her hands and the card is now marked as having been used on the current day.
|
Name |
ATM Cash Withdrawal |
| Precondition | Emmy has an
EC card with a readable magnetic stripe & the EC card is valid & the EC card is linked to an account with this bank |
| Sequence of steps |
|
| Postcondition |
Emmy is in
possession of her card and 150 Euros & |
There are also scenarios sometimes referred to as "secondary scenarios" which describe alternate paths. They have their own name, the name of the scenario to which they are referring, and a description of the problem or alternative faced.
| Name | Invalid PIN |
| Scenario based on | ATM Cash Withdrawal |
| Exception | Repeat steps 7 and 8 twice if the user enters in an invalid PIN. If the third time still does not give the correct PIN, then retain the card. |
A number of scenarios are usually collected and abstracted into a Use Case and expressed graphically by a Use Case Diagram. The elements of a Use Case often include:
You should realize that every author and every company have their own ways of describing Use Cases, but usually each of these aspects are addressed. We will be using the structure given here for now. Many agile development processes use the form
As a ----- Role -----
I want to ----- Take Action -----
Because ----- Reason -----.
You are welcome to try to write some of these as well.
Potential apps
All of the apps need to be in multiple languages and potentially usable without a smartphone. You are free to specify an Android-only or an iOS-only app, or a web-based one. Note: We are *not* implementing this (but you are free to try this out over the summer break in case we are still in isolation and you need something to keep you busy.
For each of the systems there will be at least one front end (that's the part that the user sees) and at least one back end, the one that the phone is communicating with.
Enterprise Architect is available on the machines in the lab. There is a list in Moodle assigning you to a machine. Access to the machines is described here. You will need Microsoft Remote Desktop in order to log in.
Exercises
Please submit your
exercise reports in Moodle by 23.59 the day before your next exercise.
Please include all materials (scenarios, use cases and use case
diagrams) in one PDF and don't forget to put the names
of each person involved on the report. Alternate formats such as ZIP
files will be considered not submitted.
A report should include information on the class, the lab, the date, and
all explanations should be in complete sentences, either in German or in
English. Always include a short (4-5 sentence) reflection on what each
member learned in this exercise and how long you spent in and out of
class. All material in this exercise should reflect your own work -
submitting work of other groups (especially those from years past,
although that is particularly hard this year with the topic specified)
or from the Internet is not acceptable. If your materials are not in on
time, the exercise will be marked failed, 0 points.