Expert answer:Need help with Programming C++ and menu choices (m

Answer & Explanation:In this assignment you will create a program that allows the
user to choose between the following menu choices (menu-driven program):
1. Linear Search
2. Binary Search
3. Bubble Sort
4. Selection Sort
5. Quit
Keep running the program till the user chooses to Quit.
Your program should have the following parts:
Searching Algorithms (Linear and Binary Search) You are the
owner of a book store. You have the following information available in your
stock (information is stored in the form of parallel arrays):
string bookTitle[] = {“Starting out with C++”, “Java
Programming”, “Software Structures”, “Design and Analysis of Algorithms”,
“Computer Graphics”, “Artificial Intelligence: A Modern Approach”, “Probability
and Statistics”, “Cognitive Science”, “Modern Information Retrieval”, “Speech
and Language Processing”};
int bookID[] = {1101, 1211, 1333, 1456, 1567, 1642, 1699,
1755, 1800, 1999};
double bookPrice[] = {112.32, 73.25, 54.00, 67.32, 135.00,
173.22, 120.00, 42.25, 32.11, 123.75};
First display() the above information to the user in a
tabular format. Your program should then accept the.
book ID and the number of books the user wishes to purchase.
Based on the book ID provided by the user, display the following information
(if the ID is found):
 – Book ID
– Book Title
 – Number of books
bought
 – Total cost of the
purchase If the book ID is not found, display a message saying so. The book ID
needs to be searched based on linearSearch() or binarySearch() (based on user
choice from the menu).
 Sorting Algorithms
(Bubble and Selection Sort)
Your program should generate 1000 random numbers in the
range of 1 to 500 and store them in an array. Use bubbleSort() or
selectionSort() (based on the menu choice) to sort the array of numbers.
Display both the unsorted and the sorted array.
A sample output has been provided to you at the end of this
document.
Instructions: Please make sure your code has following
functions:
• display(): To display the contents of parallel array in a
tabular format
• linearSearch(): To apply the linear search algorithm to
search for the book ID
• binarySearch(): To apply the binary search algorithm to
search for the book ID
• bubbleSort(): To apply the bubble sort algorithm to sort
the elements of an unsorted array
• selectionSort(): To apply the selection sort algorithm to
sort the elements of an unsorted array
You can use additional functions (optional) for other
operations. Make sure your program runs till the user decides to quit the
program. Your program should validate (input validation) the menu choice
entered by the user. A bonus programming part has been provided below for extra
points.
Bonus Part (Optional): 25 points
 We want to test the
efficiency of our searching and sorting algorithms. To test the efficiency I
want you to calculate and display the execution (elapsed) time (in seconds)
required for each of the Searching and Sorting techniques. Execution time is
calculated from the start of a function call to the end of the function. Look
up online resources on how to calculate elapsed time and using the system time
library.
Can you tell which searching technique is better/faster
(linear search vs. binary search) and which sorting technique is better/faster
(bubble sort vs. selection sort)?
Sample Output:
**** SEARCHING & SORTING MENU ****
1. Linear Search
2. Binary Search
3. Bubble Sort
4. Selection Sort
5. Quit
Please enter your choice: 1
 **** LINEAR SEARCH
*****
Book
1101
1211
 …

 ID Title Cost
Starting out with C++ $112.32 Java Programming $73.25 … … … …
 Please enter the book
ID you wish to purchase: 1101 How many copies you wish to purchase: 2
Book ID: 1101 Book Title: Starting out with C++ Number of
books bought: 2 Total Cost: $ 224.64
The output will look the same for Binary Search too.
**** SEARCHING & SORTING MENU ****
1. Linear Search
2. Binary Search
3. Bubble Sort
4. Selection Sort
5. Quit
Please enter your choice: 3
**** BUBBLE SORT ****
Unsorted array:
23 45 321 1 87 122 500 222 45 455 321 387 ………….
Sorted array:
1 23 45 45 87 122 222 321 321 387 455 500 ………….
The output will look the same for Selection Sort too.

How it works

  1. Paste your instructions in the instructions box. You can also attach an instructions file
  2. Select the writer category, deadline, education level and review the instructions 
  3. Make a payment for the order to be assignment to a writer
  4.  Download the paper after the writer uploads it 

Will the writer plagiarize my essay?

You will get a plagiarism-free paper and you can get an originality report upon request.

Is this service safe?

All the personal information is confidential and we have 100% safe payment methods. We also guarantee good grades

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more

Order your essay today and save 20% with the discount code ESSAYHELP