Related Articles

Top-Down And Bottom-Up Approach In C/C++ Programming

Prashant | Sat, 18 Jul, 2020 | 131

Top-down and bottom-up approach in C/C++ programming

1) Top-down approach

In this approach, a large project divides into small programs, and these programs are known as modules.

C programming supports this approach for developing projects. It is always good idea that decomposing solution into modules in a hierarchal manner.

The basic task of a top-down approach is to divide the problem into tasks and then divide tasks into smaller sub-tasks and so on.

In this approach, first we develop the main module and then the next level modules are developed. This procedure is continued until all the modules are developed.

Advantages of top-down approach:

  1. In this approach, first, we develop and test most important module.
  2. This approach is easy to see the progress of the project by developer or customer.
  3. Using this approach, we can utilize computer resources in a proper manner according to the project.
  4. Testing and debugging is easier and efficient.
  5. In this approach, project implementation is smoother and shorter.
  6. This approach is good for detecting and correcting time delays.

2) Bottom-up approach

C++ used the bottom-up approach for project development. It is an alternative approach to the top-down approach.

In this approach, bottom level modules developed first (Lower level module developed, tested and debugged). Then the next module developed, tested and debugged. This process is continued until all modules have been completed.

This approach is exactly opposite to the top-down approach. This approach is good for reusability of code.

Related Articles

Leave a comment