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 is a kind of cat", or "a square is a kind of rectangle":A cat has fur, four legs, and a tailA Manx cat does not have a tail, but has all of the other characteristics listed aboveA rectangle has four sides with lengths w and hA square has all of the characteristics of a rectangle; in addition, w = h. Some point out that squares may be a type of rectangle mathematically but are rarely desired to be treated as such in computer programs since changing the width of a rectangle does not change its height whereas this is the case for a square.
See more at Wikipedia.org...