Speed cameras read the time a vehicle passes a point (A) on road and then reads time it passes a second point (B) on the same road (points A and B are 100 metres apart). Speed of the vehicle is calculated using:
Speed =100 / (time at point B - time at point A) (metres/sec)
Maximum allowed speed is 100 kilometres per hour. 500 vehicles were monitored using these cameras over a 1 hour period.
Write an algorithm, using a flowchart, that:
- Inputs start time and end time for the 500 vehicles that were monitored
- calculate speed for each vehicle using the formula above
- Outputs speed for each vehicle and also a message if speed exceeded 100 km/hour
- Output the highest speed of all 500 vehicles monitored