You are on page 1of 19

INTRO TO

PROGRAMMING
FEROL JOHN NOHAY
TERMINOLOGIES
• Computer program - is a set of instructions that you write to tell a
computer what to do.
• Programming - the process of writing computer program in a language that
the computer and programmers understand.
• A program that performs a task for a user (such as calculating and producing
paychecks, word processing, or playing a game) is application software
• A program that manages the computer itself (such as Windows or Linux) is
system software.
• The logic determines the exact order of instructions needed to produce
desired results.
TYPES OF PROGRAMMING
• LOW LEVEL PROGRAMMING LANGUAGE – are languages that
correspond closely to the computer’s circuitry and are not as easily read
or understood.

• Characteristics
1. It is a machine friendly language. 6. It is non-portable.
2. It is high memory efficient.
7. It is machine-dependent.
3. It is tough to understand.
8. It needs assembler for translation.
4. It is complex to debug.
9. It is not commonly used now-a-days in
5. It is complex to maintain. programming.
TYPES OF PROGRAMMING
• Example of Low Level Programming Language
• Assembly Language
TYPES OF PROGRAMMING
• Example of Low Level Programming Language
• Machine Language
TYPES OF PROGRAMMING
• HIGH LEVEL PROGRAMMING LANGUAGE – are languages that allows
you to use English-like, easy-to-remember terms such as read, write, and
add

• Characteristics
1. It is programmer friendly language. 6. It is portable.
2. High level language is less memory efficient.
7. It can run on any platform.
3. It is easy to understand.
8. It needs compiler or interpreter for translation.
4. It is simple to debug.
9. It is used widely for programming..
5. It is simple to maintain.
PARADIGMS IN PROGRAMMING
• There are 2 important paradigms in programming:
• Procedural Programming
• Object-Oriented Programming

• Procedural Programming
• step-by-step process of instructions to tell the
computer
• it relies on Procedures, Routines, or sub-routines
• also referred to as imperative programming
• also known as Top-Down Languages
• Example: C, COBOL, FORTRAN
PARADIGMS IN PROGRAMMING
• Object Oriented Programming
• It is an approach on how to solve a problem.
• It focuses on the OBJECT that the developers
want to manipulate than the logic to
manipulate it.
• Example: Java & C++
OBJECT ORIENTED
PROGRAMMING
FEROL JOHN NOHAY
OBJECT ORIENTED PROGRAMMING
• Object
• the basic unit of the OOP.
• something material that may be perceived by the senses (Merriam
Webster)
• Example of Object - Person, Animal, Things, Fruits

• In technical terms, it component of a program that knows how to


perform certain actions and how to interact with other elements of the
program.
OBJECT ORIENTED PROGRAMMING
• Class
• blueprint of an object
• it tells the virtual machine
on "how" to make an object
of that particular type.
OBJECT ORIENTED PROGRAMMING
• Instance Variable
• things that an object "knows" about itself.
• other way of saying Object.

• Methods – things that an object “do”


OBJECT ORIENTED PROGRAMMING
• The 4 Pillars of Object Oriented Programming
• Encapsulation
• Abstraction
• Inheritance
• Polymorphism
PILLARS OF OBJECT ORIENTED PROGRAMMING
• Encapsulation
• bundling up data and member function (Method) together into a single unit
• it can only be achieve if there is PRIVATE variable in a class and the other
classes has no access to the variable and can be access through class
method.
• it is mostly use for security purposes.
• sometimes called "information hiding"
PILLARS OF OBJECT ORIENTED PROGRAMMING
• Abstraction
• is the process of showing only
essential features of an object
to the outside world and hide
the other irrelevant
information
• it works together with
Encapsulation
PILLARS OF OBJECT ORIENTED PROGRAMMING
• Inheritance
• ability to create classes (subclass) that shares the attributes and methods
of the existing classes (parent class), but with more specific functions.
• Types of Class Inheritance in Java
• Single Inheritance - parent and child
• Multi-level inheritance - grandparent-parent-child
• Heirarchical Inheritance
PILLARS OF OBJECT ORIENTED PROGRAMMING
• Inheritance
PILLARS OF OBJECT ORIENTED PROGRAMMING
• Polymorphism
• having many forms.
• a single line of code (method) can have multiple meanings, and which
meaning is to be used depends upon various factors.

• Types of Polymorphism in Java


• Method Overriding - having two methods with the same method name
and parameters.
• Method Overloading - when two or more methods in one class have the
same method name but different parameters.
TYPES OF POLYMORPHISM IN JAVA
• Method Overriding • Method Overloading

You might also like