Programming and Data Structures
9. Applications of Procedural Programming
Applications of Procedural Programming
- System Programming: Procedural languages like C are used for system-level programming, such as writing operating systems, device drivers, and embedded systems.
- Scientific Computing: Procedural programming can be used in scientific simulations and computations where a linear sequence of steps is involved.
- Scripting: Many scripting tasks, such as automating routine tasks or processing data, can be efficiently accomplished using procedural programming.
- Algorithm Development: Developing and testing algorithms, especially those involving numerical computations, can be done effectively using procedural languages.
- Small-Scale Projects: Procedural programming is well-suited for small-scale projects, prototypes, and tasks that involve simple calculations or data manipulations.
What is Object Oriented Programming?
Object-Oriented Programming (OOP) is a programming paradigm that organizes code by representing real-world entities and their interactions using objects. In OOP, code is structured around the concept of objects, which combine data (attributes) and the operations (methods or functions) that can be performed on that data. This approach promotes code modularity, reusability, and easier maintenance.
Object Oriented Programming or OOP is a programming paradigm that uses the concept of classes and objects to construct models based on the real world surrounding. An object is a constituent of a program that recognizes how to execute certain actions and how to interrelate with other elements of the program (study.com, 2003).
The main purpose of OOPs programming is to implement ideas and solve real-world problems using classes, objects, inheritance, polymorphism, and abstraction.
Objects are the foundation of object-oriented programming.
An object- oriented program uses a set of objects, which will communicate by sending and receiving messages to request services or information.
A class is a collection of objects with similar properties and behaviours (aka methods).
A Class is a collection of similar types of objects. It is commonly known as the 'blueprint of an object'. It is a template that describes the kinds of state and behavior that the object of its type support
A method (behaviours) in OO (Object-Oriented) language is like a procedure in procedural language. Finally, an object or a collection of objects (class) attempts to complete its goals (goals such as displaying ‘hello world’ on to the screen) by communicating by swapping messages. In fact, displaying ‘Hello World’ is a method. Some examples for Object-Oriented Programming languages include Java, C#.NET, C++, Python and Perl.