Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

You have a small collection of children books and like to maintain them on your

ID: 3639651 • Letter: Y

Question

You have a small collection of children books and like to maintain them on your book shelf.
Program Specifications
Write a program that will do the following:
1. It must be adequately commented.
2. It must have variables that are appropriately named.
3. It must have a function to adequately prompt the user to perform the following action by printing the following
menu.
a. Add a new book
b. Print the author and ISBN for a single title
c. Print the entire bookshelf
d. Quit
4. It must have a function to
a. Read a small library collection file stored in myBooks.dat
b. Store the library collection data in an array called bookShelf
5. It must have a function to add a book.
6. It must have a function to print the author and ISBN for a single title specified by the user to common input.
bookShelf: an Array of bookType
bookType: a data type of a single book with
information of title, author, ISBN, etc.7. It must have a function to print any action taken to a “log file” (i.e. if a book is added, then an appropriate
comment line should be added to the log file).
8. It must make use of two additional functions not specified above to perform necessary steps within the program.
Hints:
1. Each book is stored as a struct called bookType which includes the following information:
title: string
isbn: string
author: string
publisher: string
price: double
publishDate: dateType
purchaseDate: dateType
2. The struct called dateType given in the above struct bookType is represented as follows:
month: int
day: int
year: int
3. Review the information provided in the data file myBooks.dat to understand how the data is arranged so you
can program the function for reading in the data correctly.
4. The bookShelf is an array of bookType struct.

THis is what i have so far . .please help

Explanation / Answer

Yes, The problem actually is very simple since you are given all the information you need. You have been give all the necessary structures required. Also the arrays which need to be maintained. You have the following menu. a. Add a new book b. Print the author and ISBN for a single title c. Print the entire bookshelf d. Quit You declare your bookshelf array of appropriate large size. What you need to do is in, a. You create an element of type bookType, add all the fields of the datastructure in this element. Then add this to the array bookShelf, and increment its index. i.e declare bookType temp; ...... Add all the fields of temp. ...... bookShelf[index] = temp; index++; b. You are given a single title, (Take it as input from user in a string). Search the array bookShelf by comparing the input title with title of each element of the array.(use strcmp) Whenever there's a match (use if - else clause) print the author and ISBN of the matched element. c. Printing the entire bookShelf just run for(count = 0 ;count
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote