C++ Programming Who Wants to be a Millionaire?philgiansante.com/c/booklets/Who Wants to be a...

4
Mr. Giansante August 2018 C++ Programming Who Wants to be a Millionaire?

Transcript of C++ Programming Who Wants to be a Millionaire?philgiansante.com/c/booklets/Who Wants to be a...

Page 1: C++ Programming Who Wants to be a Millionaire?philgiansante.com/c/booklets/Who Wants to be a Millionaire.pdf · Who Wants to be a Millionaire? User Interface Appropriate Title, Author

Mr. Giansante

August 2018

C++ Programming

Who Wants to be a Millionaire?

Page 2: C++ Programming Who Wants to be a Millionaire?philgiansante.com/c/booklets/Who Wants to be a Millionaire.pdf · Who Wants to be a Millionaire? User Interface Appropriate Title, Author

Design a C++ program which simulates the popular quiz show "Who Wants to be a Millionaire ?" Contestants should be presented with questions and four possible answers. There are a total of 15 possible questions, ranging from $100 up to $1,000,000. After you answer a question correctly, you may choose to quit and walk away with the money or continue. Answering the fifth question (1,000) or tenth question (32,000) correctly will guarantee you that amount. In addition, the contestant should have three "Life Lines" similar to the "50/50" on the show. When the contestant choses a Life Line, two of the incorrect answers are removed, leaving one correct and one incorrect answer. On the following page are screenshots from an online version of "Who Wants to be a Millionaire?" made using Adobe Flash.

Who Wants to be a Millionaire?

Mr. Giansante Mr. Giansante philgiansante.com

Declaring Variables Your program should use three arrays to store question information. string Question[51]; string Answer [51][5]; int CorrectAnswer[51];

The variable declararions above describe arrays that go from 0 to 50 (ie. 51 items) and a two dimensional array with the second dimension ranging from 0 to 4 (ie. 5 items). To keep things simple, we simply will ignore the items at index = 0.

To Store the Questions and Answers Question[1] = "How many months in a year?"; Answer[1][1] = "Ten"; Answer[1][2] = "Six"; Answer[1][3] = "Twelve"; Answer[1][4] = "Nine"; CorrectAnswer[1]= 3; Question[2] = "What is Canada's capital?"; Answer[2][1] = "Ottawa"; Answer[2][2] = "Montreal"; Answer[2][3] = "Toronto"; Answer[2][4] = "None of the above"; CorrectAnswer[2] = 1;

Page 3: C++ Programming Who Wants to be a Millionaire?philgiansante.com/c/booklets/Who Wants to be a Millionaire.pdf · Who Wants to be a Millionaire? User Interface Appropriate Title, Author

Who Wants to be a Millionaire?

Mr. Giansante Mr. Giansante philgiansante.com

Page 4: C++ Programming Who Wants to be a Millionaire?philgiansante.com/c/booklets/Who Wants to be a Millionaire.pdf · Who Wants to be a Millionaire? User Interface Appropriate Title, Author

Who Wants to be a Millionaire?

User Interface Appropriate Title, Author Information, etc. Efficient and Esthetically-Pleasing User Interface Spelling and Grammar are correct Code / Programming Style Variables are declared and logically named Code is commented where appropriate Code is indented and spaced to show structure Code is efficient Work Ethic / Problem Solving Skills Problem Solving Skills are demonstrated Makes Productive Use of Time Only Seeks Help when Necessary Program-Specific Criteria Questions are selected randomly Players are presented with four answers When player answers correctly, they move up the "money board" Answering the fifth question (1,000) or tenth question (32,000) correctly guarantees that amount When player "Walks Away", they are awarded the correct amount of money When player answers question wrong, they are awarded the correct amount of money 50/50 Life Line works properly User has three 50/50 Life Lines Teacher Comments _____________________________________________ _____________________________________________ _____________________________________________

Mr. Giansante Mr. Giansante philgiansante.com

Learning Outcomes Programming Concepts and Skills A1. demonstrate the ability to use different data types, including one-dimensional arrays, in computer programs A2. demonstrate the ability to use control structures and simple algorithms in computer programs A3. demonstrate the ability to use subprograms within computer programs A4. use proper code maintenance techniques and conventions when creating computer programs Software Development B1. use a variety of problem-solving strategies to solve different types of problems independently and as part of a team B2. design software solutions to meet a variety of challenges B3. design algorithms according to specifications B4. apply a software development life-cycle model to a software development project

Please fill out all the information in this column using a pen before getting this assignment marked. ____________________________________________ Name

______________________ __________________ Date Class

Academic Honesty The work I am submitting is completely my own creation and has not been copied from anyone else's work. If I have received help on this project, the names of those who have assisted are listed below. _____________________________________________ Signature

_____________________________________________ _____________________________________________ Pre-Marking The following people have pre-marked this assignment: (minimum of two) _____________________________________________ _____________________________________________

Level 1 - Limited ability to meet standard and limited effectiveness Level 2 - Some ability demonstrated and moderately effective Level 3 - Considerable ability demonstrated, considerable clarity or accuracy Level 4 - Thorough, high degree of skill demonstrated, insightful, highly accurate

Level