Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Looking for help on Q4 displayBooks. HAS to be written in C, NOT C++. It is prompt B in the A-D list of prompts in

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

Looking for help on Q4 displayBooks. HAS to be written in C, NOT C++. It is prompt B in the A-D list of prompts in first given menu-driven options.

This is a menu-driven program that uses the following options: a) Add a new book. The book details (title, ID, aisle, bookType) are given as function arguments. You should add the book only if the book is not already present in the array and there is space in the array to add a new book. b) Display the all book's information. See expected output below. c) Display only the books whose ID falls within a range (in descending order) d) Display the book with the longest title among the books whose bookType contain a specific substring. Ask the user for a substring. This function is used to demonstrate garbage collection. displayBooks(): This function displays the list of books. Parse the object array 'b' and display the details of all books in the array. See expected output given in question file. You can call the class function 'displayBook()' here. Note that these are two different functions. // Q4 displayBooks (5 points) // This function displays the list of books. 1/ Parse the object array 'b' and display the details of all books in the array. See expected output given in question file. // You can call the class function 'displayBook()' here. Note that these are two different functions. // Book::displayBook() displays details of one Book object, while displayBooks() should display all books. void displayBooks) { // enter code here } CSE240 HWS Please select an action: a: add a new book d: display book list s: sort the books in descending order based on ID (within a range) n: display the book with the longest title anong the books whose book Type contain a specific substring 4: quit . Title: The Alchemist ID: 1 Aisle: 101 Book Type: Fiction Title: A Promised Land ID: 2 Wislei 102 Book Type: Nonfiction Title: Sapiens ID: 3 Aisle: 103 Book Type: Nonfiction

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

Seven Databases In Seven Weeks A Guide To Modern Databases And The NoSQL Movement

Authors: Luc Perkins, Eric Redmond, Jim Wilson

2nd Edition

1680502530, 978-1680502534

More Books

Students also viewed these Databases questions

Question

In what directory are templates placed?

Answered: 1 week ago