0% found this document useful (0 votes)
25 views12 pages

Unit 7 Mobile App-Devlopment Lesson 2

This document outlines a unit on mobile app development aimed at creating an educational app to help children improve their mental arithmetic skills. The app will feature a game with random arithmetic questions, three difficulty levels, and engaging graphics and sounds. It includes code snippets for the app's main menu and question handling, emphasizing user interaction and score tracking.

Uploaded by

712033
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views12 pages

Unit 7 Mobile App-Devlopment Lesson 2

This document outlines a unit on mobile app development aimed at creating an educational app to help children improve their mental arithmetic skills. The app will feature a game with random arithmetic questions, three difficulty levels, and engaging graphics and sounds. It includes code snippets for the app's main menu and question handling, emphasizing user interaction and score tracking.

Uploaded by

712033
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 12

UNIT 7: MOBILE

APPS DEVELOPMENT
Mr. K Douglas
Learning Aim

By the of this Unit, Learners should be able to:

 Investigate mobile apps and design and develop


an application intended for use on mobile
devices.
Scenario
You work as a junior programmer for an educational charity
which supports young children in developing Maths skills.
You have been asked to develop a mobile app which will
help children improve their mental arithmetic.
The app should run a game where the user has to answer a
series of simple random arithmetic questions (add,
subtract, multiply and divide) using whole numbers
between 1 and 12. Subtraction and division should not
produce negative answers. Each game should have 10
questions and the app should keep track of the score.
Three levels should be provided, level 0 has no time limit,
level 1 has a 20 second time limit per question and level 2
has a 10 second time limit per question. The app should
include suitable graphics and sounds (e.g. applause when
a correct answer is entered) to make it more engaging for
young children.
Objectives

Learners should be able to:


 Develop the app.
SCREEN 1
FORM 1 (Main MENU)
Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Form2.Show()
End Sub

Private Sub Button2_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles Button2.Click
Me.Hide()
Form3.Show()
End Sub

Private Sub Button3_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles Button3.Click
Me.Hide()
Form4.Show()
End Sub
End Class
SCREEN 2
Screen Title
Questions
Question (Label)
(Numbers
Label leave Answers for
blank) A-D (Label)
Answer
choices A-D
(Numbers
Label) Select answer
Select your A-D Combo
answer label box
Submit
Score label
Answer
(Button)
Next question
Text box to
(Button)
display your
score
FORM 2 – Level 1, 2 or 3
Public Class Form2
Dim question(10) As String
Dim choice(10, 4) As String Declaring all your
Dim Answer(10) As Char variables
Dim newquestion As Integer
Dim score As Byte

Private Sub Form2_Load(ByVal sender As


System.Object, ByVal e As System.EventArgs)
Handles MyBase.Load
question(1) =
"sdkjghdfjkbhjdkfhbjdj" Load Questions and
choice(1, 1) = "Dog" choices & Declaring
choice(1, 2) = "Cat" answers for all 10
choice(1, 3) = "rat" questions.
choice(1, 4) = "frog"
Answer(1) = "A"
REM questions and choices
newquestion = 1
LblQuestion.Text = question(newquestion)
LblChoice1.Text = choice(newquestion, 1) Calling the next
LblChoice2.Text = choice(newquestion, 2) question
LblChoice3.Text = choice(newquestion, 3)
LblChoice4.Text = choice(newquestion, 4)

score = 0
Label1.Text = newquestion Score after each
End Sub question.
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button3.Click
If CboAnswer.Text = Answer(newquestion) Then
'If TxtAnswer.Text = Answer(newquestion) Then
MsgBox("Well done")
score = score + 1
Checking if answers
are correct or not
Else
MsgBox("incorrect")

End If
newquestion += 1 (Next question number)
Lblscore.Text = score ( Showing the score)
TxtAnswer.Enabled = False
Button3.Enabled = False Disabling buttons
CboAnswer.Enabled = False
If newquestion > 3 Then
MsgBox("your score is" & " " & score)
TxtAnswer.Enabled = False
Button3.Enabled = False
CboAnswer.Enabled = False Showing the final
Button2.Enabled = False score
Button1.Visible = True
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
Label1.Text = newquestion Displaying questions
number
LblQuestion.Text = question(newquestion)
LblChoice1.Text = choice(newquestion, 1)
LblChoice2.Text = choice(newquestion, 2) Displaying questions
LblChoice3.Text = choice(newquestion, 3) from the array (2D
LblChoice4.Text = choice(newquestion, 4) Array)

TxtAnswer.Enabled = True
Button3.Enabled = True
CboAnswer.Enabled = True Enabling all the
End Sub buttons
Private Sub Button1_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
Me.Hide()
Form1.Show()
End Sub

End Class

You might also like