Professional Documents
Culture Documents
programming?
is a programming paradigm
that focuses on using objects to
design and build application.
What is a class?
it is a template of an object.
For example, a class called animal
would give a blueprint for what an
animal looks like and what an animal
can do.
What is an object?
It is an entity that has state and
behaviour. A state is the data of an
object. The behaviour is the
functionality of the object
A simple example of an object
would be a Person. A person has a
name, colour or breed. And their
behaviour is walking.
What is a method?
a method is a set of statements
to perform a task.
What is Method Overloading?
it is a class that have multiple
method that has the same name but
different arguments.
What is a constructor?
a special method that is used
to initialized an object.
If we dont declare a
constructor in java, the compiler
builds a default constructors for that
class.
It doesnt have a return type,
and it must have the same name as
the class with or without parameter.
What is polymorphism?
it is the ability of an object than
can take many forms. There are 2
types of polymorphism
Run time is done using
inheritance and interfaces
Compile time is done using
method overloading
What is abstraction?
process of hiding the
zimplementation details and showing
only the functionality to the user.
In other words user will have
the information on what the object
does instead of how it does it.
What is encapsulation?
process of wrapping
code and data in a single unit.
Use setters and getters
method to modify and view the
variables
What is an interface?
it is a blueprint of class that
have static constants and abstract
methods.
What is a package?
it is a namespace that
organizes a set of related classes or
interfaces.
What is inheritance?
process of obtaining data
members and methods of one class
to another class.
It represents IS-A relationship,
also known as parent-child.
In java, the class that is
inherited is called the super class.
And the new class is called subclass
What is aggregation?
it contains to have ownership
of that class.
It represents HAS-A
relationship
CONCRETE METHOD:
ABSTRACT METHOD:
abstract void eat()
Abstract methods are those
who need to implemented in
subclass. They are only defined in
super class but with no body.
WHAT IS DESIGN
PATTERN?
Solution to general problems that
software developers faced during software
development