Java Reference
In-Depth Information
The class Pet is an abstract class. You can tell that it is an abstract class by
the dashed rectangle.
The methods GetName(), GetLocation(), and GetPrice() are the interface to
the system. These methods are polymorphic in all the classes. In the ab-
stract class Pet, the methods GetName(), GetLocation(), and GetPrice() are
abstract methods. In a class diagram abstract methods are identified by typ-
ing the method names in italics.
The attributes petName, petLocation, and petPrice are defined in the super-
class only. It is not necessary to redefine the attributes in the subclasses.
Search WWH ::




Custom Search