CN2003 Software Analysis and Design
  Examination Advice
  CN2003  Home - Examination Advice - Question 4

Quick Links

Frequently-asked questions »

Answer »

Questions

OO class modelling 1 »

OO class modelling 2 »

Data/ Attribute Normalisation »

Fact Gathering »

DFDs and STDs 1 »

DFDs and STDs 2 »

Answer all parts of this question.

a. Explain the difference between:

  1. a data flow and a control flow

  2. a process and a control process

(4 marks)

Read the following case study.

A vending machine operates when a customer starts to make a selection.  When a button on the machine's panel is pressed, process 1 (get valid customer selection) executes and either returns a valid selection or, if the customer does not make a selection or there is none of the required product in stock in the machine, returns a message that no product has been selected.

If a valid selection has been made, process 3 (get payment) executes and collects sufficient coins for the required purchase.  When sufficient coins have been entered, the process ends and returns an appropriate message.  However during coin entry, the customer can select a 'coin return' button, in which case the process ends immediately and process 5 (dispense change) is executed to return the coins entered.

If payment is successfully completed, process 4 (dispense product) is executed and a product table file is updated to show that there is one less of the dispensed product.

Once the product has been dispensed (it is assumed that no error can occur at this point), any change necessary is dispensed using process 5 (dispense change).

b. Complete the attached data flow diagram by including the appropriate control processes and control flows and draw a state-transition diagram which shows the behaviour of the main control process.

Click here for the data flow diagram.

(12 marks)

c. Explain why control flows and control processes are not normally added to a data flow diagram when it is initially created.

(4 marks)

Go to answer »


Details correct as on 28th July 2005
(c) P.J. Layzell, C. Tjortjis 2001-2005

Home | Contact Us| Legal