April 2000
SD206 : SYSTEMS DESIGN

QUESTION 4

Total Marks: 15 Marks

Click here to access other questions

SUGGESTED SOLUTIONS
Solutions and allocated marks are indicated in green.
Return to
Question 4

(a)Describe the following algorithm using a conventional flowchart
begin
  input x
  input y
  z :=x+y
  output z
end
[3 marks ]

Please do not award half marks.
One mark the for correct representation of inputs and outputs; one mark for the correct representation of calculation of z; one mark for the correct representation of program flow.


(b)List three disadvantages of conventional flowcharts.[3 marks ]
One mark should be awarded for each disadvantage named (up to a maximum of three marks). Examples include the following:
• The use of flowcharts can often lead to global, rather than local, data being used in program design.
• The logic design tends to be intertwined, resulting in difficult tracing and testing.
• There is no effective control as a esult of no superior/subordinate relationship.
• Flowcharts do not help in partitioning a system to allocate different parts to different team members. Other valid answers should also receive credit.
[3 marks ]

(c)What are structured flowcharts [2marks ]
Structure flowcharts are graphical tools that force designers to design and structure software which is top-down (1 mark)and modular (1 mark).
Other valid answers should also receive credit. [2 marks ]

(d)Describe the following parts of an algorithm using structured flowcharts
(i)
input x
input y
[1 mark ]

One mark should be awarded for the correct representation of a sequence process.[2 marks ]

(ii)
if x > y then
  z :=x-y
else
  z :=y-x
[2 marks ]
One mark should be awarded for the correct structure; one mark should be awarded for the correct contents.[2 marks ]


(iii)
Do While z > 10
  z := z div 10
[2 mark
s ]
One mark should be awarded for the correct structure; one mark should be awarded for the correct contents.[2 marks ]



(iv)Case
  x =0 :output ‘0’
  x =2 or x =4 or x =6 orx =8 :output ‘even’
  x =1 or x =3 or x =5 orx =7 or x =9 :output ‘odd’
End Case
[2 marks ]
One mark should be awarded for the correct structure; one mark should be awarded for the correct contents.[2 marks ]