Question: Code using c++, Augment the code below the picture to answer the rest. #include #include #include using namespace std; class Person { private : string
Code using c++, Augment the code below the picture to answer the rest.#include
#include #include using namespace std; class Person { private: string name; int age; public: Person() {} Person(const string &name, int age) : name(name), age(age) {} const string &getName() const { return name; } void setName(const string &name) { Person::name = name; } int getAge() const { return age; } void setAge(int age) { Person::age = age; } friend ostream &operatorconst Person &person) { os return os; } }; int main() { Person person1("Joey Beltram", 44), person2("Frankie Bones", 45); ofstream out("temp.txt"); out return 0; }
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock

#include