RSS

Category Archives: Basic Concepts of oop

Abstract Class


The class which can not be instantiated is known as an Abstract Class. This particular article contains the details of an Abstract Class.

Introduction

The class which cannot be instantiated is known as an Abstract Class. That is, an object of it cannot be created. Hence it must be inherited. Let me cite some of the features of an Abstract Class.

Features of an Abstract Class

1. Abstract Class cannot be instantiated.
2. An Abstract Class must be inherited.
3. It may have Concrete Methods.
4. It may have Abstract Methods.
5. An Abstract Method of an Abstract Class must be overridden.
6. An Abstract Class can only contain Abstract Method.

Abstract Class cannot be instantiated.

Error Message

It must be inherited

Output

Abstract Class may have Concrete Method

Output

Abstract Class may have Abstract Method

Error Message

An abstract method of an abstract class must be overridden

Output

An Abstract Method can be present only in Abstract Class

Error Message

Hope this article will be useful.
Thanks!
Advertisements
 
Leave a comment

Posted by on July 17, 2011 in Basic Concepts of oop

 

Tags: , ,