unit 8 – mobile development€¦  · web viewthe purpose is to create a windows phone alphabet...

18
UNIT 8 – MOBILE DEVELOPMENT Task 1 – Nicholas Robinson (1598235125)

Upload: others

Post on 18-Sep-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: UNit 8 – mobile development€¦  · Web viewThe purpose is to create a Windows Phone alphabet game to teach young kids the alphabet, the application will include 6 letters, each

UNit 8 – mobile development

Task 1 – Nicholas Robinson (1598235125)

Page 2: UNit 8 – mobile development€¦  · Web viewThe purpose is to create a Windows Phone alphabet game to teach young kids the alphabet, the application will include 6 letters, each

Proposed Solution

Purpose:

The purpose is to create a Windows Phone alphabet game to teach young kids the alphabet, the application will include 6 letters, each will have an assigned sound file with the same name, however it will include a sound file format, not an image. This application will be written in XAML for the buttons and layout, however C# will contain the events, voids and methods. This application needs to be written in Visual Studio, easy to use and basic colours.

User Requirements:

Accessibility Features:

What programming language is it written in? XAML What SDK did you develop your application in? Windows Phone SDK – Visual Studio. Is the code written together or separated out e.g. html separate to C#? What platform it is written on? Windows Phone. Is the application and design user friendly? Yes, it will have big fonts and colour, so it can be easily

read and understood. Does it have any accessibility features? Helpful feature colour options for people and youngsters, who

have visual coloured impairness. 6 letters, including letters to their corresponding first letter.

Predefined codes/programs:

Uri uri1; //variable for first image

Uri uri2; //variable for second image

Uri uri3; //variable for third image

Uri uri4; //variable for fourth image

string soundFile = "";

Random randomIndex = new Random();

int number;

int score; //keep a count of the score

int check;

Page 3: UNit 8 – mobile development€¦  · Web viewThe purpose is to create a Windows Phone alphabet game to teach young kids the alphabet, the application will include 6 letters, each

InitializeComponent();

//call method to load images and sounds

loadImagesSounds();

public void loadImagesSounds()

{

listColoursL1.Add("orange");

listColoursL1.Add("blue");

listColoursL1.Add("red");

listColoursL1.Add("yellow");

}

public void checkCount()

{

if (check > 4)

{

txtCheckCount.Text = "Game Over";

btnPlay.IsEnabled = false;

check = 0;

}

else

{

txtCheckCount.Text = check.ToString() + " attempts taken" + " Score: " +score.ToString();

}

}

public void loadImages()

Page 4: UNit 8 – mobile development€¦  · Web viewThe purpose is to create a Windows Phone alphabet game to teach young kids the alphabet, the application will include 6 letters, each

{

//set the variable with the first image

uri1 = new Uri("/Assets/" + listColoursL1[0] + ".png", UriKind.Relative);

img1.Source = new System.Windows.Media.Imaging.BitmapImage(uri1);

uri2 = new Uri("/Assets/" + listColoursL1[1] + ".png", UriKind.Relative);

img2.Source = new System.Windows.Media.Imaging.BitmapImage(uri2);

uri3 = new Uri("/Assets/" + listColoursL1[2] + ".png", UriKind.Relative);

img3.Source = new System.Windows.Media.Imaging.BitmapImage(uri3);

uri4 = new Uri("/Assets/" + listColoursL1[3] + ".png", UriKind.Relative);

img4.Source = new System.Windows.Media.Imaging.BitmapImage(uri4);

}

private void Play_Click(object sender, RoutedEventArgs e)

{

//call the method to load the colours when the play button is pressed

loadImages();

//select a random number between 0 and 4

number = randomIndex.Next(0, 4);

//select a random number between 0 and 4

soundFile = listColoursL1[number];

//set the source code for the sound

SoundClip.Source = new Uri("/Assets/" + soundFile + ".mp3", UriKind.Relative);

//set to play

SoundClip.AutoPlay = true;

SoundClip.Play();

Page 5: UNit 8 – mobile development€¦  · Web viewThe purpose is to create a Windows Phone alphabet game to teach young kids the alphabet, the application will include 6 letters, each

}

List of assets:

File name Description Source

btnStart Start button, to start the game.

Visual Studio.

btnHelp Help button, to take you onto the help page..

Visual Studio.

btnPrevious Previous button. Visual Studio.

btnNext Next button. Visual Studio.

btnSound Sound button, to play the previously played sound.

Visual Studio.

Apple.png Apple image. http://adventuretime.wikia.com/wiki/File:Apple.png

