Exercises
Create operator functions to allow us to determine whether two DomesticMammal
instances are equal or not with the ==
and !=
operators. We will consider the instances to be equal when their age
, name
, and favoriteToy
properties have the same value.
Create the following three new subclasses of the TerrierDog
class:
AiredaleTerrier
: This is an Airedale Terrier breedBullTerrier
: This is a Bull Terrier breedCairnTerrier
: This is a Cairn Terrier breed
Add the necessary code in these classes to print the text that represents the children in a different way than we did for the SmoothFoxTerrier
class. Test the results by creating an instance of each of these classes and calling the printChildren
method.