Question: Name CSC 126 Fall 2015 FinalA 7 20 points Write a complete C++ program that accomplishes the task indicated below Use good form by including

 Name CSC 126 Fall 2015 FinalA 7 20 points Write a

complete C++ program that accomplishes the task indicated below Use good form

Name CSC 126 Fall 2015 FinalA 7 20 points Write a complete C++ program that accomplishes the task indicated below Use good form by including comments and Be accurate with the syntax as you were typing the program on the computer. Assume that there is a file on disk named gif prices trt that contains information about Amazon gift recommendations. Each line contains the gift name (a string with no spaces), the price, and the (a double number between 0 and 5). The first few lines in the file are shown: Good MorningMug 7,82 3,5 Coffee Press 28.38 4.7 ArtSet 15.79 4.3 The first line means that the GoodMorningMug costs S7.82 and has 3.5 star rating. Write the program with the assumption that you do not know how many lines are in the list. You may assume that there are no spaces in the state names. Write a C++ program that will do the following: Open the file For each line of data, you must: kii Read in the line of data from the file. Call a value returning function highlyRated that retums true if the item has 4 or more stars and false otherwise. This function takes one parameter (the rating). Make sure that you write the code for this function. ---Compute the total number of gifts that are on the list. --Compute the total number of gifts that are highly rated. Print the output so that it is organized as on the next pa (Of course there will be more lines, because this is shown only for the first two lines above, and we don't know How many lines are in the file). All printing is done in the main function

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!