Question: using c++ : Write a program that prompts the user for the name of a file. The file will be a plain text file that
using c++ :
Write a program that prompts the user for the name of a file. The file will be a plain text file that contains information about different objects of type "BibleBook". BibleBook will be defined as a class.
The private member attributes are:
string title;
int numChapters;
double amountRead;
The title will hold the title of the book, for example, "Genesis", "Exodus", "Psalms", etc. numChapters will hold the number of chapters in that book. amountRead will be a decimal ranging from 0 to 1. If the value is 0, that means you have read none of that book. If the number of 0.50, that means you have read half of that book, etc.
You will need to discover the public member functions that need to be written based on the description.
The text file will be organize like so: Each line will hold the title of a book, then a space, then the number of chapters, then a space, then the amount read of that book.
Here's an example:
Genesis 50 0.98
Matthew 28 1.00
Your program will read in this information and store each line in it's own object, and the objects will be part of a vector. In other words, there will be a vector of BibleBooks.
Your program will then iterate through the vector, displaying all of the information about each object.
The program will also identify for which object the amount read is the lowest.
Sample output:
Genesis 50 0.98
Matthew 28 1
The book with the lowest amount read is Genesis.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
