Discount Get CIS 170C ALL WEEKS Solution ONLY $94.98 $131.92
CIS 170C C++ Week 1 - Lab 1 - You need to write a program that ca... [$9.99]
CIS 170C C++ Week 2 - Lab 2 - Write a program that inputs the amo... [$9.99]
CIS 170C C++ Week 3 - Lab 3 - Diver Scoring - You will code, buil... [$15.99]
CIS 170C C++ Week 4 - Lab 4 - Phone Dialing Program - You will co... [$19.99]
CIS 170C C++ Week 5 - Lab 5A - Video Game Player - Determine the ... [$15.99]
CIS 170C C++ Week 5 - Lab 5B - Pig Latin Program - Write a progra... [$19.99]
CIS 170C C++ Week 6 - Lab 6 - ATM Program - Write a windows conso... [$19.99]
CIS 170C C++ Week 7 - Lab 7 - Sequential Files - Create a C++ con... [$19.99]
CIS 170C C++ - Final Exam [$24.99]
Get Selected Weeks Solution with ONLY NOT Add Selected Tutorials To Cart
CIS 170C CIS/170C CIS170C C++ Week 5 - Lab 5A - Video Game Player - Determine the average score for a group of players and then determine who scored below average
    CIS 170C CIS/170C CIS170C C++ Week 5 - Lab 5A - Video Game Player - Determine the average score for a group of players and then determine who scored below average

CIS 170C CIS/170C CIS170C C++ Week 5 - Lab 5A - Video Game Player - Determine the average score for a group of players and then determine who scored below average

$15.99

Lab 5 of 7: Array and String

Lab Overview - Scenario/Summary

Video Game Player Program:  Determine the average score for a group of players and then determine who scored below average.

Part A: Video Game Player Program

Step 1: Requirements

Write a program to do the following:

In main, declare a PlayerName Array and a Score Array. Declare the size of the arrays to be 100.

In the InputData function, input the player name and score into the arrays for an unknown number of players up to 100. 

In the DisplayPlayerData function, display the name and score of each player.  Numberofplayers

In the CalculateAverageScore function, calculate the average score and return it by value.  numberofplayers

In the DisplayBelowAverage function, display the name and score for any player who scored below the average. Do not use global variables.

 

Number of players

Output from Program:

Enter Player Name (Q to quit): Bob

Enter score for Bob: 3245

Enter Player Name (Q to quit): Sue

Enter score for Sue: 1098

Enter Player Name (Q to quit): Dave

Enter score for Dave: 8219

Enter Player Name (Q to quit): Pat

Enter score for Pat: 3217

Enter Player Name (Q to quit): Q

   Name   Score

Bob        3245

Sue        1098

Dave       8219

Pat        3217

Average Score: 3944.75

 Players who scored below average

  Name    Score

Bob        3245

Sue        1098

Pat        3217

Press any key to continue . . .

Step 2: Processing Logic

Using the pseudocode below, write the code that will meet the requirements.

Main Function

   Declare the player name and score arrays, number of players, and average score.

   Call the InputData function

   Call the DisplayPlayerData function

   Call the CalculateAverageScore function and assign the returned value in average score

   Call the DisplayBelowAverage function

InputData function

    While the number of players is less than the length of the array

        Prompt for the player's name

        If the user entered Q, break out of the loop

        Prompt the user for the player's score

        Add 1 to the number of players

    End-While

DisplayPlayerData function

    Display the name and score of each player

CalculateAverageScore function

    Add up the scores and divide by the number of scores to calculate the average score

    Display the average score

    Return the average score to main

DisplayBelowAverage function

    Display the names and scores of all players who scored below the average score

Step 3: Create a New Project

Create a new project and name it LAB5A. Write your code using the Processing Logic in Part A, Step 2. Make sure you save your program.

Step 4: Compile and Execute

a)     Compile your program. Eliminate all syntax errors.

b)     Build your program and verify the results of the program. Make corrections to the program logic if necessary until the results of the program execution are what you expect.

Step 5: Print Screen Shots and Program

 Capture a screen print of your output. (Do a PRINT SCREEN and paste into an MS Word document.)

Copy your code and paste it into the same MS Word document that contains the screen print of your output.

Save the Word document as Lab05A_LastName_FirstInitial.

END OF PART A

 

My solution contain Visual C++ 2010 projects with detailed comments.

Please using Visual Studio to open this project.

If you have more question or need help, please contact me via email support@extutorials.com. I will help you any time.

Thank you !

Attached Files

Move over [ preview ] file name to preview content in it!

Write a review

Your Name:


Your Review: Note: HTML is not translated!

Rating: Bad           Good

Enter the code in the box below:



PURCHASE SAVE
2 Tutorials 10%
3 Tutorials 13%
4 Tutorials 16%
5 Tutorials 19%
6 Tutorials 22%
7 Tutorials 25%
8 Tutorials 28%
9 Tutorials 31%
10 Tutorials 34%
add url more

9MZQASHWN73B