随便乱扯:以洗衣机为例浅谈自顶向下设计

本文通过洗衣机控制程序的例子,阐述自顶向下设计的思想。从需求出发,逐步细化,将“洗干净衣服”这一目标拆解为注水、旋转滚筒、排水等具体步骤,确保每个子任务都能用现有技术解决,以实现完整的设计方案。
摘要由CSDN通过智能技术生成

  二话不说先砸维基上的定义:

A top-down approach (also known as stepwise design) is essentially the breaking down of a system to gain insight into the sub-systems that make it up. In a top-down approach an overview of the system is formulated, specifying but not detailing any first-level subsystems. Each subsystem is then refined in yet greater detail, sometimes in many additional subsystem levels, until the entire specification is reduced to base elements. Once these base elements are recognised then we can build these as computer modules. Once they are built we can put them together, making the entire system from these individual components.

  这几句话翻译过来,大概就是:解决问题的时候,不是先看看我们有什么(API,轮子,算法等等),而是先看看人家要什么(雾),然后再把需求拆解,直到拆解出来的每个子问题都可以用已知的方法轻松解决。
  这个问题解决思想在程序设计中被广泛应用,这个方法有助于完全地理解需求,也只有当完全地理解了需求以后,这个程序的设计才能

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值