Here is what we were assigned. I have no idea how to start this program. Any help would be great.
Here is the assignment:
Write a program that implements the Vector code written in class as a user-defined data-type (class). Vectors should….
a. Have private variables vect(int *), growth (int), maxSize(int)
b. Have a class constructor that allows the user to specify the initial values needed for the vector to work (initial array size and growth factor).
c. Have a public addItem method that allows the user to add elements to the vector.
d. Have a public deleteItem method that allows the user to delete items from the top of the vector.
e. Have a private resize function that executes when the vector reaches full capacity. The resize function should print a message to the screen each time it’s called.
f. Have a public printItems function that display just the top element of the vector class, along with the current size and the current maximum size.
3. Inside of main, use the following code to test your Vector class.
a. Create a new instance of type vector with a growth of 5 and a max-size of 10.
b. Use a random number generator to insert 5 random elements into the vector.
c. Print the contents of the vector.
d. Use deleteItems twice.
e. Add 9 more random elements
f. Print the contents of the vector.
Here is the code we have done in class. Where do I begin to change anything?
I am very shy at my school and its hard to find assistance to help in these projects. Any help I can get is greatly appreciated.
#include <iostream>
#include <string>
using namespace std;
class student
{
public: