SENG1110 Study Guide - Final Guide: Semicolon, Compile Time, Data Element

152 views15 pages

Document Summary

The object oriented approach lays more emphasis on data rather than function and does not allow data to be accessed freely in the system. The basic principle of oop approach is to combine both data & function that operate on data into a single unit. The only way to access the data of an object is by its function. This secures data from any accidental modification from the outside function. The oop approach decomposes a problem into number of units called objects. It is clear that data of an object can be accessed only by the function of that object. The major motivating factor in the invention of object oriented approach is to remove some of the flaws encountered in the procedural approach. It is an approach that provides a way of modularizing programs by creating partitioned memory area for both data and functions that can be used as templates for creating copies of such modules on demand.