1 of 16

Lesson 1: App for that

Year 8 – Programming – Mobile app development

2 of 16

Lesson 1: App for that

Objectives

In this lesson, you will

  • Identify when a problem needs to be broken down
  • Implement and customise GUI elements to meet the needs of the user

2

3 of 16

App for that

Starter activity

3

4 of 16

What is your ‘app for that’?

Starter activity

You have five minutes to work in pairs.

Think of an idea for an app that could have a positive impact on the world.

Think about how the user will interact with the app.

Write your ideas on a sticky note and bring it to the front.

4

5 of 16

The Tappy Tap App

Activity 1

Over the next two and half lessons we will develop a new app called the Tappy Tap App. It will:

  • Get users to click a moving blue dot as many times as they can within a time limit
  • Give the user a point for each accurate click on the blue dot
  • Move the blue dot each time it is clicked

5

6 of 16

Decompose the problem

Activity 1

Decomposition is breaking a problem down into more manageable chunks.

Programming an app for a mobile device can be a daunting task to undertake.

Decomposing the problem helps us make the task less daunting and more achievable.

6

7 of 16

Decompose the problem

Activity 1

Imagine that your job is to make the first level of a new platform game.

You might start by decomposing the problem in the following way:

  • Create the layout of the level
  • Add a user-controlled character
  • Add enemies
  • Add score, timer, and power-ups

7

8 of 16

Continue decomposing

Activity 1

When you arrive at each decomposed step, you can now decompose it further.

How might you decompose the ‘player movement’ step further?

  • Add left and right movement
  • Add a gravity effect
  • Add the ability to jump

8

9 of 16

Success criteria

Activity 2

Welcome screen:

  • Must show logo and instructions on how to play
  • Must have a button that activates the game play once clicked

Game play:

  • The game must last 15 seconds before automatically moving to the final score screen
  • There must be a blue dot and a red dot that the user can press
  • When the blue dot is pressed, the score must increase by one
  • When the blue dot is pressed, the dot should move to a different place on the screen
  • The red dot must also move to a different place on the screen when pressed, but the score will decrease by one

Final score:

  • Must display the user’s score at the end of the game
  • Must have a button to allow the user to return to the welcome screen

9

10 of 16

Decompose the Tappy Tap App

Activity 2

Look at the requirements of the Tappy Tap App on your worksheet.

How would you decompose the problem?

Think/write/pair/share.

10

11 of 16

Activity 2

How did you decompose the problem?

11

12 of 16

App Lab

Activity 3

12

13 of 16

App Lab demonstration

Activity 3

  • Log into App Lab using the login details given to you
  • Browse to ‘Start a new project’
  • Select App Lab
  • Rename your project ‘Tappy Tap App’
  • Add a button to the screen

13

14 of 16

Design the home screen

Activity 4

Your task is to implement the design of the welcome screen (don’t forget to rename ‘screen1’ as ‘welcome screen’).

Use your success criteria to help, as well as the sketched design on the right.

Explorer tasks:

  • Add a new game screen
  • Watch the following video (ncce.io/AppLabA4)
  • Code the button to open the game screen

14

15 of 16

Play your future Tappy Tap App

Plenary

Visit the following URL to play the game:

ncce.io/TappyTapAppL1

After a couple of goes, look at your success criteria and ask yourself whether or not the game meets all the criteria.

15

16 of 16

Next lesson

Summary

In this lesson, you…

Learnt why decomposition is important and how to apply it to your project

Designed the welcome screen for your app and customised the properties

Next lesson, you will…

Develop your app further by using code to add functionality to the objects the user interacts with on the screen

16