Abstract Classes and Methods
Abstract Classes and Methods
BY GROUP 7
ABSTRACTION
Abstraction in java is a process of hiding
the implementation details from the user
such that only the functionality will be
provided to the user. Abstraction can be
achieved through two methods.
ABSTRACT CLASSES
INTERFACES
ABSTRACT CLASSES
Any class created in java is automatically declared
as concrete, therefore for a class to be abstract it
must be declared using the “Abstract” keyword. An
abstract class can have both abstract and non-
abstract methods.
N.B. Abstraction is one of the four major concepts behind OOP
An abstract class is declared as follows
access_modifier = public/private/default/protected
There are rules governing the use,
application and extension of abstract
classes. but first we need to talk about
extension.
EXTENSION
When a class is extended it is called the super class
and the class that extends it is the subclass