CSC2407 Introduction to Software Engineering
 
Maths&Comp Home
CSC2407 Home
Course specifications
Mailing list
Lecture Slides
Tutorials
Submit Assignment
Assignment Feedback
Results Summary
 
 
 
 

Tutorial exercises - Modelling 1

  1. Study book Q3.6.

    Draw a sequence diagram for a simple cash transaction at a shop. There are two objects: the buyer and the seller. One item only is being purchased.

  2. Study book Q3.10.

    Draw an activity diagram showing the process of getting yourself a drink. It should include the possibility of you wanting a hot drink (say tea or coffee) and a cold drink (e.g.~water, fruit juice or soft drink). For the hot drink preparation, show how activities can occur in parallel: namely the heating of water and the preparation of the mug/teapot/coffee jug.

  3. Study book Q3.11.

    A car's automatic transmission can be in one of 4 states: Park, Reverse, Neutral or Drive. A gear lever selects these states, and they are arranged in a linear sequence in the order shown:
    D N R P
    So from P one can only move to R, while from N one can move to either R or D.

    1. Show the transmission state using a statechart.
    2. Modern cars often do not allow the gear selector to be moved out of P or N unless the foot brake is depressed. Augment your diagram (with a concurrent state) to show this.
    3. The engine can only be started when the lever is in P or N. Show this by adding a third concurrent state.

  4. Draw a DFD to describe a retail shop.

    Draw a context diagram and a level 0 diagram. Here is a description of operation of the business.

    1. A customer selects one or more items and presents them for sale to the sales assistant. The item codes (bar codes) are noted and a total cost is then determined. The item cost is stored on the stock file. The customer pays the total and is presented with a receipt. The stock file is modified to show the amount of stock now held in the store.
    2. A customer may place an item on lay by. Periodic payments no less than 20% of the price per month can be made. Payments can be made at any time. The customer receives a receipt for each payment which also shows the remaining balance. If lay by payments are overdue a letter is sent to the customer.
    3. The shop orders new stock from a number of suppliers. Stock is ordered once per week. Stock orders are generated either by staff, who directly request the numbers of items to be ordered, or by a weekly scan of the stock file. An item whose stock is less than its reorder number will be ordered.
    4. A supplier delivers new stock together with an invoice. The invoice is checked against the delivered stock to ensure all items have been delivered, then is sent to the accounting department for payment to the supplier.
 
  http://www.sci.usq.edu.au/courses/CSC2407/model1.html      Last modified: Mon Sep 1 14:08:15 2008 EST      Contact