Splitting a scenario into inputs, processes, outputs and storage

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Splitting a scenario into inputs, processes, outputs and storage

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. ATM cash withdrawal: the customer types in a PIN. Which group does the PIN belong to?
A Input
B Output
2. ATM cash withdrawal: the system checks the balance is high enough for the amount requested. Which group is this?
A Storage
B Process
3. Quiz game: the high-score table is saved so it is still there next time the game starts. Which group is this?
A Input
B Storage
4. Quiz game: the player's score is shown on the screen at the end. Which group does it belong to?
A Output
B Process
5. Automatic greenhouse: a temperature sensor reads 31 degrees. Which group is the sensor reading?
A Input
B Output

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1INPUT PIN AATM: the card PIN typed by the customer is data going in, so it goes in the input group
2balance ← balance - amount BATM: working out the new balance is something the program does, so it goes in the process group
3Quiz game: the high-score table must be kept after the game ends, so it is sorted as storage CStorage is missing. The account balance and PIN must be kept somewhere, so the check for missing parts was skipped.
4Greenhouse: a sensor reading is data coming in, and the check against the limit is a process that decides what happens next DIF temperature > 30 THEN OPEN window
5Quiz game decomposition: Input = score is displayed on screen EWRITE highScores TO file
6ATM decomposition: Input = PIN, Process = check PIN, Output = notes given out (no storage listed) FShowing the score on screen is an output, not an input. Input is data the player enters, such as an answer.

Definitions

Input, Process, Output, Storage

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
Typing the PIN at an ATM is an _____
2.
Checking the PIN matches is a _______
3.
Showing the cash amount is an ______
4.
Quiz high scores kept in a file are _______
5.
Sensor reads temperature: input Compare with the target: _______ Switch fan on or off: output

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A ATM cash withdrawal
B Input: cash, amount wanted
C Process: check the balance
D Output: cash and receipt
E Storage: account balance
Question 2
A Output: player's answer
B Process: compare with correct
C Output: score on screen
D Storage: high-score table
Question 3
A Process: temperature sensor
B Process: compare to set limit
C Output: open the window
D Storage: daily temp log
Question 4
A Quiz game high-score table
B Storage: none needed
C Process: add 1 for correct
D Output: show the table
E Input: player's name
Question 5
A Automatic greenhouse
B Input: temperature, moisture
C Process: compare with limits
D Input: sprinkler turns on
E Storage: readings log

Answer Key

Splitting a scenario into inputs, processes, outputs and storage
Section A: Quick Questions
Q1
A — Input
Q2
B — Process
Q3
B — Storage
Q4
A — Output
Q5
A — Input
Section B: Match the Pairs
Q1
INPUT PIN → ATM: the card PIN typed by the customer is data going in, so it goes in the input group
Q2
balance ← balance - amount → ATM: working out the new balance is something the program does, so it goes in the process group
Q3
Quiz game: the high-score table must be kept after the game ends, so it is sorted as storage → WRITE highScores TO file
Q4
Greenhouse: a sensor reading is data coming in, and the check against the limit is a process that decides what happens next → IF temperature > 30 THEN OPEN window
Q5
Quiz game decomposition: Input = score is displayed on screen → Showing the score on screen is an output, not an input. Input is data the player enters, such as an answer.
Q6
ATM decomposition: Input = PIN, Process = check PIN, Output = notes given out (no storage listed) → Storage is missing. The account balance and PIN must be kept somewhere, so the check for missing parts was skipped.
Section C: Definitions
Q1
Input, Process, Output, Storage — Read the scenario and sort every part into input (data in), process (what is done), output (result shown) or storage (data kept). Then check nothing is missing or in the wrong group.
Section D: Fill in the Blanks
Q1
Typing the PIN at an ATM is an input
Q2
Checking the PIN matches is a process
Q3
Showing the cash amount is an output
Q4
Quiz high scores kept in a file are storage
Q5
Sensor reads temperature: input Compare with the target: process Switch fan on or off: output
Section E: Spot the Error
Q1
B — Cash is what the ATM gives out, so it is an output, not an input. The input line should be 'Input: PIN, amount wanted'.
Q2
A — The answer is typed in by the player, so it is an input. The line should be 'Input: player's answer'.
Q3
A — A sensor reading is data going into the system, so it is an input. Comparing it with the limit is the process. The line should start 'Input:'.
Q4
B — A high-score table must be kept after the game ends, so something is missing from storage. It should be 'Storage: names and top scores'.
Q5
D — The sprinkler switching on is a result the system produces, so it is an output. It should be 'Output: sprinkler turns on'.