Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Submission Guidelines: - Add your full name, and student ID as comments at the beginning of the submitted file. Students who submit code files that

image text in transcribed
Submission Guidelines: - Add your full name, and student ID as comments at the beginning of the submitted file. Students who submit code files that contain compilation errors will get ZERO for the part that has a compilation error. - Submit your C++ source code file (.cpp) only. Problem Statement: An online book store has 7 books in its stores, each book has a name an ISBN, a price, and several copies. 1- Define the following four one-dimensional parallel arrays to store books information in them. An array of strings to store books names and initialize it with the following values: "Harry Potter", "The Little Prince", "Pinocchio". Two Cities", The Hobbit", "The Alchemist", "Heidi An array of integers to store books ISBNs and initialize it with the following values: 1887007, 8297107, 1953095, 8144074, 8741159, 3829710, 5309553. An array of integers to store books prices and initialize it with random numbers between 3 and 6. An array of Integers to store the number of copies of each book and initialize it with random numbers between 0 and 3 . 2- Print the content of the 4 arrays in a tabular format as follows: Name ISBN Price Copies 3- Display the information of the book that has the lowest price information (Name, ISBN, Price, Copies) in a wellformatted table, Note: If more than one book has the lowest price print the information of the first book in the arrays with the lowest price. 4- Sell a book. Ask the user to enter the ISBN of the book he wants to buy, search for books by ISBN. If the book is found in the list and the number of copies is greater than zero then decrease the number of copies for that book by one

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

Spatial Databases A Tour

Authors: Shashi Shekhar, Sanjay Chawla

1st Edition

0130174807, 978-0130174802

More Books

Students also viewed these Databases questions