ICS3U Computer Science • Ontario Grade 11

Revision sheet: software development life cycle and program design (ICS3U)

This sheet is not a summary of the software development chapter of ICS3U, Introduction to Computer Science, Grade 11: you already have your notes.

What the sheet covers

It answers one question only, what makes students lose marks on the life cycle, specifications, flow charts, pseudocode, structure charts and schedules, and which precise gesture avoids each loss.

Most of these mistakes are answers that sound right: the project ends with testing, the critical path is the fastest way through, the programmer picks the boundary. The examples follow one small project, a voting app for a book club, and every number on this sheet is checked.

  • 9 mistakes that cost marks
  • 5 figures
  • 15 min reading
Do the chapter's exercises

The thread of the chapter

Each phase of the life cycle hands a product to the next one, and a project lasts as long as its longest chain of dependent tasks: what the analysis leaves open, a boundary or an input, and what lies on the critical path, a task with no slack, is what makes a program wrong or a project late.

Topics covered

  • Software development life cycle
  • Problem definition and analysis
  • Program specification
  • Input-process-output model
  • Milestones and products
  • Flow chart
  • Pseudocode
  • Structure chart
  • Top-down design
  • Gantt chart
  • Critical path and slack
  • PERT estimate

The essentials

The seven phases and what each one hands on

  • • Problem definition: what is wrong, in the words of the user. Analysis: the specification, with its inputs, outputs, rules and boundaries.
  • • Design: how the program will work, on paper, with a flow chart, pseudocode and a structure chart. Writing code: the program, with its comments.
  • • Testing: the program compared with the specification, row by row of a test plan, with bug reports for what fails.
  • • Implementation: the program installed, and its users shown how to work it. Maintenance: corrections and changes while the program is used.
  • • A milestone is a date with no duration, such as the specification signed; a product is a document or a program that a phase hands on.
  • • A change asked in maintenance starts the cycle again, from the problem it describes.
1. Problem definitiona statement of the problem2. Analysisthe specification: inputs, outputs, rules3. Designflow chart, pseudocode, structure chart4. Writing codethe program, with its comments5. Testingtest results, bug reports6. Implementationthe program installed, users shown7. Maintenancecorrections and new versionsdashed: a change asked in maintenance starts the cycle againThe life cycle: each phase hands its product to the next one
The seven phases from top to bottom, each with the product it hands on; the dashed line brings a change asked in maintenance back to the start.

On a question that orders the phases, write all seven: testing is the fifth, not the last.

Three ways to draw one design

  • • A flow chart shows the order of the steps with four shapes: rounded box for start and end, parallelogram for input or output, rectangle for a process, diamond for a decision.
  • • A diamond asks one Yes-or-No question and has two exits, each labelled with its answer; a loop is an arrow that goes back up to a diamond.
  • • Pseudocode gives the same order in plain words: INPUT, OUTPUT, SET ... TO, IF ... THEN ... ELSE, WHILE ... END WHILE, FOR i FROM 1 TO n, where n is included.
  • • A structure chart shows which module calls which: the whole task at the top, each module refined into smaller ones until each can be written alone.
  • • A module reached by two lines is called by two modules and written once.
main programread_votescount_votesshow_winnerread_voteTop-down design of a book-club voting appcalled once per member
The main program calls three modules; read_votes calls read_vote once per member. Each module is small enough to be written and tested separately.

The flow chart and the pseudocode answer « in which order? »; the structure chart answers « who calls whom? ».

Paths, critical path and slack

  • • A path is a chain of tasks that must follow one another; it lasts the sum of their durations.
  • • The project ends when its longest path ends: the longest path is the critical path, and its length is the minimum duration of the project.
  • • The slack of a task is the length of the critical path minus the longest path through the task. A critical task has no slack.
  • • A delay of d days on a task with slack s moves the end by d − s days if d is more than s, and not at all otherwise.
  • • Shortening a critical task shortens the project only until another path becomes the longest.

Write every path with its sum before you name the critical one: the comparison is the answer.

The rules in table form

Each row reads from left to right: the assumptions, then the result. A red cell is not an answer, it is the finding that the form settles nothing and the instruction to rewrite it. Every case is followed by a worked example.

From a flow chart shape to pseudocode and Python

Each shape of a flow chart, the pseudocode that says the same, and its Python line. Every Python line was run.

Flow chartPseudocodePython
parallelogram: read a number INPUT n n = int(input('Members: '))

Example: For an entry of 12, n holds the number 12, not the string '12'.

parallelogram: display OUTPUT total print(total)

Example: With total = 31, the screen shows 31.

rectangle: process SET total TO total + vote total = total + vote

Example: total = 27 and vote = 4 give total = 31.

