/**************************************************************** example 3 - driver.cpp test program for class animal ****************************************************************/ #include "animal.h" void main() { animal dog("Woof!"); cout << "The dog goes "; dog.talk(); cout << endl; cout << "When the dog is mad, it goes "; dog.setSound("Grrrrr...."); dog.talk(); cout << endl; animal rooster; cout << "The rooster goes "; rooster.talk(); cout << " unless it's sunrise." << endl; rooster.setSound() = "Cock-a-doodle-doo!!!"; cout << "At sunrise, the rooster says "; rooster.talk(); cout << endl; }