正在加载图片...
上海交通大学交大密西根 联合学院· 81 UM-SJTU Joint Institute University of Michigan Shanghal Jiao Tong University Programming Idioms and Patterns Experienced programmers also often take a holistic approach to programming.Effective programmers can recognize a variety of common operations and have learned a standard solution strategy for each one.The code that implements such a solution strategy is called a programming idiom or programming pattern.Learning to use these patterns saves you from having to think about the nitty- gritty details. As an example,it is important to think of a statement like int intx console.readInt("Enter n1:") not in terms of what each part of the statement means,but rather as a holistic pattern to read an integer from the user: int variable console.readint ("prompt");Programming Idioms and Patterns Programming Idioms and Patterns • Experienced programmers also often take a holistic approach to programming. Effective programmers can recognize a variety of common operations and have learned a standard solution strategy for each one. The code that implements such a solution strategy is called a programming idiom or programming pattern. Learning to use these patterns saves you from having to think about the nitty￾gritty details. • As an example, it is important to think of a statement like • not in terms of what each part of the statement means, but rather as a holistic pattern to read an integer from the user: int intX = console.readInt("Enter n1: "); int variable = console.readInt("prompt");
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有