Tuesday, December 15, 2015

Object Oriented VS Structure Paradigms


   >>> Different people will see the question in a different light. Object - Oriented programming in its pure form allows you to design classes of objects and then create instances of those classes.

   >>> A class is basically a "template" for the object in that the class knows what kinds of things the object needs to know about (attributes) and what kinds of things the object does (methods).

   >>> when you use this class template to instantiate or create an instance of an object you basically cause a new object represented by that class to exist in the scope of your program.

   >>> The developer can think about what attributes an object needs to now about and how the object needs to act those attributes. The System them tracks Much of the detail involving interactions of objects and manages much or all of the "gory details" of memory management etc.

   >>> Structured programming is mainly a way of breaking a problem into routines.

   >>> In structure paradigms primary focus in on functions.

   >>> First pick out the major tasks that need to be accomplished and these tasks become modules within each task or module identify components or building blocks and they become functions. It emphasizes functionality and does not stress data. It is particularly appropriate for applications that have a lot of independent functions that do not interact much.

   >>> In contrast to that object - oriented designs work well at a  higher level of abstraction. They facilitate the designing of modules decomposing a problem from the top level down.

   >>> At the point at which you have identified the object interfaces ( based on the data structures) and you start designing the code to support them within the modules it is usual to switch to a structured design.

   >>> In it problem is viewed as a list of instructions a sequence of things to be done such as reading, calculating & printing.

   >>> Structured techniques may on projects with 100,000 lines of source code or more Object  - Oriented techniques seem to be a better solution for the coherent design of large projects.

   >>> OOP languages also usually support inheritance which means that you can define general objects that have basic features common to whole sets of objects then build upon those generic definitions to create more specific objects from them.

   >>> For instance, if you have a generic object for a Christmas tree decoration it might have characteristic like weight and color. You could then subclass this general definition to make new classes for light strands, garlands and glass bubbles each if which would have the basic weight and color but would add new attributes and methods that would further define these new subclass of objects.

   >>> Simple tasks are usually much better accomplished through structured programming.

   >>> But maintenance of a large software system is tedious and costly.

No comments:

Post a Comment