|
|
Subclasses
A key feature of object-oriented programming
is that classes can be extended in subclasses. If we say that class X is a subclass of
class Y, this means that X inherits all the methods and variables of Y, and perhaps more.
This is a very important organisational feature, which will be covered in more detail in
the next unit. One class is defined as a subclass of another by using the extends keyword.
This will be covered in much more detail later in the course.
RITSEC - Global Campus
Copyright ?1999 RITSEC- Middlesex University. All rights reserved.
webmaster@globalcampus.com.eg
|
|