 |
|

Given the following class definitions:
// Animal class
class Animal
{
private:
string type;
int age;
string intToString(int i);
public:
Animal();
Animal(string newType, int newAge);
string getDescription();
};
// Cow class
class Cow : public Animal
{
private:
string breed;
public:
Cow();
Cow(int newAge, string newBreed);
string getBreed();
};
What variables/methods are available for an object of type Cow? e.g. if we declare:
Cow bessie(3,"Holstein");
What can we access after the dot? E.g. can we access bessie.getBreed(), etc? |
 |
| |
|
|
 |