Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2. (50 pts] Write a C++ program that reads the following list of input data (book.dat) into an array of Book class objects. This program

image text in transcribed

image text in transcribed

image text in transcribed

2. (50 pts] Write a C++ program that reads the following list of input data (book.dat) into an array of Book class objects. This program should allow users to search and view the books from a Menu with the following options: 1. List all available books 2. Search for book using A. Title or B. ISBN? 3. Exit Program The format of the file is as follows: // The title of the book // The ISBN of the book // The Book Publisher // The year it was published // The authors of the book // The cost of the book // The number of copies of the book // The number of authors // List of Authors. book.dat C++Programing: From Problem Analysis to Program Design 5-17-525281-3 ABC 2000 52.50 20 1 Malik, D.s. Fuzzy Discrete Structures 3-7908-1335-4 Physica-Verlag 2000 89.00 10 2 Malik, Davender 3 CSC234 Advanced CH Lab 2: Chapters 9-10 Mordeson, John Fuzzy Mathematic in Medicine 3-7908-1325-7 Physica-Verlag 2000 89.00 10 3 Mordeson, John Fuzzy Mathematic in Medicine 3-7908-1325-7 Physica-Verlag 2000 89.00 10 Mordeson, John Malik, Davender Cheng, Shih-Chung Harry John and The Magician 0-239-23635-0 McArthur A. Devine Books 1999 19.95 10 3 Goof, Goofy Pluto, Peter Head, Mark Dynamic InterWeb Programming 22-99521-453-1 GNet 1998 39.99 25 1 Dimitri P. Bertsekas h ho Use the following functions in your program driver program. //Function Reads the input data file void getBookData(Book books[], int& no0fBooks); //Function Displays the list of book information void printBookData (Book books[], int nofBooks); //Function Searches for book based on book title or ISBN void searchBookData(Book books[], int bookCount); //Function searches list of books based on book ISBN and //returns the location (index) of the found book. void searchBookDataByISBN(Book books[], int bookCount, string ISBN, int& loc); //Function Searches for book based on book title or ISBN void searchBookData(Book books[], int bookCount); //Function searches list of books based on book ISBN and //returns the location (index) of the found book. void searchBookDataByISBN(Book books[], int book Count, string ISBN, int& loc); 4 CSC234 Advanced C++ Lab 2: Chapters 9-10 //Function searches list of books based on book title and //returns the location (index) of the found book. void searchBookDataByTitle(Book books[], int bookCount, string title, int& loc); HINT: Define a class Book with all the data members and member functions for accessing and setting the data members. All data members should be private. No non-constant data should be declared globally

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

How could assessment be used in an employee development program?

Answered: 1 week ago