Download presentation
Presentation is loading. Please wait.
Published byGerard Butler Modified over 9 years ago
1
UFCEKS-20-2Multimedia Authoring Times Table Quiz
2
UFCEKS-20-2Multimedia Authoring Development Cycle Problem Description and Analysis Design a Solution (Describe/Plan/Document) Implement (code it!) Test – Debug! - Retest Maintain / Improve/ Enhance.
3
UFCEKS-20-2Multimedia Authoring Problem Create a times-table quiz for users of around 6-7 years old to play against the computer. After entering their name at the start of the quiz the user will be presented with randomly generated times-table questions based on 2 – 10 times tables and will attempt to give the correct answer. If the user answer is correct their score will increase, if not the computer’s score will increase. After 10 questions the scores are displayed and the winner announced.
4
UFCEKS-20-2Multimedia Authoring Do I Understand the Problem? Think…
5
UFCEKS-20-2Multimedia Authoring 2 x 7 = ? Times Tables 6 x 9 = ? 9 x 8 = ? 7 x 5 = ?
6
UFCEKS-20-2Multimedia Authoring Design Solution – Pseudo Code prompt the user to enter their name loop generate two random numbers multiply them together and store the answer display the numbers and prompt the user to enter their answer compare the user’s answer with the answer stored if the user’s answer is correct – increase the user’s score if the user’s answer is incorrect increase the computer’s score while more questions to ask user display scores to the user with an appropriate message.
7
UFCEKS-20-2Multimedia Authoring What Variables are Required prompt the user to enter their name loop generate two random numbers multiply them together and store the answer display the numbers and prompt the user to enter their answer compare the user’s answer with the answer stored if the user’s answer is correct – increase the user’s score the user’s answer is incorrect increase the computer’s score while more questions to ask user display scores to the user with an appropriate message
8
UFCEKS-20-2Multimedia Authoring Data Table: Variables, Purpose and Type Variable NamePurposeType userNamestore the user’s nameString firstNumberstore the value of the integer first random number secondNumberstore the value of the secondinteger random number correctAnswerstore the product of theinteger first and second number userResponsestores the value of the userinteger answer to the question userScore stores the number of correctinteger answers from the user computerScorestores the number of incorrectinteger answers from the user numberOfQuestionsstores the number of questions tointeger ask the user during the quiz
9
UFCEKS-20-2Multimedia Authoring Control Structures ? loop generate two random numbers multiply them together and store the answer display the numbers and prompt the user to enter their answer compare the user’s answer with the answer stored if the user’s answer is correct – increase the user’s score if the user’s answer is incorrect increase the computer’s score while more questions to ask user display scores to the user with an appropriate message.
10
UFCEKS-20-2Multimedia Authoring User Interface Information Static text fields to label user information. Input text fields to get user response to questions. Dynamic text fields to update display.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.