Consider the following class declaration: class Cow { char name[20]; char * hobby; double weight; public: Cow();

Question:

Consider the following class declaration:
class Cow {
char name[20];
char * hobby;
double weight;
public:
Cow();
Cow(const char * nm, const char * ho, double wt);
Cow(const Cow c&);

~Cow();
Cow & operator=(const Cow & c);
void ShowCow() const; // display all cow data
};
Provide the implementation for this class and write a short program that uses all the member functions.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

C++ Primer Plus

ISBN: 9780321776402

6th Edition

Authors: Stephen Prata

Question Posted: