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&);
This is C++ Programming
Given the following classes:
#include <iostream>
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&);
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 4 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)