CIS-260 Home http://www.c-jump.com/bcc/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Link to this video on YouTube: Difference between OO and procedural programming
Old software systems were implemented with third generation programming languages that used procedural programming concepts.
These systems are called legacy systems.
Procedural programming involves writing a series of instructions in sequence:
all input data from keyboard or disk drive is read into "globally" shared memory;
the "next" computer instruction follows "current" instruction, occasionally passing control to another instruction somewhere in memory;
all output data is written to console screen, printer, or disk drive from the shared memory.
Procedural programming is also known as structured code.
In procedural programming, any part of the program can add, modify, or delete any data in shared memory at any time.
This has a huge potential for some serious design and maintenance problems down the road.
Alternatively, the software can be implemented as a collection of objects.
Each object is defined by its attributes and its behaviors.
Combining certain data and operations to form an object is known as encapsulation. This separates data inside objects from "globally" shared memory.
Keep objects small with minimum data required by their functionality and a minimum number of methods.
Each object should be designed to have specific tasks.
A system should contain many small interacting objects rather than a few large objects.