April 2000
SD206 : SYSTEMS DESIGN

QUESTION 4

Total Marks: 15 Marks

Click here to access other questions

Click to access
SUGGESTED SOLUTIONS
for Question 4

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

(b)List three disadvantages of conventional flowcharts.[3 marks ]

(c)What are structured flowcharts [2marks ]

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

(ii)
if x > y then
  z :=x-y
else
  z :=y-x
[2 marks ]

(iii)
Do While z > 10
  z := z div 10
[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 ]