The subroutine symbol in a flowchart

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

The subroutine symbol in a flowchart

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. Which shape is the subroutine symbol in a Cambridge flowchart?
A A rectangle with double lines down both sides
B A plain rectangle with single lines
2. What does a subroutine symbol in a main flowchart stand for?
A A call to a subroutine drawn in a separate flowchart
B A single input from the user
3. Where are the steps of the subroutine drawn?
A In a separate flowchart
B Inside the subroutine symbol itself
4. How does a structure diagram link to subroutine symbols in the main flowchart?
A All the boxes are squeezed into one subroutine symbol
B Each box of the structure diagram gets one subroutine symbol
5. How does a separate subroutine flowchart begin and end?
A It has no Start or End because the main flowchart supplies them
B It has its own Start and End

Match the Pairs

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

Left columnRight column
1A rectangle with double lines down both sides, labelled CalculateTotal AMain flowchart: Start, then the symbols CheckPassword and LoadMenu, then End. The decisions and loops are drawn in their own flowcharts
2A separate flowchart for CalculateTotal that begins with its own Start and finishes with its own End BStructure diagram boxes: GetMarks, CalculateAverage, ShowGrade. Main flowchart: Start, then three double-sided rectangles with those names, then End
3Each box in the second level of a structure diagram becomes one subroutine symbol in the main flowchart CThe separate flowchart is missing its own Start and End. It should begin with a Start terminator (with the subroutine name) and finish with an End terminator.
4The main flowchart stays short because the detailed steps are hidden inside the subroutine flowcharts DThe detailed steps of the subroutine, drawn apart from the main flowchart
5A plain process rectangle (no double side lines) labelled CalculateTotal used to call a subroutine EA subroutine symbol: a call to the subroutine CalculateTotal, whose steps are drawn in a separate flowchart
6A subroutine flowchart for CalculateTotal with no Start or End terminator, only the steps FA plain rectangle is a process symbol, not a subroutine symbol. A subroutine call needs a rectangle with double side lines.

Definitions

Subroutine symbol

Fill in the Blanks

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

1.
____ GetMarks()
2.
PROCEDURE GetMarks() INPUT Mark ____________
3.
// Subroutine symbol: ______ side lines
4.
_________ GetMarks() INPUT Mark ENDPROCEDURE
5.
Start -> CALL GetMarks() -> ___

Spot the Error

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

Question 1
A Terminator: Start
B Process: GetMarks
C Subroutine: FindAverage
D Subroutine: ShowGrade
E Terminator: End
Question 2
A Process: Start GetMarks
B Input: mark1, mark2
C Process: total <- mark1+mark2
D Terminator: End GetMarks
Question 3
A Terminator: Start
B Subroutine: AskQuestions
C Terminator: End
D Subroutine: ShowScore
E Terminator: End
Question 4
A Terminator: Start FindMax
B Process: max <- highest temp
C Terminator: Start FindMax
Question 5
A Draw a rectangle
B Add a line inside each side
C Write subroutine name inside
D Draw steps in the main chart

Answer Key

The subroutine symbol in a flowchart
Section A: Quick Questions
Q1
A — A rectangle with double lines down both sides
Q2
A — A call to a subroutine drawn in a separate flowchart
Q3
A — In a separate flowchart
Q4
B — Each box of the structure diagram gets one subroutine symbol
Q5
B — It has its own Start and End
Section B: Match the Pairs
Q1
A rectangle with double lines down both sides, labelled CalculateTotal → A subroutine symbol: a call to the subroutine CalculateTotal, whose steps are drawn in a separate flowchart
Q2
A separate flowchart for CalculateTotal that begins with its own Start and finishes with its own End → The detailed steps of the subroutine, drawn apart from the main flowchart
Q3
Each box in the second level of a structure diagram becomes one subroutine symbol in the main flowchart → Structure diagram boxes: GetMarks, CalculateAverage, ShowGrade. Main flowchart: Start, then three double-sided rectangles with those names, then End
Q4
The main flowchart stays short because the detailed steps are hidden inside the subroutine flowcharts → Main flowchart: Start, then the symbols CheckPassword and LoadMenu, then End. The decisions and loops are drawn in their own flowcharts
Q5
A plain process rectangle (no double side lines) labelled CalculateTotal used to call a subroutine → A plain rectangle is a process symbol, not a subroutine symbol. A subroutine call needs a rectangle with double side lines.
Q6
A subroutine flowchart for CalculateTotal with no Start or End terminator, only the steps → The separate flowchart is missing its own Start and End. It should begin with a Start terminator (with the subroutine name) and finish with an End terminator.
Section C: Definitions
Q1
Subroutine symbol — A rectangle with double side lines. It stands for a call to a subroutine whose steps are drawn in a separate flowchart, which keeps the main flowchart short.
Section D: Fill in the Blanks
Q1
CALL GetMarks()
Q2
PROCEDURE GetMarks() INPUT Mark ENDPROCEDURE
Q3
// Subroutine symbol: double side lines
Q4
PROCEDURE GetMarks() INPUT Mark ENDPROCEDURE
Q5
Start -> CALL GetMarks() -> End
Section E: Spot the Error
Q1
B — A call to a subroutine uses the subroutine symbol (rectangle with double side lines), not a plain process rectangle. Line 2 should be Subroutine: GetMarks.
Q2
A — The separate flowchart has its own Start, and Start is drawn as a terminator (rounded oval), not a process box. Line 1 should be Terminator: Start GetMarks.
Q3
C — The main flowchart needs one subroutine symbol for every box of the structure diagram. Ending on line 3 skips MarkAnswers or ShowScore. Line 3 should be Subroutine: MarkAnswers.
Q4
C — The separate flowchart for a subroutine must have its own End as well as its own Start. Line 3 should be Terminator: End FindMax, not a second Start.
Q5
D — The steps of a subroutine are not drawn in the main flowchart. They go in a separate flowchart, which keeps the main one short. Line 4 should say to draw them in a new flowchart.