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

For this assignment, you will write a program that grades an online quiz. The pr

ID: 657191 • Letter: F

Question

For this assignment, you will write a program that grades an online quiz. The program asks the student to enter his/her answer to 10 multiple-choice questions. The program stores the student

Explanation / Answer

using namespace std; int getRounds();//iterates the game by number of rounds int answerCorrectorPlayer1(int[][2], int[]); int ExpSystemPlayer1(int); int MaxEXPplayer1(int); int player1_Lvl_status(int); int main(int argc, char** argv) { int NUMofRounds; string arrName[2]; const int cycles_problems = 6, cycles_name = 2; int userInput[cycles_problems][cycles_name]; //Player 1's Variables int Player1_Current_EXP, AMOUNT_Correct_Answers_Player1, Player1MAX_exp, player1_Level_Status; //variables for the number generator int randTopNum, randBotNum, answerAdd[cycles_problems], answerMult; //Define variables to functions NUMofRounds = getRounds(); //Requests for the Usernames for (int user = 0; user "Please enter username for player # "": "; cin>>arrName[user]; } for (int player = 0; player for (int round = 1; round //Displays the player's turn and what round if(player == 0){ cout"Player: "else if (player == 1){ cout"Player: "for (int Prob = 0; Prob //Random Number Generator unsigned seed = time(0); srand(seed); randTopNum = rand()%10; randBotNum = rand()%10; answerAdd[Prob] = randTopNum + randBotNum;//Answer for addition problems answerMult = randTopNum * randBotNum;//Answer for multi. problems //Displays the math problem cout" + "" = "; //Requests answers of both players cin>>userInput[Prob][player]; //Corrects the inputted answers AMOUNT_Correct_Answers_Player1 = answerCorrectorPlayer1(userInput, answerAdd); cout"# of Player1's correct answers: "//Collects ansewrCorrector's result and convert them into EXP Player1_Current_EXP = ExpSystemPlayer1(AMOUNT_Correct_Answers_Player1); cout"Current EXP: "//Maximum Experience Points for Player 1 Player1MAX_exp = MaxEXPplayer1(Player1_Current_EXP); cout"Player 1 Max EXP: "//Player1's Level Calculator player1_Level_Status = player1_Lvl_status(Player1MAX_exp); cout"Player 1's Level: ""answerCorrect: "return 0; } int getRounds(){ int numRounds = 1; return numRounds;} int answerCorrectorPlayer1(int userInput[][2], int answerAdd[]){ int num_of_correct_answers = 0, valueHolder = 0; //Cycles to all of the answers for correction for (int answerChecker = 0; answerChecker //Corrects and counts the amount of answers correct if (userInput[answerChecker][1] == answerAdd[answerChecker]){ num_of_correct_answers = valueHolder + 1; } // If the an answer is wrong no point is added else if (userInput[answerChecker][1] != answerAdd[answerChecker]){ num_of_correct_answers = valueHolder + 0; } } return num_of_correct_answers;} int ExpSystemPlayer1(int AMOUNT_Correct_Answers_Player1){ int Player1EXPstatus = 0; Player1EXPstatus = AMOUNT_Correct_Answers_Player1 * 250;//1500 exp is the max return Player1EXPstatus;} int MaxEXPplayer1(int Player1_Current_EXP){ int max_EXP_of_player_1; if (Player1_Current_EXP > 500){ max_EXP_of_player_1 = 500; } else if (Player1_Current_EXP == 500){ max_EXP_of_player_1 = 1000; } else if(Player1_Current_EXP == 1000){ max_EXP_of_player_1 = 1500; } return max_EXP_of_player_1;} int player1_Lvl_status(int Player1MAX_exp){ int player1_Level; if (Player1MAX_exp == 500){ player1_Level = 1; } else if (Player1MAX_exp == 1000){ player1_Level = 2; } else if (Player1MAX_exp == 1500){ player1_Level = 3; } return player1_Level;}

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