Lab_03 - solution

# Lab_03 - solution - Lab Tutorial#03 ALGOR IT H M DATA FLOW...

This preview shows pages 1–5. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Lab / Tutorial #03 ALGOR IT H M, DATA FLOW D IAGRAM, PSEUDO-CODE, H I ERARCHY CHART I nstruction on how to locate and use MS Visio: Labs and Tutorials: Question 1 Construct a flowchart diagram for the algorithm below using MS Visio 1. Get number 1 2. Get number 2 3. If number 1 is less than number 2 4. Display number 1 is the lowest number 5. Else 6. Display number 2 is the lowest number Question 2 Construct an algorithm on how to calculate speed of a vehicle if it runs 100 kilometres in 2 hours. Use the MS Visio to draw the flowchart diagram of the algorithm. 1. Input : distance (in kilometres) and time (in hours) 2. Process : divide distance by time 3. Output : speed • Get distance in kilometres • Get time in hours • Compute Speed o Divide distance by time • Display Speed Question 3 The Police Department put more efforts in trying to control the rate of road accidents by employing speed radar devices in some areas closer to school, shopping centre, hospitals and medical centres. Every day an on-duty officer collects speeding data from all radar cameras being established in some specific areas and works out the speeding fine and post to the owner of the vehicle. The radar camera produces a report similar below when it detect over speeding vehicle; Vehicle Plate Number Vehicle Speed (Miles/Hour) Road Limited Speed (Miles/Hour) L34689 59 50 SK7115 100 80 SP9000 40 30 Vehicle fine applied is \$25.50 per mile if the vehicle speed travelled over the limited speed of the road. The officer on-duty will complete a report shown similar below and submit to the Chief Inspector for approval; Vehicle Plate Number Vehicle Speed (Miles/Hour) Road Limited Speed (Miles/Hour) Vehicle Fine L34689 59 50 \$229.50 SK7115 100 80 \$510.00 SP9000 40 30 \$255.00 TOTAL 199 160 \$994.50 Construct an algorithm for a computer system to do the on-duty officer’s tasks. Use the MS Visio to draw the appropriate flowchart diagram and hierarchy chart of the...
View Full Document

{[ snackBarMessage ]}

### Page1 / 14

Lab_03 - solution - Lab Tutorial#03 ALGOR IT H M DATA FLOW...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online