Easier to read with cream paper, a tint, more contrast or larger text? Choose your colours and text, once, for every page.

Free lesson

ESP task 3 (2 of 3): Design the screen and the data

The whole lesson, free. Read it and have a go at the activities. To work the tasks and labs in the real lesson, press Start lab, with no account needed.

45 minutes

A quick check that you are not a bot, then your own lab opens on the interactive lesson.

Already have an account? Sign in

The paper book is already a design

Look at the club's paper book. Somebody drew columns by hand with a ruler: day, hour, court, name.

Those columns are a data design. They say what the club needs to remember about every booking.

Your job is to design the same thing for a computer, and to design the screen the staff will use.

Key words

WordWhat it meansExample
InterfaceWhat the user sees and uses on the screen.a form with buttons
WireframeA simple plan of a screen with no colour or style.boxes and labels
FieldOne piece of information in a record.hour
RecordAll the fields about one thing.one booking
Data dictionaryA table that describes each field: name, type, example and rule.hour, integer, 10, 9 to 20
Data typeThe kind of value a field holds.integer or string
IntegerA whole number.10
FloatA number with a decimal point.4.5
StringText in quote marks."Sam"
BooleanTrue or False.True
CSVA plain text file where each line is a record and commas (,) separate the fields.Sam,1,10
AccessibilityMaking a tool usable by as many people as possible.clear labels, big buttons

The cells students fill in are left blank in this preview.

A data dictionary for a booking

FieldData typeExampleRule
memberstringSam Jones1 to 30 characters: letters, spaces, hyphens, apostrophes
is_memberBooleanTrueTrue or False
courtinteger1Only 1 or 2
hourinteger10From 9 to 20
pricefloat4.0Worked out, never typed

The cells students fill in are left blank in this preview.

Choose the data type of each field

Have a go

Choose the data type of each field

6 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Try it: a record becomes a CSV line

Code: python
booking = {"member": "Sam", "court": 1, "hour": 10}

line = booking["member"] + "," + str(booking["court"]) + "," + str(booking["hour"])
print(line)

back = line.split(",")
print(back)
print(int(back[2]) + 1)

# split(",") cuts the text at each comma.
# Why do we need int() on the last line?

Make a free account to save your work and track your progress.

How the screens link

flowchart LR
  home[Home: today's bookings] --> form[Booking form]
  form --> confirm[Confirmation and price]
  form --> error[Error: say what is wrong]
  confirm --> home
  error --> form
  home --> cancel[Cancel a booking]
  cancel --> home

Try it: a very simple form

Code: web
<h1>Book a court</h1>
<label for="name">Name</label>
<input id="name">
<label for="court">Court (1 or 2)</label>
<input id="court" type="number" min="1" max="2">
<label for="hour">Hour (9 to 20)</label>
<input id="hour" type="number" min="9" max="20">
<button>Book</button>

Make a free account to save your work and track your progress.

A clear form works for more people

Tip

Give every box a label that says what to type. Make buttons big. Do not use colour alone to show a mistake: say it in words too. A person with a small phone, or a person who cannot see well, must be able to use it.

Stage 3: make the booking form

This is stage 3 of the Hillside practice project. Make the booking form. Give every box a label. Limit the court to 1 or 2 and the hour to 9 to 20. Add a Book button. Make it simple for desk staff. Your teacher marks it from the preview.

Code: web
<h1>Book a court</h1>
<!-- Add a label and a box for the member's name. -->
<!-- Add a label and a box for the court (1 or 2). -->
<!-- Add a label and a box for the hour (9 to 20). -->
<!-- Add a Book button. -->

Make a free account to save your work, or press Start lab to work through the whole lesson.

Check: the screen and the data

Have a go

Check: the screen and the data

4 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Stage 3: your data dictionary

Make a data dictionary for the Hillside booking tool. Use a table with the columns Field, Data type, Example and Rule. Include at least member, court, hour, is_member and price. Then write three lines of the CSV file the tool would save. Last, say which field you would never show on a big screen and why.

A teacher marks this in a college. Nothing you write here is kept: it goes when you leave the page.

Make a free account to save your work, or press Start lab to work through the whole lesson.

Key words crossword

Have a go

Loading…

Your answers are marked here and are not kept. A college account keeps every student’s marks.

Final check

Have a go

Final check

5 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Teach this lesson with your class

On a college account your students work the tasks and the labs as well, and every mark is kept for you.