OOP CS3391 UNIT-1[Lecture Note-1]
OOP CS3391 UNIT-1[Lecture Note-1]
"Believe in yourself;
you are braver than you think,
more talented than you know,
and capable of more than you
imagine"
"Start each day with a Positive
thought, and a Grateful Heart"
"The secret of getting ahead, is
getting started".
SYLLABUS
Overview of OOP – Object oriented programming paradigms – Features of
Object Oriented Programming – Java Buzzwords – Overview of Java – Data
Types, Variables and Arrays – Operators – Control Statements – Programming
Structures in Java – Defining classes in Java – Constructors – Methods –
Access specifiers – Static members – Java Doc comments
General information
1.Procedure-Oriented Programming:
Procedure-Oriented Programming is a conventional programming which consists of
writing a list of instructions for the computer to follow and organizing these
instructions into groups known as Functions (or) Procedures (or) subroutines
(or)Modules.
Example: A program may involve the following operations:
Collecting data from user (Reading)
Calculations on collected data (Calculation)
Displaying the result to the user (Printing)
Characteristics of Procedural oriented programming:-
1. It focuses on process rather than data.
2. It takes a problem as a sequence of things to be done such as reading, calculating and
printing. Hence, a number of functions are written to solve a problem.
3. A program is divided into a number of functions and each function has clearly defined
purpose.
4. Most of the functions share global data.
5. Data moves openly around the system from function to function.
6. Employs top-down approach in program design.
Drawbacks of POP
Procedural languages are difficult to relate with the real world objects.
Procedural codes are very difficult to maintain, if the code grows larger.
Procedural languages do not have automatic memory management as like in Java.
The data, which is used in procedural languages, are exposed to the whole program.
So, there is no security for the data.
Examples of Procedural languages : BASIC, C, Pascal, FORTRAN etc.