Create program definition with the following templates and methods: // output mi
ID: 3538377 • Letter: C
Question
Create program definition with the following templates and methods:
// output miniVector v
template
void writeMiniVector(const miniVector& v);
// use insertion sort to place miniVector v in descending order
template
void sortMiniVector(miniVector& v);
6
Main Method
1. Declare: miniVector v;
2. Declare: randomNumber rnd;
3. call v.push_back(rnd.random(100)); to push 15 entries from 0-99 onto the vector
4. call writeMiniVector to output vector
5. call sortMiniVector to sort the vector
6. call writeMiniVector to output the sorted vector.
After you output the sorted vector:
Include: system("PAUSE"); after your output to pause the screen.
Explanation / Answer
#include #include #include void SortMiniVector(int MiniVector[], int last){ int hold; int walker; int current; for (current = 1; current = 0 && holdRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.