Menu
support@authoritypapers.com
+1(805) 568 7317

write a program that reads a fileconsisting of restaurant ratings and the date the r 4945731

Write a program that reads a fileconsisting of restaurant ratings and the date the rating wassubmitted. It should then determine the number ofratings in each of the following ranges : 1 – 2 (Unacceptable), 3 -4 (Poor), 5 – 6 (Average), 7 -8 (above average), 9 -10 (verygood). The earliest and latest submissiondate of each rating range must also be shown. A sample output is:                          
TUSCAN GARDEN CUSTOMER RATING REPORT
Rating                     Total            Earliest Date        LatestDate 1 – 2(Unacceptable)               2                 12/10/16               12/21/16 3 – 4(Poor)                             5                 12/07/16               01/18/17 5 – 6(Average)                     12                 11/30/16               02/21/17 7 – 8 (aboveaverage)           29                  12/11/16              03/30/17 9 -10 (verygood).                 17                  01/20/17              03/31/17    Notes :
The program must use at least 2 functions : A function that takes as parameters an array and the number ofelements (dates) loaded into it and returns the earliest date. (see#3 below) A function that takes as parameters an array and the number ofelements (dates) loaded into it and returns the latest date. (see#3 below) Potential pseudocode solution : declare 5 string arrays (one for eachrating) read first input record if (inFile.eof())     output message “Theinput file is empty” else     output headinglines while (!inFile.eof()) use rating to load ‘date information’ into the appropriatearray (be sure to keep track of how many elements are loaded into eacharray) for each rating, do the following: call earliest date function call latest date function output detail line declare functions 3. The logic for the 2 function issimilar to the indexLargestElement function logic in Example 8-6 inthe textbook on pages 534 – 535. (Edition 6, pages 520 -521) Sample data file: 05 11/30/17

03 12/07/17

05 12/07/17

05 12/08/17

01 12/10/17

07 12/11/17

07 12/14/17

06 12/15/17

02 12/21/17

05 12/21/17

06 12/22/17

07 12/22/17

08 12/23/17

07 12/23/17

07 12/23/17

07 12/23/17

08 12/24/17

08 12/24/17

07 12/24/17

03 12/26/17

05 12/26/17

07 12/28/17

04 12/29/17

07 01/01/18

06 01/03/18

07 01/03/18

08 01/05/18

05 01/10/18

04 01/18/18

08 01/18/18

07 01/18/18

07 01/18/18

08 01/18/18

08 01/18/18

08 01/18/18

07 01/18/18

04 01/18/18

05 01/18/18

06 01/19/18

10 01/20/18

08 01/21/18

10 01/21/18

09 01/21/18

09 01/21/18

10 01/21/18

07 01/21/18

07 01/21/18

06 02/21/18

09 02/22/18

09 02/22/18

09 02/22/18

07 02/25/18

09 02/26/18

08 02/28/18

07 03/03/18

10 03/03/18

10 03/04/18

09 03/05/18

07 03/10/18

09 03/15/18

09 03/20/18

10 03/22/18

07 03/30/18

09 03/30/18

09 03/31/18 . . .

"Order a similar paper and get 15% discount on your first order with us
Use the following coupon
"GET15"

Order Now