Explain the difference between a top-down approach and a bottom-up approach in programming. 5m Jun 2010

By | August 17, 2016

Explain the difference between a top-down approach and a bottom-up approach in programming. 5m Jun 2010

 

Top-down Approach

Bottom-up Approach

A top-down approach is essentially the breaking down of a program to gain insight into its compositional small program (or module) in a reverse engineering fashion. A bottom-up approach is the piecing together of module (or small program) to give rise to more complex program, thus making the original modules of the emergent program.
Structure / procedure oriented programming languages like C programming language follows top-down approach. Object oriented programming languages like C++ and JAVA programming language follows bottom-up approach.
A top-down approach begins with high level design and ends with low level design or development. A bottom-up approach begins with low level design or development and ends with high level design.
In top-down approach, main function is written first and all sub functions are called from main function thus, sub-functions are written based on the requirement In bottom-up approach, code is developed from modules and then these modules are integrated with main function

Now-a-days, both approachs are combined together and followed in modern software design.