0% found this document useful (0 votes)
22 views2 pages

T1W2 Programming Assignment

The document outlines the requirements for developing software to connect with a new traffic speed sensor in Da Nang, detailing necessary inputs, processes, outputs, and stored data. Inputs include the speed of cars, time, and license plates, while processes involve checking speeds, storing data, and calculating fines. The design, coding, and testing stages are also briefly described, emphasizing the need for efficient data capture, appropriate programming tools, and thorough testing to ensure reliability.

Uploaded by

hoaibacdn07
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views2 pages

T1W2 Programming Assignment

The document outlines the requirements for developing software to connect with a new traffic speed sensor in Da Nang, detailing necessary inputs, processes, outputs, and stored data. Inputs include the speed of cars, time, and license plates, while processes involve checking speeds, storing data, and calculating fines. The design, coding, and testing stages are also briefly described, emphasizing the need for efficient data capture, appropriate programming tools, and thorough testing to ensure reliability.

Uploaded by

hoaibacdn07
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Refer to Chapter 7.1 (Program development life cycle; p.258), 7.2.

1 (The computer system


and its sub-systems; p.260) and 7.2 (Decomposing a problem; p.260) in your coursebooks to
help you fill out this worksheet.

Task 1: Analyze the following problem, and identify what is required to solve it. Make sure to
note the following: a) any required inputs (i.e. data that a computer program would need to
receive); b) any processes, or tasks, that the program should perform; c) desired outputs (i.e.
data that a computer program should produce); and d) any important data that must be stored.
A new type of traffic sensor has been installed on the roads near the beaches of Da
Nang. It is a speed sensor that observes oncoming traffic and can detect how fast cars
are moving, measured in km/h. The city wants to write software that will connect to this
sensor, using its data to alert the traffic police. If the speed of an oncoming car is faster
than the speed limit in that part of the city, the software should produce a text message.
The message would report the speed of the car as well as its excess speed—that is, how
much faster than the speed limit it was going. It would also report the fine that should
be applied (in VND), calculated based on the excess speed.
a) Inputs
 Speed of the car
 Time, of each car that surpassed
 Liscence plate
b) Processes
 Continuously checks the speed of each vehicle passing by the sensors
 Store the time data in that record(speeding)
 Compare the speeding car and speed limit to calculate the fine in VND
c) Outputs
 Text message to the police center
 ...
d) Stored data
 Records of the car, how much was fined, how much did he/she exceed the limit
 …
Task 2: Based on your understanding of Chapter 7.1, write one or two sentences in your own
words to predict how you might carry out the stages of a) design, b) coding and c) testing the
software described in Task 1. Be sure to make your answer specific to the problem posed in
Task 1.
a) Design
 I need to be able to capture speeds of oncoming cars (sensors) and store them. Being
able to calculate the fine on its own and sends an alert/message to the police
department along with a license plate
 ...
b) Coding
 You would need a suitable IDE, and programming language that would work best with
the situation you're in
 ...
c) Testing
 The program is then tested with different sets of data to ensure no errors occur and
redoing lots of times.
 To ensure maximum efficiency

You might also like