前几个月过于疲劳,干脆这个月请假在家休息,顺便看看书。

打开闲置好久的QQ,看看有没有什么留言,结果正赶上一个家伙病急乱投医,找我问需求用例怎样写。

好久不搞开发,也忘得差不多了,就找了份以前的参考文档传过去,一会儿收到回复,说其他都明白了,就是“后置条件”没整清楚,参考文档中在这一行只有尖括号中一句话:用例执行后为真的状态。这个描述是过于简单了点。

刚好前天整理图书,翻出一本《Managing Software Reqirement – A Use Case Approach 2th》,找出书,跳到Chapter 21,找到Identifying the Pre- and Post-conditions一节

这里的解释稍微详细点:Post-conditions are the states the system can be in after the use case ends,另有一句:such as system state or persistent data that is left when the use case is complete

即后置条件描述的是用例结束时的系统状态或持久数据。(会影响到执行其他用例)

书中举了个电灯开关的例子:

Post-condition for the Control Light Use Case
●  On leaving this use case, the system remembers the current brightness level for the selected On/Off/Dim button

即当控制灯亮度这个用例结束时,系统应根据所按按钮记住当前的亮度级别(否则下次再按,就无法知道灯应该关还是开还是暗一点了),例子很浅显易懂,比画一堆UML符号更容易让人理解。

(还可以举个设计键盘的例子,比如按下某个键之后,该键应在放手后自动弹起–否则卖不出去的)

这一章中还有一段:

A post-condition for a use case should be true regardless of which alternative flows were executed; it should not be true only for the main flow. If something could fail, you would cover that in the post-condition by saying “The action is completed, or if something failed, the action is not performed,” rather than just “The action is completed.”

即后置条件应该包括用例所有备选流结束后可能的状态(成功或错误的状态)。

书中对这一点好像没有相关例子说明(我没认真全看,走马观花)。

临时想了个”空气开关”当例子来忽悠:当正常按下后,开关应不会弹起,但是当有异常发生(设备短路)时,这个操作就不能正常完成,系统的状态会有点不同(开关自动弹起,电路断开)。

或者用刚才那个键盘的例子;如果所按的键不是a-z之类,而是按下Caps Lock后,系统为大写锁定状态。

那哥们过了半天,回复了一个字:哦

但愿他没被绕迷糊吧。


9条评论

  1. 这个太专业了

    很难懂

  2. 呵呵 路过 瞧瞧

  3. 为何总要加点英文,搞得人稀里糊涂

  4. 搞得人稀里糊涂

  5. 博主好像很久都没更新日记了,估计这段时间很忙,没空

  6. 专业性滴东西,搞不懂撒~~~

  7. 你好Everything you said is what I need!

  8. 这个太专业了

  9. 你好啊
    christian louboutin is very popular all over the world and we carry many colours and sizes. They are great for customising anything that needs that extra bit of sparkle.christian louboutin uk the site also contains summaries of legal actions taken, including raids on factories with photographs and videos of the mass destruction of counterfeit goods. tiffany uk Soon she was vying with fellow pop star Debbie Gibson for space on the covers of teen magazines, including Tiger Beat, and Teen Beat, as well as on television shows on MTV.Her ballad ‘Could’ve Been’ also peaked at the number one spot on the Billboard charts in February 1988.Necrosis premiered at the 2009 Cannes Film Festival. tiffanys former music rival, Deborah Gibson, had her film Mega Shark Versus Giant Octopus premiere at Cannes as well. chanel outlet returned to Paris in 1953to find the Paris fashion scene obsessed with Christian Dior and the very feminine look for which he alone is given credit, the ‘New Look.’ Coco Chanel responded brilliantly to the challenge; she recognized that the couture market had changed and she needed to catch-up.Vanessa Paradis (spokesmodel for Coco Perfume), Nicole Kidman (early 2000s Chanel No. 5 spokesmodel), Anna Mouglalis (2006 chanel uk Allure Sensuelle spokesmodel). burberry was founded in 1856 when 21-year-old Thomas cross, a former draper’s apprentice, opened his own store in Basingstoke,Supernova: Bigger than Nova check. On a small leather good with Supernova check, usually have only a diagonal stripe but not a whole checkThese clogs are comfortable, trendy collectively with a should have for the child! burberry uk Card II Boot: These Cards are superb boots that attribute 4 colorful, however gratifying buttons. By 2001 Ford and De Sole shared the responsibility for major business decisions, while Ford concurrently directed design at Yves Saint Laurent as well as at louis vuitton sac.leading manufacturers of champagne and cognac, merged respectively with louis vuitton to form the luxury goods conglomerate. Profits for 1988 were reported to have been up by 49% more than in 1987. Amid widespread speculation in the fashion press about Ford’s heir, gucci belt company announced in March 2004 that he would be replaced by a team of younger designers promoted from the ranks of the company’s staff.Imagine your guest as they arrive, since gucci uk are so brilliant, all you need to do is walk by them and they will catch the light and sparkle. The entire room will twinkle like a fairytale. ralph lauren uk are the premier Austrian machine-cut crystals world-famous for their superior quality and precision cutting. Swarovski Bracelet, pendants, filigree components, rivolis and buttons are all showcased here.What makes the polo ralph lauren uk more attractive is that its price may not be as high as its original price. To say it in other words, it’s a discount shop which sell things much cheaper.

发表评论

评论也有版权!

click to change验证码