Question: This is for Class Intro to programming C++ 140. PLEASE PROVIDE ME THE FLOWCHART FOR THIS PROJECT AND CODE AFTER. I'M asking for the flowchart
This is for Class Intro to programming C++ 140. PLEASE PROVIDE ME THE FLOWCHART FOR THIS PROJECT AND CODE AFTER. I'M asking for the flowchart as in the past I got a code instead of a flowchart. Thanks!
Fall 18 CMSC 140 Programming Project 5 Number Guessing Game
Chapter(s) Covered:
Chapter 7
Chapter 8
Concepts tested by the program:
Working with arrays
Using file operations
Using a selection sort to sort an array
Using a function to display arrays
Using a function to save arrays to file
Implementing functions besides function main()
Project Description
Can you legally gamble? Are you 21 years old or older? Do you know Powerball? Dont worry. You are not going to play Powerball but create a simulated game just like that :)! Go find the rule and study it so that you know how to design and code your program accordingly. Go ahead, search the Internet!
Do you see that your program basically just needs to randomly generate 6 numbers for the user to guess and calculate the prize depending on how many numbers are guessed correctly? Develop a C++ program using random number generator, i.e. rand(), function(s), and array(s) for it!
Project Specifications
Input for this project:
Game mode choice self_pick or auto_pick
Five numbers between 1 and 69 (if game mode is self_pick)
One number between 1 and 26 (if game mode is self_pick)
Output for this project:
Game title
Game rule
Game result including
Prize
Sorted users numbers
Sorted winning numbers
Programmers full name
Project number
Project due date
Processing Requirements
Define all functions after main function and prototype them properly.
Use published PowerBall Prize rule for single draw. [https://www.powerball.com/games/powerball] Set Grand Prize as $1,000,000,000.00 in the program.
Create and use five functions for the following:
Function randomly generates and returns a number within the range passed/specified by arguments: max and min.
Function sorts a passed array using selection sort.
Function saves sorted wining numbers to a data file with a timestamp. Be sure to save the numbers in a way separate groups of numbers can be differentiated. [Hint: this function should call/use above two functions.]
Function gets and validates users numbers, saves and sorted the numbers in an array. The sorted array needs to be returned/passed out by this function. This function accepts one argument: game mode choice.
Function displays a passed array.
[NOTE: you can create and use more functions if you want.]
Deliverables Format:
The above deliverables will be packaged as follows:
Intermediate deliverable: Program design: Flowchart for the Program due one week after project is given. November 18, 2018
C++ files (source code): FirstInitialLastName_Pr
Output file called winNumbers.txt
Documentation: Word document(docx) or .pdf including:
Title page including student name, project title and number
Flowchart
Pseudocode
Test plan (table) with at least 2 different data sets and screenshots supporting each test case
Sample Screen Output #3
Number Guessing Game
---------------------------
1. Select FIVE numbers from 1 to 69 for the white balls.
2. Select ONE number from 1 to 26 for the red Powerball.
3. Prize determined by how many of your numbers match the winning numbers.
Do you want to self pick your white ball numbers (Y or N)): Y
Enter number 1 (between 1 and 69):0
This number is not in the correct range
Enter number 1 (between 1 and 69):-4
This number is not in the correct range
Enter number 1 (between 1 and 69):2
Enter number 2 (between 1 and 69):10
Enter number 3 (between 1 and 69):35
Enter number 4 (between 1 and 69):41
Enter number 5 (between 1 and 69):100
This number is not in the correct range
Enter number 5 (between 1 and 69):69
Do you want to self pick your red ball number (Y or N)): 3
Not an acceptable character
Do you want to self pick your red ball number (Y or N)): n
********** Game Report ************
You won 0.00 points for the game.
Here are your numbers:
2 10 35 41 69 17
Here are the winning numbers:
12 27 33 40 41 13
** NOTE: The last number is the Power Ball number!! **
****************************
Thank you for using my program!!
PROGRAMMER: Tina Lee
CMSC140 Common Project 5
Due Date: 12/2/2018
Press any key to continue . . .
Sample Screen OutPut # 1 
File Tools Vinw CMSC 140 Common Projts Fall 2018 Saved to this PC Number Guessing Game 1. Select FIVE numbers fron 1 to 69 for the white balls 2. Select ONE number from 1 to 26 for the red Powerball 3. Prize determined by how nany of your numbers match the winning numbers Number Guessing Gane Do you want to self pick your white ball numbers (Y or N)); Y Enter nunber 1 (between 1 and 69):3 Enter nunber 2 (between 1 and 69):14 Enter nunber 3 (between 1 and 69):22 Enter nunber 4 (between1 and 69):35 Enter nunber 5 (between 1 and 69):41 Do you want to self pick your red ball number (Y or N)): Y Enter PONEBALL number (between 1 and 26):25 1. Select FIVE nunbers from 1 to 69 for the white balls 2. Select ONE nunber from 1 to 26 for the red Powerball 3. Prize deternined by how many of your numbers match the winning numbers Do you want to self pick your white ball numbers (Y or N)): N Do you want to self pick your red ball number (Y or N):Y Enter POWEBALL nunber (between 1 and 26):14 * Gane Report Gane Report You won 7.08 points for the gane You won 0.80 points for the gane Here are your 3 14 22 35 41 25 numbers; Here are your nunbers: 31 46 50 59 65 14 Here are the winning numbers 14 41 51 54 59 25 Here are the winning nunbers: 37 39 46 52 55 25 NOTE: The last number is the Power Ball nunber! NOTE: The last nunber is the Power Ball number! Thank you for using my progran! PROGRAMMER: Tina Lee CMSC148 Connon Project 5 Thank you for using ny program! PROGRAMMER: Tina Lee CMSC140 Common Project5 Due Date: 12/1/2018 Due Date: 12/1/2818 Progran ended with exit code: e Program ended with exit code: Screens -b of 8:24 PM File Tools Vinw CMSC 140 Common Projts Fall 2018 Saved to this PC Number Guessing Game 1. Select FIVE numbers fron 1 to 69 for the white balls 2. Select ONE number from 1 to 26 for the red Powerball 3. Prize determined by how nany of your numbers match the winning numbers Number Guessing Gane Do you want to self pick your white ball numbers (Y or N)); Y Enter nunber 1 (between 1 and 69):3 Enter nunber 2 (between 1 and 69):14 Enter nunber 3 (between 1 and 69):22 Enter nunber 4 (between1 and 69):35 Enter nunber 5 (between 1 and 69):41 Do you want to self pick your red ball number (Y or N)): Y Enter PONEBALL number (between 1 and 26):25 1. Select FIVE nunbers from 1 to 69 for the white balls 2. Select ONE nunber from 1 to 26 for the red Powerball 3. Prize deternined by how many of your numbers match the winning numbers Do you want to self pick your white ball numbers (Y or N)): N Do you want to self pick your red ball number (Y or N):Y Enter POWEBALL nunber (between 1 and 26):14 * Gane Report Gane Report You won 7.08 points for the gane You won 0.80 points for the gane Here are your 3 14 22 35 41 25 numbers; Here are your nunbers: 31 46 50 59 65 14 Here are the winning numbers 14 41 51 54 59 25 Here are the winning nunbers: 37 39 46 52 55 25 NOTE: The last number is the Power Ball nunber! NOTE: The last nunber is the Power Ball number! Thank you for using my progran! PROGRAMMER: Tina Lee CMSC148 Connon Project 5 Thank you for using ny program! PROGRAMMER: Tina Lee CMSC140 Common Project5 Due Date: 12/1/2018 Due Date: 12/1/2818 Progran ended with exit code: e Program ended with exit code: Screens -b of 8:24 PM
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
