View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide
Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007

(5) Analysis - chris and ellie

Question


You are beginning the task of developing the software for the following vending machine. The vending machine must take coins or bills and dispense items that the user selects. The vending machine validates the money and displays the current toal in the display window. The customer pushes a button which tells an item dispenser to dispense an item. If the customer has entered enough money for the item the vending machine will dispense the item and any change. The item dispensers must track the number of items in them and email the supplier for the item (via the Internet) to let the supplier know that they need more of that type of item when the number of items reaches a reorder level. The vending machine must know its location, and model number. There are two kinds of items. Items that need to be kept cold and those that don't. All items know their price. Cold items also know what temperature they need to be kept at.


Answer


Being a design question, there is a large variety of possible answers. However, this is what we used in means of an objective criteria:

  • 2 pts – Syntax
    Are the cards build correctly with collaborators and responsibilities? Do the cards include only method-type functionality or do they include 'knows' type behaviour (should be only method-type functionaltiy)?

  • 2 pts – Proper class distribution
    At minimum, we were looking for CRC cards for the Vending Machine, the Button, and the Item Dispenser. Having a Display was recommended.

  • 16 pts – Responsibilities and Collaborators
    Each bit of functionality was worth two points, one point for being considered, one point for being in the proper place with proper collaborators. For example, if maintaining the correct temperature is somewhere in the answer, that would be half credit at one point. The other point would be given for using the Vending Machine (or perhaps the Dispenser) to maintain temperature with a method-type function (not 'knows' behaviour). We were looking for the following responsibilities (note that there is a degree of flexibility here):




    Here is an example of a good solution:

    Vending Machine
    accept coins
    dispense items ItemDispenser
    validate money
    display total

    Item Dispenser
    track number remaining
    email supplier
    dispense item
    maintain temperature Item

    Button
    dispense item Vending Machine

    Link to this Page