C++ Programming - OOPS Concepts - Discussion

Discussion Forum : OOPS Concepts - General Questions (Q.No. 19)
19.
Which of the following approach is adapted by C++?
Top-down
Bottom-up
Right-left
Left-right
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
27 comments Page 1 of 3.

Ratnesh said:   1 decade ago
Because main function define after define of class but compiling process start from main function. Invoking object call function from classes.

Prashant said:   1 decade ago
If we use functional approach it is top down, and when we follow object oriented approach then it is bottom up approach.

So C always uses top down approach, whereas C++ also uses bottom up approach.

Durgadevi said:   1 decade ago
Because we use main function in c++ at anywhere but the compiler starts to compile the program in main function so it is called as bottom up approach.

Rock said:   1 decade ago
Can some tell clearly what TOP DOWN, BOTTOM UP means ?

Harshita said:   1 decade ago
In Top Down approach main function should be at the top, ie other function definetion are after main, while in bottom up approach we can define main ayewhere in our program.

Shivendra said:   1 decade ago
Can some one clearly elaborate these two words that is top down and bottom up approach.

Chaitra said:   1 decade ago
Can anyone give example (i. E program) for both top-down and bottom-up approaches?

AMIT KKUKADIYA said:   1 decade ago
In a bottom-up approach the individual base elements of the system are first specified in great detail. These elements are then linked together to form larger subsystems, which then in turn are linked, sometimes in many levels, until a complete top-level system is formed. This strategy often resembles a "seed" model, whereby the beginnings are small, but eventually grow in complexity and completeness. However, "organic strategies", may result in a tangle of elements and subsystems, developed in isolation, and subject to local optimization as opposed to meeting a global purpose.

Object-oriented programming (OOP) is a programming paradigm that uses "objects" to design applications and computer programs. It utilizes several techniques from previously established paradigms, including inheritance, modularity, polymorphism, and encapsulation. Even though it originated in the 1960s, OOP was not commonly used in mainstream software application development until the 1990s. Today, many popular programming languages support OOP.

Object-oriented programming's roots reach all the way back to the 1960s, when the nascent field of software engineering had begun to discuss the idea of a software crisis. As hardware and software became increasingly complex, how could software quality be maintained? Object-oriented programming addresses this problem by strongly emphasizing modularity in software.

Rajeev dwivedi said:   1 decade ago
Actually c is called top-down approach because in c you need to define main function then define functions. It will work. And if you define functions first then define main function, still it will work. But in oop if you define main function first then class. It will not work. Whenever we define in oop, define class then go to main function. So it is called bottom-up approach because we define main function down and go to down to up.

Archana said:   1 decade ago
If the main function is defined first in c++ then what action will takes place?


Post your comments here:

Your comments will be displayed after verification.