0% found this document useful (0 votes)
90 views

Programming Approaches

Uploaded by

shreyahv48
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
90 views

Programming Approaches

Uploaded by

shreyahv48
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Programming Approaches – There are mainly 3 types of appraches which have been developed

till now -

1. Structured Programming -
➢ The basic principle of the structured programming approach is to divide a program into functions
and modules.
➢ The use of modules and functions makes the program more understandable and readable.
➢ It helps to write cleaner code and to maintain control over the functions and modules.
➢ This approach gives importance to functions rather than data.
➢ It focuses on the development of large software applications, like, C was used for modern
operating system development.
➢ The programming languages: The programming languages: PASCAL (introduced by Niklaus
Wirth) and C (introduced by Dennis Ritchie) follow this approach.

2. Procedural Programming Approach –


➢ This approach is also known as the top-down approach.
➢ In this approach, a program is divided into functions that perform specific tasks. This approach is
mainly used for medium-sized applications.
➢ Data is global, and all the functions can access global data.
➢ The basic drawback of the procedural programming approach is that data is not secured because
data is global and can be accessed by any function.
➢ Program control flow is achieved through function calls and goto statements.
➢ The programming languages: FORTRAN (developed by IBM) and COBOL (developed by Dr
Grace Murray Hopper) follow this approach.

3. The Object-Oriented Programming (OOP) Approach –


➢ It is nothing but that which allows the writing of programs with the help of certain classes and real-
time objects.
➢ We can say that this approach is very close to the real-world and its applications because the
state and behaviour of these classes and objects are almost the same as real-world objects.
➢ OOP treats data as a critical element.
➢ Emphasis is on data rather than procedure.
➢ Decomposition of the problem into simpler modules.
➢ Doesn’t allow data to freely flow in the entire system, ie localized control flow.
➢ Data is protected from external functions.

Advantages of OOPs –
➢ It models the real world very well.
➢ With OOP, programs are easy to understand and maintain.
➢ It offers code reusability. Already created classes can be reused without having to write them
again.
➢ It facilitates the quick development of programs where parallel development of classes is possible.
➢ With OOP, programs are easier to test, manage and debug.
Disadvantages of OOP –

➢ With OOP, classes sometimes tend be over-generalised.


➢ The relations among classes become superficial at times.
➢ The OOP design is tricky and requires appropriate knowledge. Also, one needs to do proper
planning and design for OOP programming.
➢ To program with OOP, the programmer needs proper skills such as that of design, programming
and thinking in terms of objects and classes etc.

You might also like