This is C++ Programming Given the following classes: #include class Person { char* name; public: Person(); Person(const char*); void setName(const char* nm); void display(std::ostream&) const;...


This is C++ Programming



Given the following classes:




#include



class Person


{


   char* name;


public:


   Person();


   Person(const char*);


   void setName(const char* nm);


   void display(std::ostream&) const;


   Person(const Person&); // copy constructor


   Person& operator=(const Person& src); // copy assignment


   ~Person();


};



class Student : public Person


{


   int no;


   float* grade;


   int ng;


   void init(int, int, const float*);


public:


   Student();


   Student(int);


   Student(const char*, int, const float*, int);


   Student(const Student&); // copy constructor


   Student& operator=(const Student& src); // copy assignment


   ~Student();


   void display(std::ostream&) const;


};



write implementation for the following functions (you can call other functions from these classes if you want assuming that they are implemented):


   ~Person();


   Person& Person::operator=(const Person& p);


   Student(const Student&);



Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here