3 – Bourne Grammar Studios

🎯 Learning Objectives

Develop the Programming and Development learning strand:

  • Update the Tappy Tap App to display the user’s score
  • Start your app project:
    • Establish user needs and apply success criteria to help evaluate the success of your project
    • Start to design the solution to a real-world problem
💬 Key Vocabulary

  • Event-driven programming
  • variables
  • sequence
  • object properties
  • object ids
  • errors

📝 Starter Activity – Spot the errors

The Turtle Draw App

The purpose of this app is for the user to click the buttons on the screen to move the arrow on the screen and draw shapes.

Unfortunately, there are errors in the app and it is not working as the developer intended.

Debug the app

  • There are three errors in this program
  • Sign into your code.org account
  • Follow this link
  • Click View code and Remix
  • See if you can find and fix all the errors

Error 1: When the TurnLeft button is clicked the code instructs the object to turn right. This can be fixed by changing the block of code inside the event to ‘turnLeft(90)’.

Error 2: The onEvent to move the object right is linked with something with the id ‘TurnRight’. There is no object with that id. This can be fixed by either changing the id of the Turn button to ‘TurnRight’, or by changing the onEvent to be linked with the id ‘Turn’ and not ‘TurnRight’.

Error 3: The onEvent is waiting for an input and not a click. This can be fixed by changing the ‘input’ to ‘click’.

📝 Activity 1 – User Score

We’re now going to apply the final touches to our Tappy Tap App by doing the following:

  • Designing the score screen
  • Adding code to pass the score to the score screen

Instructions

  • Get into your pairs from the last lesson
  • Open the app that you developed in the previous lesson
  • If you were absent from the last lesson, open and remix this app.

Score screen design

  1. Enter design mode and select the score screen.
  2. Add a label and place it where you would like the score to appear.
  3. Change the id to userScoreLbl.
  4. Format the font, size, and position (change the text property to an example score, such as 10).

Passing the score into userScoreLbl

We’re going to add code to our app, to tell our program to:

Set the text of the userscore label to the value being held by our score variable.

Where should we place this code?

Think/pair/share

Add the following block of code into the correct position.

Customise the properties so that it changes the text to the value of the score variable.

Explorer: Add and code a Play again button.

📖 Bourne Grammar Studios

Bourne Grammar Studios is a company that specialises in mobile apps.

You and your partner have been hired to develop a prototype for one of the new apps that they would like to build.

Bourne Grammar Studios: App Choices

Choose your project

You and your partner can now choose your project.

  • Open the project diaries for each project
  • Spend time reading the options and the requirements of each program
  • Make a copy of the project PowerPoint file that you are going to work on
  • Share the project diary with your partner and your teacher so both have full access

Success criteria

Success criteria are used at the end of a project to help judge its success, for example:

Each round must ask 10 questions.

Success criteria should allow for factual yes/no answers.

What is wrong with the following criterion?

Must be easy to use.

Success criteria for your app

Discuss with your partner what you think the app should do.

Write down in your project diary success criteria that reflect what you intend your app to be able to do.

Remember that success criteria should only allow for factual yes/no answers.

In this lesson, you…

  • Identified and resolved some common errors using App Lab
  • Passed the value of a variable into a label
  • Chose a project to create and developed success criteria

Next lesson, you will…

  • Learn how to handle user input
  • Use decomposition to help break down the task of building the app into more manageable steps
  • Start making your app

🏅 Badge it

🥈 Silver Badge

🥇 Gold Badge

  • Complete the explorer task in the Passing the score into userScoreLbl activity and upload a screenshot to www.bournetolearn.com.
🥉 Platinum Badge

  • Complete the success criteria in your chosen app project and upload a screenshot to www.bournetolearn.com.