Week 28 · Unit 12: Be a problem solver · 3 lessons
2
Designing the screen
Computing 6: Unit 12, pp. 162–177
GoalDesign a simple graphical interface from user requirements with clear buttons, prompts and outputs.
New words
interface · the part of a program that the user sees and uses to enter information and get resultsgraphical user interface · an interface with pictures, buttons and icons that users click or tap (GUI)prompt · a message that tells the user what to do or what to typeuser requirement · something that the user needs the program to do
Explanation
An interface is how a user and a program exchange information. In a graphical user interface, or GUI, the user clicks or taps buttons and icons. To design one, start with the user requirements, which are the things that the user must be able to do. Then give each requirement a part of the screen. Choices usually need buttons, typed data needs a prompt, and results need an output area. A good interface has clear words on the buttons, buttons that are large enough, text that is easy to read against its background and prompts that say what to type and which values are allowed. In Scratch a sprite with text on its costume can be a button, an ask block makes a prompt, and a say block or a variable shows the output.
User requirement
Part of the interface
choose an item
a button for each item
say how many
a prompt that asks for a number
see the total
a text display for the output
start again
a ‘new customer’ button
Worked examples
Requirement
Design
R1: choose cake or biscuit
two buttons, CAKE and BISCUIT
R2: type how many
prompt ‘How many (1 to 8)?’
R3: see the total
a TOTAL display next to the buttons
R4: start again
a button ‘NEW CUSTOMER’
Here a bake sale till is designed from four requirements. Every row of the table must be met before the design is finished.
This is a sketch of the stage with the sprites placed at their coordinates. The two buttons and the total display are in one row near the top of the stage.
Poor design
Better design
a tiny button with no words
a large button with words
the prompt ‘Number?’
the prompt ‘How many biscuits (1 to 8)?’
pale yellow words on a white button
dark words on a light button
Small design changes make a big difference to the user. Compare the poor choices with the better ones.
Class activity
Interface critique (no computer): look at a real interface with an adult, such as a lift panel, a vending machine or a bus ticket machine. List what you can press, what it asks you and what it shows. Then design on paper a screen for a school canteen order machine. First write three user requirements. Next draw the design and tick each requirement. Swap with a friend: can they use your design without help? Find one unclear word or button in the design of your friend. If you have a computer or tablet, think about how you would build the design in Scratch.
Practice
1
Match each requirement to a part of the interface: button, prompt or output display.
Requirement
Interface part
the user picks a drink size
?
the user types their name
?
the program shows a message at the end
?
Choosing a drink size needs buttons. Typing a name needs a prompt. Showing a message at the end needs an output display (for example a say block).
2
Name two problems with this screen design.
Part
Design
Button 1
light grey words on a white button
Button 2
large, dark words: START
Prompt
‘Type here’
Button 1 is hard to read, because light grey words on a white button have very little contrast. The prompt ‘Type here’ does not say what to type or which values are allowed.
3
Write a clear prompt for a pizza stall that asks for the number of slices and allows 1 to 4.
For example: ‘How many slices do you want (1 to 4)?’
4
Why should a button show words or a picture?
The user must know what the button does before pressing it. Words and pictures tell them.