Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Beginning C++ Create a project called Leaderboard , which uses a two dimensional

ID: 3801344 • Letter: B

Question

Beginning C++

Create a project called Leaderboard, which uses a two dimensional array or parallel arrays to store player initials and scores. It should have at least four functions to do the following:

The first function has two options allowing you to customize the difficulty of the exercise to your own ability and experience. When in doubt, start with easy mode. You can then later add functionality to create a hard mode solution if you have time. Students familiar with simple sorting algorithms may want to just start in hard mode.

addScore: Adds a score to the Leaderboard if the score is high enough along with the three letter initials of the player to whom the score belongs. Remember you must keep the correct scores associated with the correct initials.

Easy Mode: All scores are added and not sorted.

Hard Mode: Only maintain the top ten scores and sort.

store: Writes the current values in the Leaderboard to a file on the disk. The format of your file is up to you, just remember you have to retrieve these values later and and keep them straight, so design your file format to make life easier for the next method.

load: Retrieves the stored file and loads values into the Leaderboard. Be sure to keep those initials and scores straight.

display: Displays the Leaderboard on the screen for viewing. You can format this any way you like.

Explanation / Answer

#include <iostream>
#include <iomanip>
using namespace std;
void getData();
void getData();
{
const char STUDENT_NAME[5][6] = {"John", "Kathy", "Susan", "Alice", "Bill"};
const int TEST_SCORE[5][1] = {100, 95, 67, 87, 98};
void getData() {
int size, studentName;
cout << "Enter size for arrays: ";
cin >> size;
void getData() {
const int SIZE = 5;
int size, testScore[SIZE], index;
cout << "Enter size for arrays: ";
cin >> size;
for (index = 0; index <= size -1; index++)
{
cout << "Enter test score number "
<< (index +1) << ": ";
cin >> testScore[index];
}

}
void getData() {
const int SIZE = 5;
int size, testScore[SIZE], index, studentName[SIZE];
cout << "Enter size for arrays: ";
cin >> size;
for (index = 0; index <= size -1; index++)
{
cout << "Enter" <<(index +1) << "th student name: "
<< ": ";
cin >> studentName[SIZE];
}

for (index = 0; index <= size -1; index++)
{
cout << "Enter test score for " << studentName[index]
cin >> testScore[index];
while (0 < testScore[index] && testScore[index] < 100){
cout << "Re-enter test score for " << studentName[index]
cin >> testScore[index];
}
}
}

void getData(int size, int [], int []);

void main(){

}

void getData(int size,int testScore[],int studentName[]) {

const int SIZE = 5;
int index;


cout << "Enter size for arrays: ";
cin >> size;

for (index = 0; index <= size -1; index++)
{
cout << "Enter" <<(index +1) << "th student name: "
<< ": ";
cin >> studentName[SIZE];
}

for (index = 0; index <= size -1; index++)
{
cout << "Enter test score for " << studentName[index]
<< ": ";
cin >> testScore[index];

while (0 < testScore[index] && testScore[index] < 100){
cout << "Re-enter test score for " << studentName[index]
<< ": ";
cin >> testScore[index];
}
}
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote