The Computer Revolution/Programming/Object Oriented vs. Structured programming< The Computer Revolution
Although there are differences between Structured programming and object oriented programming, they are both useful to programmers.So now let's have a lookup at it.
- Structured programming takes on the top-to-bottom approach.
- Structured programming is based around data structures and subroutines.
- It splits the tasks into modular forms. This makes the program simpler and easier to read with less lines and codes.
- This type of program accomplishes certain tasks for that of a specific reason.
- For example, invoice printers use structured programming. This type has clear, correct, precise descriptions.
- A structured program is decomposed into a hierarchy of processes. A process in this context is a body of code, typically a function or subroutine, that takes some input and manipulates it to produce an output. A process may be composed of other, more specialized processes, i.e., it may be a function that calls other functions.
Object Oriented ProgrammingEdit
- This type of programming uses sections in a program to perform certain tasks.
- It splits the program into objects that can be reused into other programs.
- They are small programs that can be used in other software.
- Each object or module has the data and the instruction of what to do with the data in it. This can be reused in other software .
- An object-oriented program is decomposed into a network of collaborating objects. An object represents a thing or concept and has a known set of behaviors that may be invoked by other objects. For any activity of the program, an object responsible for that activity may interact with other objects by invoking their behaviors, or "methods", until the activity is complete.