diamond, two exits IF people > 10 THEN ... ELSE ... if people > 10: ... else: ...

Example: people = 12 takes the Yes exit, people = 10 the No exit.

diamond with an arrow back WHILE vote < 1 OR vote > 4 while vote < 1 or vote > 4:

Example: vote = 7 enters the loop again, vote = 3 leaves it.

counting loop FOR i FROM 1 TO 5 for i in range(1, 6):

Example: i takes the values 1, 2, 3, 4, 5: five passes.

counting loop FOR i FROM 1 TO 5 for i in range(1, 5): one pass short

Example: range(1, 5) gives 1, 2, 3, 4 only: the fifth member never votes.

What to do: range stops before its second bound: FOR i FROM a TO b becomes range(a, b + 1).

diamond with one exit IF people > 10 THEN ... no Python line not a decision

Example: For 8 people, the chart has no arrow to follow, so no program can be written from it.

What to do: Draw and label the No exit, even when it only goes on to the next step.

Translate word for word, comparisons included: < in the pseudocode stays <, ≤ becomes <=, and TO n includes n.

The mistakes that cost marks

These are the errors I correct most often in session. Each one costs marks on a paper, even when the reasoning behind it is right.

1. The last phase of the cycle

1 mark on a question that orders the phases, and more on « describe the life cycle »

What not to write

“The project is finished when every test passes.”

What to write

“After testing come implementation, the program installed and its users shown, then maintenance, which lasts as long as the program is used.”

Why: The curriculum lists seven phases; the users of a program find what the tests did not try, and their corrections belong to maintenance.

2. An open boundary in a specification

a wrong price for every group of 10, and a test plan to rewrite when the client sees it

What not to write

“The club wrote « groups over 10 get 15 % off »: I code people >= 10, the club will not mind.”

What to write

“« Over 10 » read literally means 11 or more, but a client may mean 10 and more: I ask whether a group of 10 gets the discount, then I code people > 10 or people >= 10 as answered.”

Why: Two programs that differ only at the boundary are both reasonable; only the client decides, and the question costs least during the analysis.

3. A decision in a flow chart

1 mark per diamond on a chart to draw, and a chart that cannot be followed for 8 people

What not to write

A diamond people > 10 ? with one exit, Yes, towards price = price * 0.85.

What to write

The same diamond with two exits, Yes towards the discount and No towards Display price, each labelled.

people > 10 ?price = price * 0.85YesWrong: one exit8 people: no arrow to followpeople > 10 ?price = price * 0.85Display priceYesNoRight: two labelled exits
On the left, a group of 8 has no arrow to follow; on the right, the No exit, labelled, leads past the discount to the display.

Why: A decision has two answers, and the chart must say where each one leads; an unlabelled exit leaves the reader to guess which answer it is.

4. Translating FOR ... TO

1 mark on the translation, and one member fewer at every vote

What not to write

“FOR m FROM 1 TO 5 becomes for m in range(1, 5):.”

What to write

“FOR m FROM 1 TO 5 includes 5: for m in range(1, 6):, five passes.”

Why: In pseudocode, TO n includes n; Python's range stops before its second bound.

5. Finding the critical path

the whole question, and every slack computed from it

What not to write

“The critical path is A, C, E, F: 7 days, the fastest way through the project.”

What to write

“The critical path is the longest path, A, B, D, E, F: 2 + 3 + 4 + 2 + 1 = 12 days. The project cannot end before day 12.”

A, 2 dB, 3 dC, 2 dD, 4 dE, 2 dF, 1 dLongest path, in red: A, B, D, E, F, 12 daysthe shortest path, A, C, E, F, lasts 7 days: C has 5 days of slack
The red chain, 12 days, sets the end of the project; the blue chain through C ends 5 days earlier, which is the slack of C.

Why: E waits for D as well as for C: the project ends when its slowest chain ends.

6. A delay on a critical task

1 to 2 marks on « what happens if this task is late? »

What not to write

“D can take one more day: there are other tasks to absorb it.”

What to write

“D is on the critical path, with no slack: one more day on D gives 13 days instead of 12.”

Why: A critical task has no slack: every day it loses moves the end of the project.

7. Shortening a task to finish sooner

1 to 2 marks, and effort spent where it changes nothing

What not to write

“C is shortened from 2 days to 1: the project ends one day sooner.”

What to write

“C is not critical: A, B, D, E, F still lasts 12 days, and so does the project.”

Why: Only the longest path sets the end; shortening a task off it only adds to its slack.

8. Input or constant

1 mark on an input-process-output table

What not to write

“The inputs of the book-club app are the number of members and the four book titles, which never change.”

What to write

