Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

a8 serendipity c++ Chapter 8 Searchine and Sorting Arrays Serendipity Booksellers Software Development Project- Part 8: A Problem-Solving Exercise For this chapter's assignment you will

a8 serendipity c++

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

Chapter 8 Searchine and Sorting Arrays Serendipity Booksellers Software Development Project- Part 8: A Problem-Solving Exercise For this chapter's assignment you will add scarching capabilities to the addBook, lookUpBook, editBook, and deleteBook functions 1. Create a global constant for the size of your database Create a global constant DBSIZE and set it equal to 20. This represents the number of book records that your arrays can handle. As you declare your local arrays in int main), use DBSIZE as part of decl zation statement 2. Modify the addBook function a. When a new book is added to the inventory, the program will check bookCount (which is a local variable within int main0 that has to be passed) bookCount represents exactly what the name implies, it keeps track of the number of books in our data base. This function is to determine if there is room in the parallel arrays for any additional books using bookCount. If there is room then store the new books' information within the parallel arrays at index[bookCount]. Since our arrays use 0 based indexing, the valid range of indexes is from 0 to 19. After adding the book to our inventory, we then increment bookCount by 1 b. Once its determined that there is space in database(arrays), the book's data may be stored in each of the other arrays by using the same subscript. For instance, if bookCount is (books are stored from index 0-6), then the title of the new book is stored in bookTitle[7], its ISBN number will be stored in isbn[7], its author's name will be stored in authorl7], its publisher's name will be stored in publisher[7], the date the book was added to the inventory will be stored in date Addedl7], the quantity of books on hand will be stored in qtyOnHandl71, the book's wholesale pricew be stored in wholesale[7], and the book's retail price will be stored in retail[7]. Remember to increase bookCount by 1 at this point. The addBook function is currently a stub function. Modify it so it performs the following steps: 1, First determine if there is room in the database as described earlier 2. If there is room, present the user with a menu that allows them to enter each item individually. I will demo this in class. We use this system so that if the user makes a mistake, they can go back and make the change prior to saving the record. 3. As part of this menu, display a header that details the current number of records in the inventory. Note that the wholesale cost and retail price is for a single copy of the hook. Also, remember that the date should be entered in the form MM-DDYYYY. where MM is the month, DD is the day, and YYYY is the year

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

Learn To Program Databases With Visual Basic 6

Authors: John Smiley

1st Edition

1902745035, 978-1902745039

More Books

Students also viewed these Databases questions