B2.2 · Explain alternative designs in words and diagrams
Learn to explain alternative designs in words and diagrams through clear examples and targeted practice.
Ontario Grade 11 Computer Science
Software Development
ICS3U study topic B2.2: Explain alternative designs in words and diagrams
When planning a program, there may be more than one reasonable way to organize its steps. A program that collects a name, for example, could ask once or check for a blank response and ask again. These are alternative designs: different plans for addressing the same task. Neither is automatically best. To explain a design well, describe its steps and show how it fits the task. Words make the reasoning clear; a diagram can make the order and choices easier to see.
What you will learn
Explain what alternative designs are and why different plans may suit a task.
Describe a design in clear words and represent its steps with an appropriate diagram.
Compare designs by connecting their differences to a task’s stated needs.
Trace a small example to check that its steps and outcome agree.
1. Begin with the task
A design is a plan for how a program handles input and provides an intended result. An alternative design is another plan for the same task. Before comparing plans, state what the task requires. This keeps the comparison focused on the actual goal rather than on personal preference.
Organize the task as input, process, and output. Input is information the program receives. Process is what the program does with that information. Output is what it displays or otherwise provides. For a program that asks for a name, the input is the name, the process may check whether it is blank, and the output may be a greeting.
Suppose the task is to ask for a name and display a greeting. One plan asks once and displays the greeting. Another checks whether the response is blank and asks again if needed. Both address the general goal, but only the second includes a blank-response check. Whether that extra step is appropriate depends on what the task requires.
Use specific language to explain the steps. Instead of saying “the program handles the input,” say “the program asks for a name, then displays a greeting containing that name.” Naming the input, action, and result makes a design easier to understand and compare.
State the task and its expected input and output.
Describe the steps in the order they happen.
Compare designs against stated requirements, not unstated preferences.
2. Show a design with words and diagrams
A diagram can make the order of a design’s steps visible. A flowchart is useful when a plan includes actions or a decision. Arrows show what happens next. A decision has branches, often labelled Yes and No, so a reader can follow each possible route.
In the name example, a flowchart can show the program asking for a name, checking whether it is blank, and returning to the prompt for a blank response. The other route continues to the greeting. The diagram should show exactly what the written explanation describes: if the words say “ask again when blank,” there must be a route that returns to the question.
Label steps and branches so someone who did not create the design can follow it. A diagram is not decoration, and it does not replace a clear explanation. Use it when it helps show the plan; do not add steps or outcomes that the task does not describe.
Use arrows to show the order of steps.
Label each decision branch and make its next step clear.
Check that the diagram and explanation describe the same plan.
3. Compare alternatives fairly
A fair comparison identifies the actual difference between plans and explains why it matters for the task. One design might ask for input once, while another repeats the question until a condition is met. The second design includes an extra route. It fits a task that requires a valid response before continuing, but that route may not be needed if the task does not include that requirement.
Keep the explanation grounded in the task. You can say that one plan includes a check, skips a check, or allows a particular outcome. Avoid claims that a design is always faster, safer, or better unless the task gives a reason for that conclusion.
A clear comparison can describe the first plan, describe the alternative, and then connect their difference to the task. At this level, the goal is to communicate the plans and their fit using understandable words and diagrams.
Identify the difference between the plans.
Explain how that difference affects the task.
Avoid unsupported claims that one plan is universally best.
4. Explain and check your own design
A useful explanation makes it possible for another person to follow the plan without guessing. State what information enters the program, what steps follow, and what result the user can expect. If a choice changes the next step, describe both possible routes.
For a small example, imagine a task that allows up to two answers to a question. A design can ask once, check the answer, and provide a second opportunity if the first answer is incorrect. After the second answer, it provides a result and finishes. Explaining that sequence in words helps a reader understand the plan; a flowchart can show the same sequence with arrows.
Before presenting a design, compare its description and diagram. Do they show the same actions? Does each decision route lead somewhere clear? Does the plan stop where the task says it should? These checks help keep the explanation faithful to the task.
This expectation focuses on explaining alternative designs in words and diagrams. Choose a representation that makes the relevant steps clear, and avoid adding rules that the task does not state.
Explain the inputs, actions, choices, and results in plain language.
Make the stopping point clear when the task gives one.
Ensure the diagram agrees with the written explanation.
Trace for the two-attempt example
Attempt
Input
Check against 6
Next design step
1
4
Not equal
Allow the second attempt
2
6
Equal
Show success and finish
Menu design comparison
Design
What the user sees
What the explanation should clarify
Separate lines
One choice on each line
All choices appear before input
Numbered block
Choices grouped with numbers
Which number matches each choice
Worked example
Ask once or repeat until a name is entered?
A program should collect a name and display a greeting. Compare a design that asks once with one that asks again if the response is blank. Which design fits a task that requires a non-blank name before displaying the greeting?
Repeated name prompt
A blank response returns to the prompt; a non-blank response continues to the greeting.
State the shared task
Both designs receive a name and aim to display a greeting. The added condition is that the name must not be blank before the greeting appears.
Compare the plans
The one-question design asks once and proceeds to the greeting, so it has no step for checking a blank response. The repeated-question design checks the response and returns to the question when it is blank.
Choose for the stated need
The repeated-question plan fits this task because it accounts for blank input and continues to the greeting only after a name is provided. This conclusion follows from the stated condition; it does not mean that repeating questions is always preferable.
Answer: Use the repeated-question design for this task. It accounts for blank input before displaying the greeting, while the one-question design does not.
Check: The comparison states the shared goal, identifies the difference, and connects the choice to the task’s condition.
Worked example
Two attempts or keep asking?
A practice program asks the learner to enter the answer 6. Compare a plan that allows two attempts with one that keeps asking until the answer is 6. The task says the program must allow at most two attempts.
Two-attempt plan
A correct first answer finishes; otherwise a second answer is allowed, followed by an end point.
Describe the input and result
The input is an answer from the learner. The program checks whether it matches 6 and provides a result, such as a success message or a message that attempts are finished.
Trace the two-attempt plan
Suppose the inputs are 4 and then 6. The first input does not match, so the plan allows a second attempt. The second input matches, so the program can report success and stop. If both inputs were different from 6, the plan would stop after the second attempt.
Compare with the repeating plan
A plan that keeps asking until the answer is 6 has no stated limit on attempts. That conflicts with the task’s maximum of two. The two-attempt plan fits because it stops after the allowed opportunities, whether or not the answer is correct.
Answer: The two-attempt design fits the stated limit. The repeating design does not show how it will stop after two incorrect attempts.
Check: The input sequence is traced in order, and the selected plan respects the maximum of two attempts.
Worked example
Two ways to present a short menu
A program displays three choices: View, Add, and Quit. Compare displaying the choices as three separate lines with displaying them as one numbered block. Both designs then ask the user to choose a number. Explain what should be clear in the design.
Identify what stays the same
Both plans present the same three choices and ask for a selection. The display arrangement differs, but the choices and requested input should remain consistent.
Explain the alternatives
The separate-line design displays each choice on its own line. The numbered-block design displays the choices together with a number beside each one. If the program asks for a number, the menu should show which number corresponds to each choice.
Check the design against the task
Either display plan can fit if it presents all three choices clearly and makes the requested input understandable. The task gives no reason to claim one arrangement is always better. A good explanation describes the difference and shows how the selection relates to the displayed choices.
Answer: Both display designs can fit. Whichever is selected, the menu should show all three choices and make clear what number the user should enter for each one.
Check: The comparison describes the presentation difference without claiming that one arrangement is always superior.
Common mistakes and how to avoid them
Calling one design better without naming a task requirement it meets.
Correction: Name the requirement and explain how the design’s steps address it.
Drawing a decision without labelling its routes.
Correction: Label each branch, such as Yes and No, and explain what follows on each route.
Writing an explanation that disagrees with the diagram.
Correction: Compare the words and arrows step by step, then revise either one until they match.
Assuming a program should keep asking until it gets the desired input.
Correction: Follow the task’s stated stopping condition or attempt limit. Do not add a rule the task does not give.
Lesson summary
Alternative designs are different plans for addressing the same task.
State the task’s input, process, and output before comparing plans.
Use words to explain steps and diagrams to show order and choices.
Identify a real difference and connect it to the task’s needs.
Check that the words, diagram, and stated outcome agree.
Check your understanding
Question 1
A task says to ask for a response once and then display it. Which statement best describes a matching design?
The program handles the response in a useful way.
The program asks for a response, then displays the response entered.
The program keeps asking until it receives a preferred response.
The program displays a message before asking for any response.
Show answer and explanation
The program asks for a response, then displays the response entered.
This describes the input and next step without adding a repeated-question requirement.
Question 2
A flowchart has a decision asking whether a name is blank. What makes its routes understandable?
Label the branches to show what happens for each answer.
Remove the decision and leave the arrows unexplained.
Add a third route even though the check has two outcomes.
Use the word “better” as the label on both branches.
Show answer and explanation
Label the branches to show what happens for each answer.
Branch labels and connected steps show what the design does for each outcome.
Question 3
A task limits a learner to two answer attempts. Which design description fits?
Continue asking until the answer is correct, without a stopping limit.
Ask once and ignore the stated second attempt.
Allow a second attempt after an incorrect first answer, then finish.
Display the result before asking for an answer.
Show answer and explanation
Allow a second attempt after an incorrect first answer, then finish.
This plan includes the permitted second attempt and a stopping point after it.
Key terms
Design
A plan describing the steps a program follows for a task.
Alternative design
A different plan for addressing the same task.
Input
Information a program receives.
Output
Information or a result a program provides.
Flowchart
A diagram using labelled shapes and arrows to show program steps and choices.
Published by DoAssignment. This reviewed lesson follows Ontario Grade 11 Computer Science (ICS3U), expectation B2.2. It is a study resource, not an official curriculum publication.
Before publication, content is checked for structure, mathematical or chemical notation, calculations, course boundaries, and readability. Errors can still occur, so corrections are welcomed.