Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

the outputs should look like this Inserting and deleting items from an one dimensional array are common and useful operations. In this lab, we will

image text in transcribed

the outputs should look like this

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

Inserting and deleting items from an one dimensional array are common and useful operations. In this lab, we will practice using Insert operation with array. We will add to the program written in open lab 9 such that we can add new books to the collection. Once read, it prints out the list of book titles, one title per line. You are required to define a user defined function to display the book titles You may refer back to the part of the source code from closed lab 9 Afterwards, the program goes into a loop prompting the user to add book titles, one at a time, to the collection. Each iteration through the loop: . First, it prompts the user for a new book title, . If this title is already in the collection, displays an error message Otherwise, it asks the user where to add the book in the collection, If the location entered is a valid location, insert the title, otherwise, display an error message. A user defined function is required to insert the value into the array, the input to the function include: 1. the new book title, and 2. the location where the new title is to be inserted This loop ends when the user enters an empty book title when prompted, i.e., press "ENTER" when prompted for book title. Here is an example run of the program: Inserting and deleting items from an one dimensional array are common and useful operations. In this lab, we will practice using Insert operation with array. We will add to the program written in open lab 9 such that we can add new books to the collection. Once read, it prints out the list of book titles, one title per line. You are required to define a user defined function to display the book titles You may refer back to the part of the source code from closed lab 9 Afterwards, the program goes into a loop prompting the user to add book titles, one at a time, to the collection. Each iteration through the loop: . First, it prompts the user for a new book title, . If this title is already in the collection, displays an error message Otherwise, it asks the user where to add the book in the collection, If the location entered is a valid location, insert the title, otherwise, display an error message. A user defined function is required to insert the value into the array, the input to the function include: 1. the new book title, and 2. the location where the new title is to be inserted This loop ends when the user enters an empty book title when prompted, i.e., press "ENTER" when prompted for book title. Here is an example run of the program

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

Spatio Temporal Database Management International Workshop Stdbm 99 Edinburgh Scotland September 10 11 1999 Proceedings Lncs 1678

Authors: Michael H. Bohlen ,Christian S. Jensen ,Michel O. Scholl

1999th Edition

3540664017, 978-3540664017

More Books

Students also viewed these Databases questions

Question

10-2 What are the principal e-commerce business and revenue models?

Answered: 1 week ago