Question
Hello! I posted the following question about 12 hours ago and still haven't received an answer. Please solve it as soon as possible. Thanks I'm
Hello! I posted the following question about 12 hours ago and still haven't received an answer. Please solve it as soon as possible. Thanks
I'm having trouble with the following question. Please explain the process as you go through it. It would be super helpful for me to understand. Thanks
-You are given a file called VectorHeader.h which contains all the function prototypes.
-Create a file called VectorFunctions.cpp which implements all the functions in the header file. Document this file with a banner containing your name, id, program title, date,and brief description. All you methods need to have single line comments explaining the functionality of parameters if any and returned data in addition to explaining the logic of the method. YOU ONLY NEED TO WORK ON THIS FILE FOR THE ASSIGNMENT
-You are given a driver file called VectorMain.cpp that does the following:
- Declare a vector of integers of VECTOR_SIZE (=10) and each number ranges between 1 and MAX_VALUE (=100)
- Populates the vector with random integers between the above values
- Sorts the vector in ascending order using the sort function available in the algorithm library
- Displays the vector- use iterators to traverse the vector for display
- Reverses the vector in ascending order using the sort function available
- Displays the reversed vector
- Removes the vector element with least value
- Displays the reduced vector
- Calculates the average of the remaining vector values
- Display the results in a formatted way using 2 decimal places
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