Question: C++ 1) Write a OOP program that can store an array of 10 Positive integers. Remember, you are creating a class with variables, an array

C++

1) Write a OOP program that can store an array of 10 Positive integers.

Remember, you are creating a class with variables, an array and functions.

Create a UML class diagram:

Sketch out what: variables, an array and functions do you need ?

Functions: isfull, isEmpty, find, delete, print all

Initialize all elements in the array to all 99999's , 99999 mean an empty array element.

Add/code one of the good sorting algorithms: BUBBLE SORT

Add/code one of the top searching algorithms: BINARY SEARCH

Have a function to ask the user for input. Hint, got to check if array is not Full, before you can add a value.

Have a function to print out the array, non 99999 values.

Have a function to delete an integer. Hint, got to find if it exists in array first, before it can over write with 99999.

Have the ability to know/printout the count the number of integers

Test:

* Enter 23, 42, 75, 104, 32, 21, 11, 49 in this order...

* Sort element in array

* Find value 42

* Try to find value 91

* Delete 32 and resort array

* Print all element in array

Note: The int main() function contents, you write for program 1, should be exactly the same as program 2.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!