Software Design

Learning Intentions

• Think in a logical, problem-solving way using computational thinking
• Design a computer program using recognised design techniques
• Identify and describe inputs and outputs to a computer program

Success Criteria

• I can explain the term software design
• I can think in a computational way to solve problems
• I can design solutions to problems

Problems and Solutions

• A problem is normally what a computer program spawns from.
• A computer program is often referred to as the solution.
• Before a solution is created, a programmer normally sits down with pen and paper and designs a solution.
• A problem may be as simple as something not existing (for example an app) and the solution may be as simple as creating it

Take the following problem:

• A program stores a list of all users who are members of a club. It also stores a list of all members who have signed up for an event. It also stores the details of all members on the system.
• How can we obtain the list of members who have not signed up for an event?

Designing a solution

• Designing the solution to a problem can be accomplished using a recognised design technique such as:
• Data flow diagrams
• Pseudocode
• Flow charts
• Structure diagrams
• We will be looking at data flow diagrams, pseudocode, flow charts and structure diagrams over the next few lessons

Identifying inputs and output

• Identifying inputs and outputs will often help develop the solution to a problem.
• Whenever you sit down to think about a program, the first step should be to think about what inputs you have as this will also help you develop your variables.
• The following is an example of a simple data flow diagram.

Program specification - Example

• Write a program that takes in three tests scores and calculates and displays the average of the three test scores.

Inputs
Test score 1
Test score 2
Test score 3

Outputs
Average

A program is required to allow the user to guess a number. The program displays the number when the user types in the correct number.

Specify the input(s) and output(s) for this program.

Pseudocode

• Pseudocode is a written design notation that is not based on any programming language. It is not written in English, but it is also not written in a formal code syntax.
• When creating pseudocode, it is important to remember:
• To define the steps of the main program
• To refine the main steps where possible (not all main steps need refined)
• That there is no need to declare variables
• Indentation should be used to help identify use of loops and selection statements

Pseudocode

• A program is to be developed to create usernames for a class of twenty pupils
• The program will ask a teacher to enter the first name, surname and age of each pupil.
• The age entered must be between five and eighteen.
• The program should output a list of usernames for the teacher.

A pseudocode solution for this could be:

Pseudocode

• A program is to be developed to create usernames for a class of twenty pupils
• The program will ask a teacher to enter the first name, surname and age of each pupil.
• The age entered must be between five and eighteen.
• The program should output a list of usernames for the teacher.

A pseudocode solution for this could be:

• Start fixed loop for twenty pupils
• Get first name and surname from user
• Get valid age from user
• End fixed loop

Flowcharts

• Flowcharts are another method of design.
• Flowcharts use special shapes to represent the flow of a program.
• Flowcharts are a visual design technique.

Flowcharts - shapes

• Flowcharts are another method of design.
• Flowcharts use special shapes to represent the flow of a program.
• Flowcharts are a visual design technique.

Flowcharts - shapes

• Design a program to ask the user to enter their pocket money for three weeks and calculate the total.

``````week_pocket_money = 0
total = 0
counter = 0

while counter < 3:
week_pocket_money = int(input())
total = total + week_pocket_money
counter = counter + 1``````

Flowcharts - shapes

• Design a program to ask the user to enter their pocket money for three weeks and calculate the total.

``````week_pocket_money = 0
total = 0
counter = 0

while counter < 3:
week_pocket_money = int(input())
total = total + week_pocket_money
counter = counter + 1``````

Think about when you make toast and transform this into pseudocode and a flow chart (symbols are given below).

1. Complete the worksheet on Google Classroom by producing lists of inputs and outputs, pseudocode (or steps that help us understand the processes better), flowcharts and code for each of the problems.
2. When you finish that, select a program you have built using Python and try to produce a flowchart that represents the steps in it.

Structure diagrams

• Structure diagrams are another method of design. Like flowcharts, they use special shapes to represent the flow of a program.
• Like flowcharts, they are a visual design method.

Example

Design a program to ask the user to enter their pocket money for three weeks and calculate the total.

1. Finish the worksheet on Google Classroom, but now add structure diagrams to them as well.

Plenary

How well do you think you have achieved your learning criteria for this lesson?

1. I can explain the term software design
2. I can think in a computational way to solve problems
3. I can design solutions to problems
Presentation Overview
Software Design
12:39 | 07-12-2023
!
Keywords
Random selector
Sections
Binary conversion
Denary to binary conversion
Binary to denary conversion
Feedback 👍
Accessibility

Apply a filter:

×
All slideshow files