Computer problems,Computer help
*AX SOFT>>>Programming & Design

The most important differences between called top down or structured) programming?


the most important differences between object-oriented programming
languages and generations 1-4 of (often called top down or structured) programming
languages. How are they similar?


I am having trubles with this one i have read all the text and still dont understand this please help me someone ..

There are lots of similarities and overlaps, but basically the difference is this:

In structured programming, the idea was that the overall flow of control of the program was laid out using a function call hierarchy - sort of like an inverted tree. The main routine was at the top and then called routines branched out in successive layers under that. When these functional "trees" were implemented as skeleton code (ie. just routine headers, calls to other routines and then exits) without any real business logic or other body, this was called "Top Down" programming, because the tree was implemented from the "top down" to give it structure, before any of the detail was filled in. In this way the overall flow and structure of a progam can be tested before being overwhelmed by detail.

By contrast, Object Oriented programming doesn't think of a single flow of control through the program. Instead, real-world business entities in the problem space are implented as individual objects with (a) their own data and (b) their own behaviour (ie. functionality). The progam is then put together by implementing logical flow of control from object to object, with each one doing "it's own thing" and then calling on other objects to "do their own thing". In this way, it's hoped that overall functionality within the program is encapsulated and divided up logically so that each bit can be implemented separately and, hopefully, re-used in other programs.

That's a VERY inadequate overview, but I hope it helps.

That's like the differences and similarities between apples, colors and yes. Object oriented code can be structured, and you can write top down or bottom up with structured or unstructured code, object oriented or not.

You use Top Down Programming in Object Oriented Programming.

Top Down means that the execution starts from the top of the routine to the bottom without any go to statements.

I will set you look up Object Oriented Programming. I would have to write a book on what OOP's is and I do not have the time.

While some of the other descriptions are good...

In either object oriented programming[OOP] or structured programming[SP], all the behaviors still need to be defined(coded). The real difference is how they are grouped together. In SP, the are loosely grouped in libraries. In OOP, they are tightly grouped in objects.

When a behavior(subroutine) is "called" in SP, a pointer to code is created in code.

When a behavior(method) is called in OOP, a pointer to data(object instance) is created in the code and a pointer to code is created in data(method pointer). Methods are called indirectly - well not always, but if you are using the real capabilities of OOP, they are.

It is quite feasable to use OO techniques in SP - I have even used OO techniques in assembly language programming.

In spite of what anyone says, there is nothing you can do in SP that you can't do in OOP, and there is nothing you can do in OOP that you can't do in SP - they both run on the same hardware.

Tags
  General - Computers & Internet   Software   Security   Programming & Design   Facebook   Flickr   Google   MSN   MySpace
Related information
  • Php: strptime replacement?

    strftime ...

  • Getting input from a text file using c strings in c++?

    Sure, as long as you use the #include<fstream> header, and name the file you want to use as input. When you parse the data, just store it to a C-String, which as you should know is an array m...

  • Hey can anyone help me plz find....??

    Go to any picture you want and right click it chose save as, then open the file in paint and you can change it to any size you want. Just go to stretch/skew and put in how much bigger or smaller yo...

  • Does anyone know any really good open source game engines?

    There are a number of open source engines to suggest such as Ogre, Crystal Space, and Irrlicht. Torque is a great value for a commercial engine. Also, the "source of all knowledge" actu...

  • Is there easy way to....?

    Well programming language as such is not a difficult thing to learn. Where things get a little tricky are the algorithms that we have to use to implement the problem. Programming language is nothin...

  • How to make a photo look like this one ?

    They took the picture of an old picture and overlayed ginny and harry. Then they used the cut tool and made an uneven patch along the old picture layer. Seperated them, and put harry on one side ...

  • Whats the best way to extract logos from a website or picture file for my own use?

    Right click > copy > paste into image editor e.g. paint, photoshop > crop the areas you don't want and save. If copying doesent work do a screen shot by pressing your 'Print S...

  • Question on AMV's?

    u can create amv by using windows movie maker it will tell u the steps required

    ...
  •  

    Categories--Copyright/IP Policy--Contact Webmaster