Base Class

In many classes that you create, you will find that you often need the same properties and methods from another class that you created earlier.
For example, if you have a base class called the Person class, and it contains UserName and Address properties and a Display method, you will find that for an Employee class, you need the same properties and methods. You may also need additional properties, such as EmployeeID and Salary. When you inherit from the Person class (the base class) you can add these properties to this new Employee class, and still have access to all of the properties in the Person class.
or
If Class Y derives from Class X, then Class X is a base class.
The class which derives functionality from a base class is called a derived class. If Class Y derives from Class X, then Class Y is a derived class.


No comments: