Question: ( 1 ) Program Assignment instructionWrite a C + + program following the specification given below:A lottery ticket buyer purchases 2 0 tickets a week,

(1) Program Assignment instructionWrite a C++ program following the specification given below:A lottery ticket buyer purchases 20 tickets a week, always playing the same twenty 5-digit lucky combinations, given below.Write a program, named YourFirstNameLastNameProg2, that initializes an array with numbers read from a data file, MyLuckyNums.txt (create the file in NotePad for you to test your program), and then let the player enter this weeks winning 5-digit string. The program should perform a binary search through the list of players numbers and report whether or not one of the tickets is a winner this week. Here are the numbers to be entered into MyLuckyNums.txt:1357926791267923344500555918728762525801715027001162483770777942286447931219911178121008201029972821Start with completing the top documentation, as indicated in examples given in WEEK TWO.Include the following functions:readPlayersNums(string[], int): function to read the twenty 5-digit players numbers from the file MyLuckyNums.txt into the array. This numbers are not sorted.insertionSort(string[], int): function to sort the string numbers using the insertion sort.thisWeeksNum(): function to prompt and input this week's winning 5-digit string-number, Return the winning number to main()numValidation(string): function validates that week's winning 5-digit string actually has five digits. If not, ask the user to reenter five digits.binarySearch(string[], string, int): function to search the array of the twenty 5-digit player's numbers with this week's winning 5-digit string-number to see if there is a match. Return a boolean value, if the player won or not won this week's lottery run.winOrNowin(bool): function that will accept the value from the binarySearch() function and display one of the following message: "You are a WINNER!!!" or "Sorry not this time. Maybe next time." Please make sure to use the format and programming style illustrated by the author in the textbook.Be consistent with the coding structures illustrated in the current textbook., covered in this course

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!