Question: Goal: Your assignment is to write a C++ program to read a text file containing the information of the books of a bookstore, load them

 Goal: Your assignment is to write a C++ program to read
a text file containing the information of the books of a bookstore,
load them into memory and perform some basic operations. This assignment will
help you practice: multiple file programming, classes, public and private methods, dynamic

Goal: Your assignment is to write a C++ program to read a text file containing the information of the books of a bookstore, load them into memory and perform some basic operations. This assignment will help you practice: multiple file programming, classes, public and private methods, dynamic memory, constructors and destructors, arrays and files. Implementation This lab assignment gives you the opportunity to practice creating classes and using dynamic memory in one of the required classes. There are two classes to implement Book and BookStore. As you can see in the description table BookStore has Books, this list of Books is modeled using an array of Book (pointers to Books), these books are going to be dynamically created when they are added to the list, if it is possible to add them because the list might be full. You will create the following files: - bookstoremain.cpp - book.h - book.cpp - bookstore.h - bookstore.cpp contains your main function contains the Book class declaration contains the Book class method definitions contains the BookStore class declaration contains the BookStore class method definitions The following table explains each of the methods that you will need to implement. Class Access Member tion Name of the book Array of string, names of the authors. Maximum 3 authors ISBN of the book Number of authors Represents how Private authors Private Private Private isbn authorCount quantity in the many copies of this book are PublicBook Constructor takes in the ISBN, the name and const string& isbn, quantity const string& name, of the book Public Book( Constructor takes in the ISBN, the name, the const string& isbn author (in case there is only one) and quantity of const string& name,the book const string& aut, size t quantity Book Public Public AddAuthor(const string&) Adds an author to the author aray, only if i Book (const Book&) Copy constructor "fits". In case it does not fit in the array, it returns returns true otherwise Public ToString): string of the book Returns a Writes the book to the output stream in the parameter. It changes all spaces to to facilitate reading the file later Reads a book from an input stream, the fields are separated by spaces. However, the name of the book and of the authors have instead of to make it easy to read Write(ostrean&):void Public Read(istream&): void spaces

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!