CISC 836 In-class Exercise: The Debaters

[The RSARTE models used in this exercise can be found here]

Consider the task of giving change for a simple vending machine: after the user has inserted coins and selected an item, the machine dispenses coins in value of the difference between the value of what was inserted and was selected. Your task is to compare three different designs for a 'Changer' component, i.e., a component that receives the value of the selected item and the value of the inserted coins as input, and then causes the dispensing of the appropriate number of 2 Dollar and 1 Dollar coins. All three designs have the same top-level structure:

The state machine of capsule 'Top' reads in the command line arguments and passes them to the harness (via port 'initPort'). The harness accepts these parameters, sends them to the 'changer' (in messages 'selected(f:float)' and 'inserted(f:float)' sent over port 'inputPort') and then waits for 'coin(f:float)' or 'done' messages on port 'coinPort' or message 'error' on port 'errorPort'.

The three models differ in their structure and behaviour of the 'changer' capsule.

Your task: Explain why the design that you have been assigned to is the best! Criteria that you may want to use include our design guidlines (slides 51-53 in UML-RT slide deck used in class), as well as the standard quality attributes such as coupling, cohesion, modularity, simplicity, correctness, readability, reliability, scalability, testability, debuggability, extensibility, efficiency, maintainability, observability, and reusability (for more details, see en.wikipedia.org/wiki/List_of_system_quality_attributes).

Credit: This exercise was inspired by 'The Debaters', a radio show on CBC (www.cbc.ca/thedebaters).


Last modified: Mon Jan 15 11:27:17 EST 2018