自上而下和自下而上起来编程 [英] Top down and Bottom up programming

查看:600
本文介绍了自上而下和自下而上起来编程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么我们说的语言,如C是自上而下的,而OOP语言如Java或C ++自下而上?请问这种分类在软件开发的重要性?

Why do we say language such as C is top-down while OOP languages like java or C++ as bottom-up?. Does this classification has any importance in software development?

推荐答案

自上而下的方法需要对问题的高级别定义,并将其细分为子问题,你然后做递归,直到你到枚是显而易见的,容易code。这通常是与编程功能分解的风格有关,但不一定是。

The "top down" approach takes a high level definition of the problem and subdivides it into subproblems, which you then do recursively until you're down to pieces that are obvious and easy to code. This is often associated with the "functional decomposition" style of programming, but needn't be.

在自下而上的节目,你确定较低级别的工具,您可以撰写,成为一个更大的计划。

In "bottom up" programming, you identify lower-level tools that you can compose to become a bigger program.

在现实中,几乎所有的编程与相结合的办法进行。在面向对象的编程,则通常通过识别域的对象(其是自上而下工序),和改进的那些,然后重新组合这些成最终节目细分问题 - 自下而上步骤

In reality, almost all programming is done with a combination of approaches. in object oriented programming, you commonly subdivide the problem by identifying domain objects (which is a top down step), and refining those, then recombining those into the final program — a bottom up step.

这篇关于自上而下和自下而上起来编程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