“The input is what changes from one vote to the next, each member's vote; the four titles are constants of the process.”

Why: An input is typed or received at each run; a value written once in the program belongs to the process.

9. A milestone in a schedule

1 mark on reading a Gantt chart

What not to write

“The milestone « specification signed » lasts 2 days.”

What to write

“A milestone has no duration: it is the date when the specification is signed, the end of task A, day 2.”

Why: The 2 days are the task before the milestone; the milestone marks the moment it is done.

Which method to choose

Which tool answers the question?

Read what the question asks, then pick the tool.

  • If it asks what the program takes in, computes and gives out → an input-process-output table, the core of the specification

    Example: input: each vote; process: count per book; output: the winning title

  • If a word of the request leaves a boundary or a value open → a question to the client, in the analysis, that names both readings

    Example: Does a group of 10 get 15 % off?

  • If it asks in which order the steps run, with tests and loops → a flow chart or pseudocode

    Example: WHILE vote < 1 OR vote > 4, ask again

  • If it asks which module calls which → a structure chart, from the whole task down

    Example: main program, then read_votes, count_votes, show_winner

  • If it asks when the project ends, or which task can wait → the task table, its paths and its critical path, or the Gantt chart

    Example: A, B, D, E, F: 12 days; C has 5 days of slack

A question can need two tools: a flow chart answers the order, the specification answers what the boundaries are.

How the answer is expected to be written

A marker ticks steps. Here they are in order, with the concluding sentence expected word for word.

Finding the critical path on a unit test

When to use it: « What is the minimum duration of the project? Which tasks are critical? »

  1. 1 List every path from the first task to the last, following the column « must follow ».
  2. 2 Write each path with the sum of its durations.
  3. 3 Name the longest path: it is the critical path, and its sum is the minimum duration.
  4. 4 For a task off the critical path, give its slack: the critical length minus the longest path through the task.
  5. 5 For a delay, compare it with the slack of the task before you move the end.

Concluding sentence

“A, B, D, E, F lasts 12 days and A, C, E, F lasts 7 days: the critical path is A, B, D, E, F, the minimum duration is 12 days, and C has 12 − 7 = 5 days of slack.”

The trap: Naming the shortest path, or giving a delay on a critical task to the slack of another task.

Marking: A common split: 1 mark for the paths and their sums, 1 for the critical path and the duration, 1 for the slack.

Writing a specification from a request

When to use it: « Write the specification of this program » or « fill the input-process-output table »

  1. 1 Inputs: what the user types or the program receives at each run, with its unit and its valid values.
  2. 2 Outputs: what the program displays, in which form.
  3. 3 Process: the rules and the constants, written as the client stated them.
  4. 4 Boundaries: each « over », « between », « up to » written with its boundary included or not.
  5. 5 Questions: every boundary the request leaves open, sent to the client before the design.

Concluding sentence

“Input: the vote of each member, a whole number from 1 to 4. Output: the title with the most votes. Open question: which title wins when two titles tie?”

The trap: Listing a constant as an input, or closing an open boundary without asking.

Marking: A common split: 1 mark for the inputs, 1 for the outputs, 1 for the rules and their boundaries.

Check before you hand in

Five minutes of checking recover more marks than one more problem started in a hurry.

  • Seven phases, maintenance last

    Count the phases of your answer: seven, from problem definition to maintenance.

    Testing is the fifth phase; implementation and maintenance follow it.

  • Every diamond has two labelled exits

    Put a finger on each diamond: two arrows leave it, one Yes and one No.

    people > 10 ? needs a No arrow, even if it only leads to Display price.

  • The critical path is the longest

    Compare the sums of all the paths: the one you call critical has the largest sum.

    12 days against 7: A, B, D, E, F is critical, A, C, E, F is not.

  • TO n includes n

    In every translated FOR, the second bound of range is the last value plus one.

    FOR m FROM 1 TO 5 gives range(1, 6), five passes.

The typical problem, taken apart

Scheduling a book-club voting app

A class project led by the teacher builds a voting app for the school book club: each member votes for one of four books, and the app displays the winner. The tasks: A, specification, 2 days; B, design, 3 days, after A; C, test plan, 2 days, after A; D, code, 4 days, after B; E, testing, 2 days, after C and D; F, release, 1 day, after E. Each task has its own student.

Find the minimum duration of the project and its critical path, the slack of C, then the effect of a delay of 2 days on D, and on C.

Step 1

Paths from A to F: A, B, D, E, F and A, C, E, F, since E waits for both C and D.

Why

A path follows the « after » of each task from the first task to the last; a path left out may be the critical one.

Step 2

