Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Objective: Write a program that performs the following tasks: 1. Generate some number of random numbers but no more than 40-ish. Ask the user how

Objective: Write a program that performs the following tasks: 1. Generate some number of random numbers but no more than 40-ish. Ask the user how many numbers to generate, though. And Ask the user how large the random numbers should be, but dont accept a number larger than 20. (That will help ensure that there are multiple numbers of the same value generated by the random number generator. If you dont see multiples of any numbers, restart the program and either use more numbers or a smaller spread of random numbers.) 2. Store all the generated numbers in a vector. 3. Show the vectors statistics: size and capacity. 4. Show the vectors contents. (They will be unsorted.) 5. Sort the numbers within the stack you created using Bubble Sort (or you may use a more advanced sorting technique if you prefer). 6. Show the vectors contents again. (They should be sorted.) 7. Create a routine that asks the user to enter a number. Search the vector for this number and report to the user whether the number was found. 8. For 10 extra credit points, if the number sought by the user is found, report how many times that number appears in the vector. Use the binary search method. 9. All output must be adequately labeled and user-friendly. 10. Use good program decomposition techniques. Annotations for the code: 1. The main function can be at either the beginning or the end of the program. I dont care which. 2. Add comments at the top of your main.cpp file to include your name, the name of the program, and notes on how your design works when executed. Point out any special features or techniques you added using a comment saying // Special Features. 3. Comment your code effectively, as we discussed in class. Use descriptive variable names everywhere so that the code becomes as self-documenting as possible. Use additional commentary to improve readability and comprehensibility by other people. 4. You absolutely MUST use consistent indentation and coding styles throughout the program. Failure to do so will result in a loss of three points. 5. If the program does not work at all, or works incorrectly, 10 points will be deducted. 6. No late submissions will be accepted. Please meet the deadline

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

Formal SQL Tuning For Oracle Databases Practical Efficiency Efficient Practice

Authors: Leonid Nossov ,Hanno Ernst ,Victor Chupis

1st Edition

3662570564, 978-3662570562

More Books

Students also viewed these Databases questions

Question

4. Are there any disadvantages?

Answered: 1 week ago

Question

3. What are the main benefits of using more information technology?

Answered: 1 week ago

Question

start to review and develop your employability skills

Answered: 1 week ago