Programming in C++ Assignment
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.
Submit a screenshot of the executed program and the code of the program.
Part C
Write a loop that fills a vector V with ten different random numbers between 1 and 100.
Submit a screenshot of the executed program and the code of the program.
10 years ago 20
Answer(1)
Purchase the answer to view it
NOT RATED
- programming_in_c.docx
Bids(1)
other Questions(10)
- Transfer Pricing
- How Democratic Is the American Constitution by Robert A. Dahl
- UNIT 8 DISCUSSION AUTOMATED
- DQ
- Applied Decision Making
- religions
- AGREED
- Describe the greenhouse effect and its importance to life on earth. What are the ways in which human activity is increasing heat storage in the atmosphere?
- Accounting Questions
- paper3