Question: C++ please! Write a complete C++ program that accomplishes the task indicated below, Use good form by including comments and meaningful identifiers. Be accurate with
Write a complete C++ program that accomplishes the task indicated below, Use good form by including comments and meaningful identifiers. Be accurate with the syntax as if you were typing the program on the computer. Assume that there is a file on disk named Books.txt that contains information about all the books sold at amazon.com. Each line contains an ISBN number, and a count that indicates how many of that book was sold. Here is a sample for the first two lines in the file The first line means that 180 copies of the book with ISBN number 638-0-321-83389-1 were sold. Write the program with the assumption that you do not know how many lines are in the list. You do not need to use arrays for this program. Write a C++ program that will do the following: i. Open the file For each line of data, you must: ii. Read in the line of data from the file ii. Call a value returning function bestseller that returns true if the book made it on the best seller list and false otherwise. A book is a best seller if more than 100 copies were sold. Make sure that you write the code for this function. Compute the total number of books sold. Compute how many books made it on the best seller list, (not how many best seller books were sold, just how many unique ISBNs arc on the best seller list!) Print the ISBN number of the most sold book. Print the output so that it is organized as on the next page. (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
Get step-by-step solutions from verified subject matter experts
