Question: Using c++ and include an infile and an outfile for the data template on how the code should look like How the output should look


The Sangree Old Folks Home is in deep financial trouble and the owner, old Doc's Sangree, decides to go on a massive fundraising campaign. The local high school offers to help by sponsoring a dance marathon. Old Doc Sangree would like you to write a program to process the data gathered on the couples who will dance and their sponsors. Input: Every couple that dances is given a unique ID number. Each sponsor is asked how much they are willing to donate for each hour the couple dances and the maximum number of hours they are willing to pay for. Data: ID HRS Rate a) The first number is the ID number of the couple being sponsored (ID) b) The second number represents the maximum number of hours the sponsor is willing to pay for (HRS) c) The third number is a real value which gives the dollar per hour amount that the sponsor will donate (RATE). Output: class dancer \{ int id, hrs; 6 very metwod (fiak valtes float rate; dancer ( ); void read_val (ifstream \&); Fout void print_val (ofstream & ); void sort_by_id(dancer a[], int); void sort_by_rate(dancer a[], int); int couple_counter (dancer a[], int); 1/ Total amount earned by EACH couple and the /I number of sponsors void u_id(dancer a[], ofstream \&); I/ Money earned from each performance. float get_earnings(dancer a[], int); int get_id () ; int get_hrs(); float get_rate () ; I/ Total money earned by ALL dancers float total_raised(dancer a[] ); void swap(int, int, dancer a[] ); void best_couple (dancer a[], ofstream \&); \} ; 12 Sponsors 5 couples $114.15 total earned 117: 3 SPONSORS, $15.75 132: 2 SPONSORS, $15.75 141: 4 SPONSORS, $25.25 157: 1 SPONSORS, $19.00 161: 2 SPONSORS, $38.40 Couple with most money is : 161 with 2 sponsers, earning $38.40
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
