You are on page 1of 2

Visual Basic

PROBLEMS &
Review Questions 1 ALGORITHMS

1 When solving a problem, why is it necessary that the first step be the definition of the
problem?

2 Identify the input, processing and output when a dishwasher is used.

3 During the implementation stage of solving a problem, it is important that


documentation takes place. Why is the documentation valuable in the software
development cycle?

4 Give a clear definition of


(a) a syntax error (b) a run time error (c) logic error

5 Identify these N-S diagram building blocks:


(a) (b)

(c) (d)

(e)

(f)

6 Of these structures
A. two way branching B. test first loop C. test last loop
D. multiple branching
which would be the most appropriate for the following tasks:
1. Nailing palings to a fence
2. Deciding on a mornings activity according to the weather.
3. Mixing the dough for scones.
4. Using the word is or the word are in a sentence.

Programming with Visual Basic page 1


Visual Basic Review Questions 1 Problems & Algorithms

7 Suppose you have a car jack positioned correctly under a car which has a flat tyre.
You will need to pump on the handle of the jack to raise the car.
(a) What type of looping structure is appropriate for the pumping of the jack handle?
(b) Draw and label a simple N-S diagram for this process.

8 Take a walk through this N-S diagram

set x to 1

write down the value of x

set y to 1

write down the value of y

repeat 6 times

set z to x + y

write down the value of z

set x to y

set y to z

9 Make two additional refinements to the following process of an automatic washing


machine:

Normal wash cycle

10 The following is a set of instructions from a recipe for a banana smoothie:


1. Pour 600 mL milk into blender
2. Peel a ripe banana
3. Chop up the banana. Add it to the blender.
4. Add honey and 140 mL banana yoghurt.
5. If you like, add a raw egg.
6. Add ice cream and ice.
7. Put lid on blender. Blend well until smooth.
8. Pour mixture into 3 glasses.
Write the above instructions as an N-S diagram.

Programming with Visual Basic page 2

You might also like