Download Software Development

Transcript
HIGH LEVEL LANGUAGE PROGRAMMING – BASIC CONSTRUCTS
4.5 Using AND – task
Example: Can I drive?
The problem: A program is required that
asks the user to enter their age, then displays
one of the following messages, as
appropriate:
•
•
•
•
•
Sorry, you can’t drive (if you are under 16)
You can only drive a moped (if you are 16)
You can only drive a car or moped (if you are 17 – 20)
You can drive any vehicle (if you are 21 – 74)
You need a medical check (if over 75).
Design, implement and test a program to solve the problem given
above.
100
SOFTWARE DEVELOPMENT (INT 2, COMPUTING)