Sums: A, B, D, E, F = 2 + 3 + 4 + 2 + 1 = 12 days; A, C, E, F = 2 + 2 + 2 + 1 = 7 days.

Why

A path cannot be shorter than the sum of its tasks, since each one waits for the one before.

Step 3

Critical path: A, B, D, E, F, the longest; minimum duration 12 days. Slack of C: 12 − 7 = 5 days.

024681012days from the start of the projectA SpecificationB DesignC Test planD CodeE TestingF Releasespecification signedreleaseMilestonesGantt chart: red bars, the critical path

Why

The project ends when its slowest chain ends; C can lose up to 5 days before it delays E.

Step 4

D two days late: A, B, D, E, F becomes 14 days, and the project lasts 14 days. C two days late: its path becomes 9 days, under 12, and the project still lasts 12 days.

Why

The same delay costs 2 days on a critical task and nothing on a task with 5 days of slack.

The conclusion, written out

“The critical path is A, B, D, E, F, the minimum duration is 12 days, and C has 5 days of slack: 2 days late on D give 14 days, 2 days late on C change nothing.”

The classic mistake on this problem: Taking A, C, E, F, the shortest path, for the critical path and announcing 7 days: E cannot start before D ends, on day 9.

Learn by heart

  • • Seven phases: problem definition, analysis, design, writing code, testing, implementation, maintenance.
  • • A milestone is a date; a product is a document or a program a phase hands on.
  • • A specification lists inputs, process and outputs, every boundary settled with the client.
  • • Flow chart: rounded box, parallelogram, rectangle, diamond with two labelled exits.
  • • FOR i FROM a TO b is range(a, b + 1).
  • • A structure chart says who calls whom; a flow chart says in which order.
  • • The critical path is the longest path; its length is the minimum duration.
  • • A critical task has no slack: each day it loses, the project loses.

Frequently asked questions

What are the phases of the software development life cycle in ICS3U?

The Ontario curriculum lists seven phases: problem definition, analysis, design, writing code, testing, implementation and maintenance. Each phase hands a product to the next one, such as the specification after the analysis or the flow chart after the design. Testing is the fifth phase, not the last: the program is then installed, and maintenance follows it as long as it is used.

What is the difference between a milestone and a product in a software project?

A milestone is a date that marks the end of a step and has no duration, such as the day the client signs the specification. A product is something a phase hands on: a specification, a flow chart, the program itself, its documentation or a bug report. On a Gantt chart, tasks are bars and milestones are small diamonds.

How do you find the critical path of a project?

List every path of tasks that must follow one another, from the first task to the last, and add the durations along each path. The longest path is the critical path, and its length is the shortest time in which the whole project can be finished. The slack of any other task is the length of the critical path minus the longest path through that task.

What do the shapes of a flow chart mean?

A rounded box marks the start or the end, a parallelogram holds an input or an output, a rectangle holds a process such as a calculation, and a diamond holds a decision. A decision asks a Yes-or-No question, so its diamond has two exits, each labelled with its answer. Arrows give the order, and an arrow that goes back up to a diamond makes a loop.

Why should a programmer ask the client about a specification before coding?

Because the words of a request often leave a boundary open, such as whether a discount for groups over 10 also applies to a group of 10. Two programs that differ only at that value both look correct, and only the client can say which one is wanted. Asking during the analysis costs one question; finding out after testing costs rewritten code and test cases.

Mark this sheet as read or add it to your favourites: a free account, no password, keeps your read sheets and favourites from one visit to the next, tells you which chapter to tackle next and lets you ask for the method or exercise you are missing. Create your space, an email is enough.

Practise it

Corrected exercises: Software development life cycle and program design, ICS3U

A method is proved on a paper, not on a sheet. The set for the same chapter takes each of these traps into a problem, with the solution written out step by step.

  • 10 corrected exercises
  • 100 points
  • 150 minutes
Do the exercises
Something missing from this sheet? A method, a trap, an exercise to practise it, a mistake you spotted: tell me, I read every request.

Sending goes through your free space: that is how I can answer you and tell you when the exercise is added. An email is enough, no password. Create your space. Rather not create an account? Write to me directly.

What is it about?
I read every request myself, nobody else sees it. No need to write your name or your school.
When your request is dealt with, you hear about it by email and in your space.

By sending, you agree that I read your request to answer it. It is kept with your account, erased with it, and never published: privacy policy.

© Ahmed Squalli Houssaini. Revision sheet published at www.letuteurscientifique.ca/en/fiches/ics3u-software-development-life-cycle. Free for personal and classroom use; republishing it elsewhere requires written permission (legal notice).

Preparing for an ICS3U unit test?

I tutor Grade 11 computer science in English or in French, online. Get in touch for a first session.

Site by Studio Squalli