- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
Chapter 1Programming Review and Introduction to Software Design
Process Phase Introduced in This Chapter
Key Concept: ( Where We’re Headed (
Coding Practices Used in This Book
Instance variables may be referred to with “this.”
Example: class Car { int milesDriven; … }
May use esDriven within methods of Car to clarify
Static variables may be referred to with class name.
Example: class Car { static int numCarsSold; … }
May use Car.numCarsSold within methods of Car to clarify
Parameters are given prefix “a” or “an”
Example: public … getVolume( int aLength ) {…}
Programming Conventions: Method Documentation 1 of 2
Preconditions: conditions on non-local variables that the method’s code assumes
Includes parameters
Verification of these conditions not promised in method itself
Postconditions: value of non-local variables after execution
Includes parameters
Notation: x denotes the value of variable x after execution
Invariants: relationships among non-local variables that the function’s execution do not change
(The values of the individual variables may change, however.)
Equivalent to inclusion in both pre- and post-conditions
There may also be invariants among local variables
Programming Conventions: Method Documentation 2 of 2
Return:
What the method returns
Known issues:
Honest statement of what has to be done, defects that have not been repaired etc.
(Obviously) limited to what’s known!
Key Concept: ( Specifying Methods (
Flowchart Example
Pseuodocode Example For an X-ray Controller
Advantages of Pseudocode Flowcharts
Clarify algorithms in many cases
Impose increased discipline on the process of documenting detailed design
Provide additional level at which inspection can be performed
Help to trap defects before they become code
Increases product reliability
May decreases overall costs
Disadvantages of Pseudocode Flowcharts
Create an additional level of documentation to maintain
Introduce error possibilities in translating to code
May require too
您可能关注的文档
最近下载
- 九年级数学秋季开学第一课(北师大版).pptx
- 部编人教版八年级上册道德与法治全册新质教学课件(配2025年秋改版教材).pptx
- 第1讲 我爱你中国(第一课时)美丽中国是我家(课件)-《新时代中国特色社会主义思想学生读本(小学低年级)》.pptx VIP
- 大学毕业论文_外文文献及中文翻译-财务风险的重要性how important is financial risk.doc VIP
- 人美版(2024)一年级美术上册第一单元《1.1介绍我自己》教学设计.docx VIP
- 民警进幼儿园安全讲课.pptx VIP
- 2024全国职业院校技能大赛ZZ055导游服务赛项规程+赛题 (2).docx VIP
- 计算机网络基础 龚娟 第2章 数据通信基础.ppt VIP
- 沙田柚种植技术最新完整版本.pptx VIP
- DBJ52_T103-2021:模块化箱式房屋安装及验收技术标准.pdf VIP
文档评论(0)