A+ Answers



Class Implementation and Vector Loops
Part A
Implement all member functions of the following class:
class Person
{
public:
    Person();
    Person(string pname, int page);
    string get_name() const;
    int get_age() const;
    void set_name(string pname);
    void set_age(int page);
private:
    string name;
    int age;  //0 if unknown
};
Part B
Write a loop that fills a vector V with ten random numbers between 1 and 100. 
Part C
Write a loop that fills a vector V with ten different random numbers between 1 and 100.