Sale!

Architectural Thinking for Intelligent Systems, Assignment for Lecture 2 solution

Original price was: $35.00.Current price is: $30.00. $25.50

Description

5/5 - (3 votes)

Modeling with UML

Imagine you work in the software department of a manufacturer of a fancy coffee machine. The
coffee machine consists of the following internal parts:
• user interface,
• embedded controller,
• water tank with a level indicator,
• beans container,
• water pump,
• heating unit,
• bean grinder,
• beverage dispenser,
• brewing unit.
We expect that the user fills in water into the water tank and adds beans to the beans container.
The machine is intended for free usage in office spaces: no payment options are needed. Model
all following tasks with the Modelio tool.

Task 1:

Describe the various parts of the coffee machine in a component diagram assigning the
different parts into four different subsystems. Connect all components with appropriate
connectors and ports.

The company wants to develop a new user interface for the coffee machine consisting of a
hardware button and a touch screen. The button allows the user to switch the coffee machine on
or off. The touchscreen containsseveral buttons called control elements. When a control element
on the touch screen or the on/off-button are pressed, the embedded controller processes the
user input. If the embedded controller produces a notification to display, the touchscreen needs
to display this notification.

The following control elements are offered on the touch screen:

(1) Screen controls allow the user to specify the various settings of the controller:
a. size of coffee cup: small, medium, large
b. coffee roasting: mild, strong
c. type of coffee: espresso, cappuccino, black coffee
(2) “Quick-choice” buttons allow a user to directly select a specific, frequently ordered type of
coffee with a single touch: large strong black coffee, mild medium cappuccino, and small
strong espresso.

Task 2:

Design a class diagram for the user interface. Model the order options for the user. Add
methods that allow a software developer to implement the interaction with the controller. Use
inheritance, aggregation, and composition where appropriate and add multiplicities, role
names, visibilities, and association names to your associations.
The machine behavior always follows the same pattern:
• The machine can only work if the user has switched it on via the button.
• When the machine starts, the main menu is displayed.
• From this menu the user can select a coffee by setting the screen controls or order a coffee
directly via the quick choice buttons. So long as the coffee is not ordered yet, the menu
will be displayed.
• When a coffee is ordered by the user, the machine must be sufficiently filled with water
and must contain enough beans to perform the order. Both checks are performed in
parallel.

• Otherwise, the brewing unit ensures that coffee is brewed.
• The brewed coffee is dispensed by the beverage dispenser and a new coffee can be
ordered/ selected.
• If the machine cannot select/ order/ brew/ dispense a coffee or the water or bean check
fails, the machine displays an error on the screen. When a user touches the screen, the
machine turns off.

Task 3:

Describe this behavior using a state diagram. Use concurrent substates, and transitions
with trigger events and guards where appropriate.

Task 4:

Model the interaction of the coffee machine components using a sequence diagram in
the following situation: The user orders a coffee, and the machine reports an error due to an
insufficient amount of water, which is displayed on the screen. Assume that the machine is
running.

Submission

Instructions can be found in slide deck A1-BasicConcepts and on the course website.