Question
Please use C++ Please compile & execute code in Command Prompt or Terminal / DO NOT USE IDE Please Include a Snipping Photo of the
Please use C++
Please compile & execute code in Command Prompt or Terminal / DO NOT USE IDE
Please Include a Snipping Photo of the Whiteboard / Pseudo Code of the program below for hardcoded common algorithms
Label using comments the "class" and "object constructors" in your source code.
Make sure to have a deconstructor as part of your class. Label the deconstructor as well.
Implement a class for Task 1 and Hardcode algorithms for Linear Search, Middle Value, First Value, Last Value, Highest Value, Lowest Value, and Bubble Sort.
Main Function: Control of operation
the class called Common_Alg
The class will contain the methods below and an array as the data structure.
The array will be a "Class Variable"
In your Class declare and fill an array with 1000 random integers between 1 - 1000.
Filling the array with random integers should happen in the class constructor.
Please use comments to identify constructors and methods in the program.
- Output all values
- Output sum All values
- Output All odd numbers
- Output All Even numbers
- Enter a search value / Implement Linear Search
- Output Middle Value (Values in the Middle)
- Not AverageOutput First Value in the Array
- Output Last Value in the Array
- Output the Highest Value and its location in the array. (Hardcode the algorithm.)
- Output the Lowest Value and its location in the array. (Hardcode the algorithm.)
- Sort and then output values. Hardcode the bubble sort algorithm you will implement.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started