自上而下的设计模型:
在自上而下的模型中,系统的概述是制定的,而没有详细介绍它的任何部分。然后将它的每个部分细化为更多细节,在更多细节中定义它,直到整个规范足够详细以验证模型。如果我们完整地看一看,似乎不可能,因为它太复杂了。例如:编写大学系统程序,编写文字处理器。复杂的问题可以解决受害高下风格,合称为逐步细化,其中,
- 我们把问题分解成几个部分,
- 然后很快将零件分解成零件,现在每个零件都将很容易做到。
好处:
- 将问题分解成部分有助于我们确定需要做什么。
- 在每一步细化中,新零件将变得不那么复杂,因此更容易解决。
- 部分解决方案可能会被证明是可重用的。
- 将问题分解成多个部分可以让一个以上的人来解决问题。
自下而上的设计模型:
在此设计中,详细说明了系统的各个部分。零件已链接 形成更大的组件,这些组件依次连接起来,直到形成一个完整的系统。面向对象的语言(例如 C++ 或Java)使用自底向上的方法,其中首先识别每个对象。
优势:
- 决定可重用的低级实用程序,然后决定如何将它们组合在一起以创建高级构造。 ,
- 自顶向下设计与自底向上设计的对比。
S.No. |
TOP DOWN APPROACH |
BOTTOM UP APPROACH |
---|---|---|
1. | In this approach We focus on breaking up the problem into smaller parts. | In bottom up approach, we solve smaller problems and integrate it as whole and complete the solution. |
2. | Mainly used by structured programming language such as COBOL, Fortran, C, etc. | Mainly used by object oriented programming language such as C++, C#, Python. |
3. | Each part is programmed separately therefore contain redundancy. | Redundancy is minimized by using data encapsulation and data hiding. |
4. | In this the communications is less among modules. | In this module must have communication. |
5. | It is used in debugging, module documentation, etc. | It is basically used in testing. |
6. | In top down approach, decomposition takes place. | In bottom up approach composition takes place. |
7. | In this top function of system might be hard to identify. | In this sometimes we can not build a program from the piece we have started. |
8. | In this implementation details may differ. | This is not natural for people to assemble. |