Chat with us, powered by LiveChat Instructions:?? CIS 22A ?????????LAB 7 Gymnastics Meet ? For Lab 7 you will use three parallel arrays to output the All Around winners of gymnastics competition. INPUT The data | Wridemy

Instructions:?? CIS 22A ?????????LAB 7 Gymnastics Meet ? For Lab 7 you will use three parallel arrays to output the All Around winners of gymnastics competition. INPUT The data

  

CIS 22A          LAB 7
Gymnastics Meet
 

For Lab 7 you will use three parallel arrays to output the All Around winners of gymnastics competition.
INPUT
The data file you are to use is gymnasts.txt
Each line contains the following information for one gymnast:
String – name of gymnast (Store in the array for names)
Integer – age of gymnast (Store in the array for ages)
Double – score on vault (Add into sum for All Around score but do not store in an array)
Double – score on balance beam (Add into sum for All Around score but do not store in an array)
Double – score on bars (Add into sum for All Around score but do not store in an array) Double – score of floor (Add into sum for All Around score but do not store in an array)
Assume 100 is the maximum number of gymnasts.
Calculation (done in input function)
In a third one-dimensional array (type double) compute the gymnast’s All Around score by adding the scores for vault, balance beam, bars, and floor. This is best done in the input function.
In order to move the file pointer to the next gymnast you will really, really enjoy the following:
string temp;
  getline(inFile,temp);//clear n or rl (Mac) before next string
 

OUTPUT:
Output 1: Output the name, age and All Around score for each gymnast. These should be in the following format and sorted by All Around score from high to low using selection sort. Output is to be to file
2017 USAIGC/IAGC WORLD CHAMPIONSHIPS
NAME     AGE  ALL AROUND
XXXXXXXXXXXXXXXXX            XX                         XX.XXX                  
Sample for output 1:
2017 USAIGC/IAGC WORLD CHAMPIONSHIPS
NAME     AGE  ALL AROUND
Isabella Alonzo  10     38.025
Amelia Aurelio   9     37.900
etc.
 
Output 2: Output the name and All Around score for each gymnast that is 10 years old. Output is to be to same file as for Output 1.
Sample for output 2:
2017 USAIGC/IAGC WORLD CHAMPIONSHIPS
 

NAME      ALL AROUND
Isabella Alonzo       38.025
Audrey Im            37.551
etc.
THEME ISSUES: one-dimensional arrays, nested loops, if statements, file input, file output
How should you do this?
 

STEP 1 Write main() and open file. Debug.
STEP 2 Write getdata(). At this stage there is a for loop to read each of five exercises inside a while not end of file type loop. Use debug cout statements to check that the data is being input correctly. These must be removed before final submission of project. Debug.
STEP 3 Add to getdata() computation to compute All Around score and store these values in the remaining (3rd) array of double values. Debug.
STEP 4 Write function to output heading. Debug.
STEP 5 Write output function. Debug.
STEP 6 Write function to sort using selection method. The call to this function will be placed before the output function calls. Debug.
STEP 7 Write separate function to output the names and All Around scores for all 10 yr old gymnasts.
STEP 8 “Doll up” the program documentation. Debug (just in case)
Checkpoint (alias rubric)  Possible
Include name, e-mail, and lab# as comment and printed to output 3
Minimum of three (3) comments in each function
     (Purpose: Pre: Post:)
Input function fills name, age and All Around score 10
Use a selection sort to sort subject numbers. This needs to be a separate function.
A separate function must be used to output the table heading ONLY 2
Separate function to output name of each gymnast, age, and All Around score sorted from highest score to least is done in a separate output function. Output must be formatted as shown. Check that output is correct. Redirect output to a file.
Separate function to output all 10-yr old gymnast’s names and All Around score is printed to the file 

    Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

    Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.

    Do you need an answer to this or any other questions?

    About Wridemy

    We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.

    How It Works

    To make an Order you only need to click on “Order Now” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

    Are there Discounts?

    All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.

    Hire a tutor today CLICK HERE to make your first order

    Related Tags

    Academic APA Writing College Course Discussion Management English Finance General Graduate History Information Justify Literature MLA