Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please complete this program in C++. nsu.blackboard.com our Career Oppo... Apply Students NSU zipcar Migos Students NSU Students NSU https:/su.b... a Study Laboratory 11 Fall
Please complete this program in C++.
nsu.blackboard.com our Career Oppo... Apply Students NSU zipcar Migos Students NSU Students NSU https:/su.b... a Study Laboratory 11 Fall 2018 Sort and Binary Search List Submit to Blackboard one C++ file: Lab11RadioPrizeSort _firstinitiallastName.cpp. The code in the file must include your name, the course, the file name (the full path name) and the program description in comments. Example // File Name: C:temp LabllRadioPrizeSort firstInitialLastName.cpp Author: your name Course: CSC-260L-03 // Program Description: The purpose of this program is giving you the hand on experience with the sorting and binary searching. Design a program that simulates a contest for a radio station that awards a $10,000 prize to the first caller who correctly guesses a number in a list of randomly generated numbers. A caller can make one guess per call. The contest is held until a number has been matched or the user enters a value of-1. The code used to generate a random list between 1 and 500 (inclusively) is in CreateList.cpp. The list generated from running Createlist.cpp is PrizeList.txt The program will read the data file and store them into an array of integers, called prizeNumbers. You need sort all elements in the array before search for an element. The program will then perform a binary search which should be more efficient with large array Selection sort is one of the basic algorithms for sorting data, its simplicity proves useful for sorting small amounts of data. Selection sort works by first starting at the beginning array (index 0) and traverses the entire array comparing each value with the current index, if it is smaller than the current index than that index is saved. Once the loop has traversed all the data and if a smaller value than the current index was found a swap is made between the current index with the index where the smaller value was found. The current index is then incremented, now to index 1, the algorithm repeats. Of course, a visual representation is usually more useful. Take an unsorted array that holds five integers. 2 3 There are three main variables in selection sort, the variable 'i keeps the index that may be potentially switched if a smaller value is found. The variable '' traverses through the array searching for a value smaller than 'min'. The variable 'min' is the current smallest value in the array, it's updated only if a value smaller than it is found. nsu.blackboard.com our Career Oppo... Apply Students NSU zipcar Migos Students NSU Students NSU https:/su.b... a Study Laboratory 11 Fall 2018 Sort and Binary Search List Submit to Blackboard one C++ file: Lab11RadioPrizeSort _firstinitiallastName.cpp. The code in the file must include your name, the course, the file name (the full path name) and the program description in comments. Example // File Name: C:temp LabllRadioPrizeSort firstInitialLastName.cpp Author: your name Course: CSC-260L-03 // Program Description: The purpose of this program is giving you the hand on experience with the sorting and binary searching. Design a program that simulates a contest for a radio station that awards a $10,000 prize to the first caller who correctly guesses a number in a list of randomly generated numbers. A caller can make one guess per call. The contest is held until a number has been matched or the user enters a value of-1. The code used to generate a random list between 1 and 500 (inclusively) is in CreateList.cpp. The list generated from running Createlist.cpp is PrizeList.txt The program will read the data file and store them into an array of integers, called prizeNumbers. You need sort all elements in the array before search for an element. The program will then perform a binary search which should be more efficient with large array Selection sort is one of the basic algorithms for sorting data, its simplicity proves useful for sorting small amounts of data. Selection sort works by first starting at the beginning array (index 0) and traverses the entire array comparing each value with the current index, if it is smaller than the current index than that index is saved. Once the loop has traversed all the data and if a smaller value than the current index was found a swap is made between the current index with the index where the smaller value was found. The current index is then incremented, now to index 1, the algorithm repeats. Of course, a visual representation is usually more useful. Take an unsorted array that holds five integers. 2 3 There are three main variables in selection sort, the variable 'i keeps the index that may be potentially switched if a smaller value is found. The variable '' traverses through the array searching for a value smaller than 'min'. The variable 'min' is the current smallest value in the array, it's updated only if a value smaller than it is foundStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started