Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Help. I am new to Visual Studio and C++ so please include comments! Write a C++ program that reads the following list of input

C++ Help. I am new to Visual Studio and C++ so please include comments!

Write a C++ program that reads the following list of input data (book.dat) and then allows users to search and view the books from a Menu

List all available books

Search for book using A. Title or B. ISBN?

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

Mordeson, John

Fuzzy Mathematic in Medicine

3-7908-1325-7

Physica-Verlag

2000

89.00

10

3

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

Use the following functions in your program driver program.

//Function Reads the input data file

void getBookData(BookType books[], int& noOfBooks);

//Function Displays the list of book information

void printBookData(BookType books[], int noOfBooks);

//Function Searches for book based on book title or ISBN

void searchBookData(BookType books[], int bookCount);

//Function searches list of books based on book ISBN and

//returns the location (index) of the found book.

void searchBookDataByISBN(BookType books[], int bookCount,

string ISBN,int& loc);

//Function searches list of books based on book title and

//returns the location (index) of the found book.

void searchBookDataByTitle(BookType books[], int bookCount, string title, int& loc);

HINT: Define a class BookType with all the data members and member functions for accessing and setting the data members.

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

Consider this article:...

Answered: 1 week ago