The analysis stage

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

The analysis stage

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. Which stage of the program development life cycle comes first?
A Coding
B Analysis
2. Which task belongs to the analysis stage?
A Working out exactly what the program must do
B Writing the program in a programming language
3. A student starts typing code before they understand the problem. What has gone wrong?
A They skipped analysis
B They finished the testing stage early
4. Which is a purpose of abstraction during analysis?
A Keeping the important details and removing unnecessary ones
B Adding as many extra details as possible
5. Which describes decomposition at the analysis stage?
A Joining several small programs into one file
B Breaking a large problem into smaller sub-problems

Match the Pairs

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

Left columnRight column
1Analysis AThe first stage of the PDLC, where the programmer works out exactly what problem must be solved and what the program must do
2Abstraction BDecomposition
3During analysis, a big problem is split into smaller sub-problems that are easier to solve CAnalysis -> Design -> Coding -> Testing
4Analysis happens before any design or coding, so the first stage comes before flowcharts, pseudocode and program code DDrawing a flowchart is a design task, not analysis. Analysis identifies the problem and requirements, using abstraction and decomposition.
5A student starts writing code in the analysis stage EKeeping only the details needed to solve the problem and hiding the ones that are not needed
6Analysis: draw a flowchart of the algorithm FCode is written in the coding stage, not in analysis. Analysis only works out the problem and what the program must do, before any design or code.

Definitions

Analysis

Fill in the Blanks

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

1.
// Stage 1: ________ // Work out what the program must do
2.
// Analysis comes ______ design and coding
3.
// Use ___________ to ignore extra detail
4.
// _____________ splits a problem into parts
5.
// Analysis lists the ____________

Spot the Error

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

Question 1
A OUTPUT "Stage 1: Analysis"
B OUTPUT "Stage 2: Design"
C OUTPUT "Stage 3: Testing"
D OUTPUT "Stage 4: Testing"
Question 2
A Stage1 ← "Coding"
B Stage2 ← "Design"
C Stage3 ← "Coding"
D Stage4 ← "Testing"
Question 3
A // Problem: bus timetable app
B // Keep: paint colour
C // Ignore: paint colour
Question 4
A // Decompose: join problems
B // Part 1: ask questions
C // Part 2: mark answers
D // Part 3: show score
Question 5
A Problem ← "Mark a test"
B Input ← "Final score"
C Output ← "Final score"
D Process ← "Compare answers"

Answer Key

The analysis stage
Section A: Quick Questions
Q1
B — Analysis
Q2
A — Working out exactly what the program must do
Q3
A — They skipped analysis
Q4
A — Keeping the important details and removing unnecessary ones
Q5
B — Breaking a large problem into smaller sub-problems
Section B: Match the Pairs
Q1
Analysis → The first stage of the PDLC, where the programmer works out exactly what problem must be solved and what the program must do
Q2
Abstraction → Keeping only the details needed to solve the problem and hiding the ones that are not needed
Q3
During analysis, a big problem is split into smaller sub-problems that are easier to solve → Decomposition
Q4
Analysis happens before any design or coding, so the first stage comes before flowcharts, pseudocode and program code → Analysis -> Design -> Coding -> Testing
Q5
A student starts writing code in the analysis stage → Code is written in the coding stage, not in analysis. Analysis only works out the problem and what the program must do, before any design or code.
Q6
Analysis: draw a flowchart of the algorithm → Drawing a flowchart is a design task, not analysis. Analysis identifies the problem and requirements, using abstraction and decomposition.
Section C: Definitions
Q1
Analysis — The first stage of the PDLC: work out exactly what problem must be solved and what the program must do, using abstraction and decomposition, before any design or code.
Section D: Fill in the Blanks
Q1
// Stage 1: Analysis // Work out what the program must do
Q2
// Analysis comes before design and coding
Q3
// Use abstraction to ignore extra detail
Q4
// Decomposition splits a problem into parts
Q5
// Analysis lists the requirements
Section E: Spot the Error
Q1
C — The PDLC order is Analysis, Design, Coding, Testing. Stage 3 should be Coding, not Testing, because there is no program to test until it has been coded.
Q2
A — Analysis is the first stage of the PDLC. Stage1 should be "Analysis", because the problem must be understood before any coding.
Q3
B — Abstraction keeps only the details needed to solve the problem. Paint colour is irrelevant to a timetable app, so it should be ignored, and the kept details should be the bus number and time.
Q4
A — Decomposition means splitting a problem into smaller sub-problems, not joining problems together. The line should say split.
Q5
B — The final score is produced by the program, so it is an output. The input at the analysis stage is the student answers.