C++2版第一章概要1.ppt

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
C2版第一章概要1

Chapter 1 Overview of Programming and Problem Solving Dale/Weems Slides based on work by Sylvia Sorkin, Community College of Baltimore County - Essex Campus Chapter 1 Topics Computer Programming Programming Life-Cycle Phases Creating an Algorithm Machine Language vs. High Level Languages Compilation and Execution Processes C++ History Computer Components Computing Profession Ethics Problem-Solving Techniques What is Computer Programming? It is the process of planning a sequence of steps(called instructions) for a computer to follow. Programming Life Cycle Phases Problem-Solving Implementation Maintenance Problem-Solving Phase Analyze the problem and specify what the solution must do Develop a general solution(algorithm) to solve the problem Verify that your solution really solves the problem Sample Problem Suppose a programmer needs to determine an employee’s weekly wages. How would the calculations be done by hand? One Employee’s Wages In one week an employee works 52 hours at the hourly pay rate of $24.75. Assume a 40.0 hour normal work week and an overtime pay rate factor of 1.5. What are the employee’s wages? Weekly Wages, in General If hours are more than 40.0 wages = (40.0 * payRate) + (hours - 40.0) * 1.5 *payRate otherwise wages = hours * payRate An Algorithm An algorithm is a step-by-step procedure for solving a problem with a finite amount of data in a finite amount of time Algorithm to Determine an Employee’s Weekly Wages 1. Get the employee’s hourly payRate 2. Get the hours worked this week 3. Calculate this week’s regular wages 4. Calculate this week’s overtime wages(if any) 5. Add the regular wages to overtime wages(if any) to determine total wages for the week What is a Programming Language? A programming language is a language with strict grammar rules, symbols, and special words used to construct a computer program Implementation Phase: Program

文档评论(0)

yaocen + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档