Bottom-Up Approach

Why we follow top down approach in C-language and bottom up approach in C++?
Explain in detail.

Questions by saranya devaraj

Showing Answers 1 - 12 of 12 Answers

In C we use functional approach, which is a top down approach..
while in C++, if we use functional approach, then it also top down approach..
and if we use object oriented approach, it is bottom up approach..
so the top-down and bottom-up approaches are related to functional and OO programming and not to C
or C++ Language.

  Was this answer useful?  Yes

abc

  • Feb 5th, 2012
 

--> C++ is an OOP(bottom-up approach), but it has got backward compatibility ie. accepts C prog too.(top-down approach)
--> Top-down approach means in C we first go in for declaring var and func, then get into implementing them.
--> Bottom-up approach means in C++ we first create the class(blue print) refers to how the objs look like and create objs for those classes then use them in our prog.

  Was this answer useful?  Yes

Paul_Singh

  • Feb 7th, 2012
 

When designing solution in an object orientated language you start by defining the lowest key players, or entities, and then begin describing how they interact. This is bottom up. In C which is a functional/modular language your will start by designing your functionality first which is a top down approach.

  Was this answer useful?  Yes

random viewer

  • Jun 11th, 2012
 

The question is wrong. In most cases, regardless of the language, top down is the better approach. Actually TDD forces this. You must first know what you want, that is, how the client code will use it, before you can design it. Always top down. Just remember that.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions