Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

EACH COMMAND REQUIRES IT'S OWN FUNCTION Program creating book-store database. Each command requires separate function. struct Book string ISBN; string title; int quantity; int edition;

image text in transcribed

image text in transcribed

EACH COMMAND REQUIRES IT'S OWN FUNCTION

Program creating book-store database. Each command requires separate function. struct Book string ISBN; string title; int quantity; int edition; double price; Program needs to read and process a transaction file "storeTrans.txt". This file contains several commands such as: display, add, searchBook, delete, updatePrice, updateQuantity, sort and save. Each command requires new line Example of display: ISBN Title Edition Quantity Price 123456789 C++ForDummies 3 5 150.00 Add bookISBN bookTitle bookQuantity bookPrice Adds new book record to the database . Should read information from the transaction file Should check for duplicate book entries (same ISBN) If book doesn't exist: add new entry Should display message that the book was successfully added If book already exists, do not add. Display message use push back function to add to the end of vector 123456789 successfully added to the database 123456789 already exists. The number of copies is now 5 " . . SearchBook bookTitle Searches and returns all books with matching title. Exact title OR keyword found Display message . . . "Searching for book... 123456789 C++ForDummies 5 If no entry found ."Searching for book. Sorry, no matching book exists

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

Database Systems An Application Oriented Approach Complete Version

Authors: Michael Kifer, Arthur Bernstein, Richard Lewis

2nd Edition

0321268458, 978-0321268457

More Books

Students also viewed these Databases questions