LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   Difference between Top Down programming & Bottom up programming (http://www.linuxquestions.org/questions/programming-9/difference-between-top-down-programming-and-bottom-up-programming-334470/)

minil 06-17-2005 02:02 AM

Difference between Top Down programming & Bottom up programming
 
Hi
i am new to C++ programming. i read in a book , c follows top down approach & c++ follows bottom up programming. i did'ng get exact meaning. can any one tell me the exact meaning with examples

Thanks in Advance
Minil

jlliagre 06-17-2005 02:42 AM

top down:
you write first the main function, that calls stubs, then you subdivise these stubs in smaller stubs until a real work has to be done, that you code in the final files.

bottom-up:
you write (or gather) small components that do basic actions that are required to do the full program work. Then you assemble them by custom code, then assemble these parts to write the main method.

The reality is seldom one or other approach, but a combination of them.
What is certainly wrong is trying to start coding from the middle ...


All times are GMT -5. The time now is 10:34 PM.