SOLUTIONJUG.COMCIS/170 - iLab 5 of 7CLICK HERE TO GET THE SOLUTION !!!!!!Part A: Tournament StatsRequirementsYour mission:...
Name ScoreBob 3245Sue 1098Pat 3217Press any key to continue . . .Part B: Alphabetical OrderRequirementsYour mission: Write...
Upcoming SlideShare
Loading in …5
×

Cis 170 ilab 5 of 7

280 views

Published on

Write a program to determine statistics for a video game tournament. The user will input names and scores of all tournament players. The program will calculate the average score and display the players who scored below average.The program will implement these functions:
Main(): Declares variables for the number of players and average score, and two arrays of size 100: one to store player names and the other to store their respective scores. Calls the following functions in sequence, passing necessary parameters by reference:
InputData( ): Gets player names and scores from the user and stores them into the two arrays for an unknown number of players up to 100.
DisplayPlayerData(): Displays each player’s name and score.
CalculateAverageScore( ): Calculates the average score and returns it by value.
DisplayBelowAverage( ): Displays the names and scores of players who scored below average.

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
280
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Cis 170 ilab 5 of 7

  1. 1. SOLUTIONJUG.COMCIS/170 - iLab 5 of 7CLICK HERE TO GET THE SOLUTION !!!!!!Part A: Tournament StatsRequirementsYour mission: Write a program to determine statistics for a video game tournament. Theuser will input names and scores of all tournament players. The program will calculate theaverage score and display the players who scored below average.The program will implementthese functions: Main(): Declares variables for the number of players and average score, and two arrays ofsize 100: one to store player names and the other to store their respective scores. Calls thefollowing functions in sequence, passing necessary parameters by reference: InputData( ): Gets player names and scores from the user and stores them into the twoarrays for an unknown number of players up to 100. DisplayPlayerData(): Displays each player’s name and score. CalculateAverageScore( ): Calculates the average score and returns it by value. DisplayBelowAverage( ): Displays the names and scores of players who scored belowaverage.Sample output:Enter Player Name (Q to quit): BobEnter score for Bob: 3245Enter Player Name (Q to quit): SueEnter score for Sue: 1098Enter Player Name (Q to quit): DaveEnter score for Dave: 8219Enter Player Name (Q to quit): PatEnter score for Pat: 3217Enter Player Name (Q to quit): QName ScoreBob 3245Sue 1098Dave 8219Pat 3217Average Score: 3944.75Players who scored below average
  2. 2. Name ScoreBob 3245Sue 1098Pat 3217Press any key to continue . . .Part B: Alphabetical OrderRequirementsYour mission: Write a program to alphabetize a list of last names. The user will input an undetermined nunames. The program will display the number of names entered and alphabetized lists of the names in ascenand descending (Z-A) order.Your program will store the names in an ArrayList object. It will use various Arrproperties and methods to implement the program requirements.Sample output:Enter a last name: RobertsKeep going? (Y/N): yEnter a last name: DeLayKeep going? (Y/N): yEnter a last name: ForemanKeep going? (Y/N): yEnter a last name: GangulyKeep going? (Y/N): n4 last names enteredNames in Ascending OrderDeLayForemanGangulyNames in Descending OrderRobertsGangulyForemanDeLayScreenshot 1

×