Banana.png Banana image. https://www.iconspng.com/image/99874/banana

Cat.png Cat image. http://www.pngmart.com/image/tag/cat

Dog.png Dog image. https://pngtree.com/free-animals-png/dog

Elephant.png Elephant image. http://pngimg.com/imgs/animals/elephants/

Fork.png Fork image. http://www.pngmart.com/image/tag/fork

Apple.m4a Apple sound, which will play, for Apple image to be pressed

Self-recorded.

Banana.m4a Banana sound, which will play, for Banana image to be pressed

Self-recorded.

Cat.m4a Cat sound, which will play, for Cat image to be pressed

Self-recorded.

Dog.m4a Dog sound, which will play, for Dog image to be pressed

Self-recorded.

Elephant.m4a Elephant sound, which will play, for Elephant image to be pressed

Self-recorded.

Fork.m4a Fork sound, which will play, for Fork image to be pressed

Self-recorded.

Code Snippets Pieces of code to use within alphabet game.

Provided by teacher.

List of sources for predefined codes and assets:

https://my.west-cheshire.ac.uk/sites/computing/_layouts/WordViewer.aspx?id=/sites/computing/Level2_BTEC_008/Code%20Snippets.docx&Source=https%3A%2F%2Fmy%2Ewest-cheshire%2Eac%2Euk%2Fsites%2Fcomputing%2FSitePages%2Fnew%2Flevel2%2Flevel2_btec_2012_008%2Easpx&DefaultItemOpen=1

Page 6: UNit 8 – mobile development€¦  · Web viewThe purpose is to create a Windows Phone alphabet game to teach young kids the alphabet, the application will include 6 letters, each

Project Proposal

Start Screen:

Page 7: UNit 8 – mobile development€¦  · Web viewThe purpose is to create a Windows Phone alphabet game to teach young kids the alphabet, the application will include 6 letters, each

A Page:

Page 8: UNit 8 – mobile development€¦  · Web viewThe purpose is to create a Windows Phone alphabet game to teach young kids the alphabet, the application will include 6 letters, each

B Page:

Page 9: UNit 8 – mobile development€¦  · Web viewThe purpose is to create a Windows Phone alphabet game to teach young kids the alphabet, the application will include 6 letters, each

C Page:

Page 10: UNit 8 – mobile development€¦  · Web viewThe purpose is to create a Windows Phone alphabet game to teach young kids the alphabet, the application will include 6 letters, each

D Page:

Page 11: UNit 8 – mobile development€¦  · Web viewThe purpose is to create a Windows Phone alphabet game to teach young kids the alphabet, the application will include 6 letters, each

E Page:

Page 12: UNit 8 – mobile development€¦  · Web viewThe purpose is to create a Windows Phone alphabet game to teach young kids the alphabet, the application will include 6 letters, each

F Page:

Page 13: UNit 8 – mobile development€¦  · Web viewThe purpose is to create a Windows Phone alphabet game to teach young kids the alphabet, the application will include 6 letters, each

End Page:

Page 14: UNit 8 – mobile development€¦  · Web viewThe purpose is to create a Windows Phone alphabet game to teach young kids the alphabet, the application will include 6 letters, each

Test Plan:

Test Expected Outcome Actual OutcomePrimary colours used Red, green blue.btnStart Click starts gamebtnHelp Click opens help pagebtnPrevious Click goes back to the

previous letter.btnNext Click goes to the next letter.

Apple.png Is displayed after clicking the A.png.

Banana.png Displays the banana image after clickomg B

Cat.png Displays the cat image after clicking C

Donkey.png Displays the donkey image after clicking D

Elephant.png Displays the elephant image after clicking E

Fruit.png Displays the fruit image after clicking FDisplays the banana image after clicking G

A.png Clicking A.png, displays Apple.png

B.png Clicking B.png, displaysC.png Clicking C.png, displaysD.png Clicking D.png, displaysE.png Clicking E.png, displaysF.png Clicking F.png, displaysG.png Clicking G.png, displays

Page 15: UNit 8 – mobile development€¦  · Web viewThe purpose is to create a Windows Phone alphabet game to teach young kids the alphabet, the application will include 6 letters, each

Hierarchy Chart:

Start Page

A Page B Page C Page D Page E Page F Page G Page

Help

Page 16: UNit 8 – mobile development€¦  · Web viewThe purpose is to create a Windows Phone alphabet game to teach young kids the alphabet, the application will include 6 letters, each

Constraints:

My current constraints are mainly managing my time, due to other assignments, it is quite difficult to fit everything in together so I can do this assignment and code the application in Visual Studio.