Subclass (computer science)
Appearance
In object-oriented programming, a subclass is a class that inherits some properties from its superclass.
You can usually think of the subclass as being "a kind of" its superclass, as in a "a Manx cat is a kind of cat", or "a square is a kind of rectangle".
cat | rectangle |
---|---|
has fur has four legs has a tail |
has four sides, lengths w and h |
manx cat | square |
does not have a tail | all sides have same length, w=b |