Question: 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-
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 well formatted table Note: If more than one book has the lowest pride 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
Get step-by-step solutions from verified subject matter experts
