版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、11/29/2021C+程序设计 教师:1C+程序设计(1)11/29/2021C+程序设计 教师:2课程介绍nC+基础知识(类,模版)nMicrosoft Visual C+ 6.0nVC+6 guide.pdf nVC 6 IDE 介绍11/29/2021C+程序设计 教师:3An Examplen#include nint main()nncouthello,world!;nreturn 0;n11/29/2021C+程序设计 教师:4考核方式n期末闭卷考核占50% necnucpp平台考核,出勤等平时成绩占50% 11/29/2021C+程序设计 教师:5参考书目书名:书名:C+C+程
2、序设计语言程序设计语言 英文书名:英文书名:The C+ Programming LanguageThe C+ Programming Language作者:作者:Bjarne StroustrupBjarne Stroustrup11/29/2021C+程序设计 教师:6参考书目书名:书名:C+ C+ 编程思想(编程思想(2nd2nd)英文书名:英文书名:Thinking in C+(Second Edition)Thinking in C+(Second Edition)作者:作者:Bruce EckelBruce Eckel11/29/2021C+程序设计 教师:7参考书目书名:书名:C
3、+ Primer 英文书名:英文书名:C+ Primer 作者:作者:Lippman11/29/2021C+程序设计 教师:8参考书目书名:书名:Effective C+ 英文书名:英文书名:Effective C+ 作者:作者:Scott Meyers译者:译者:侯捷侯捷11/29/2021C+程序设计 教师:9参考书目书名:书名:More Effective C+英文书名:英文书名:More Effective C+:35 New Ways to Improve Your Programs and Designs作者:作者:Scott Meyers译者:译者:侯捷侯捷11/29/2021C
4、+程序设计 教师:10Chapter1OverviewofProgrammingandProblemSolvingn1.1 Overview of ProgrammingnComputer Program a sequence of instructions to be performed by a computer.nComputer Programming the process of planning a sequences of steps for a computer to follow.nThe computer allows us to do tasks more efficie
5、ntly, quickly and accurately.11/29/2021C+程序设计 教师:11Programs life cycle1. Problem-Solving Phase (requirement analysis and specification; algorithm design)nAlgorithmA step-by-step procedure for solving a problem in a finite amount of time.2. Implementation Phase (coding; debugging; testing)3. Maintena
6、nce Phase (using; correct; improving)nIterative procedure. nProgram commentsnDocumentation11/29/2021C+程序设计 教师:12Two Algorithm ExamplesBOOK P41.Start your car.2.Determine an employees weekly wages.11/29/2021C+程序设计 教师:13From Algorithm to Program11/29/2021C+程序设计 教师:14From Algorithm to ProgramnProgrammi
7、ng language:nA set of rules, symbols, and special words used to construct a computer program.nC+ is an example of Programming Language.nOthers: JAVA, C#, Pascal, BASICnTranslating an algorithm into a programming language is called coding the algorithm.nThe combination of coding and testing an algori
8、thm is called implementation.11/29/2021C+程序设计 教师:15Determine an employees weekly wages.nSource file : PAYROLL.CPPnExecution file : payroll.exenExample Under Folder Payroll11/29/2021C+程序设计 教师:16Program Executioninput dataprogramoutputdata11/29/2021C+程序设计 教师:17程序调试debugging的一些方法n可能的程序分支都思考一遍可能的程序分支都思考
9、一遍n在主程序的关键点添加重要变量输出语句或设置断点在主程序的关键点添加重要变量输出语句或设置断点n在函数的调用前后添加重要变量输出语句或设置断点在函数的调用前后添加重要变量输出语句或设置断点11/29/2021C+程序设计 教师:18软件测试testingn测试只能证明BUG的存在,永远不能证明BUG的不存在。n测试的主要方法n黑盒法n白盒法11/29/2021C+程序设计 教师:19Language CategorynMachine language binary formnLow-level language Assembly language nHigh-level language
10、C+, PascalnNatural language English, French, Germann11/29/2021C+程序设计 教师:20From Source Program to Object ProgramobjectsourceCompilerSource program: A program written in a high-level programming language.Compiler: A program that translates a high-level language into machine code.Object program: The ma
11、chine language version of a source program.BOOK P7 Figure 1-3A computer can do: P811/29/2021C+程序设计 教师:21C+ CompilersnMicrosoft Visual C+nBorland C+nLinux GNU C+nnISO/ANSI Standard C+11/29/2021C+程序设计 教师:22Four Basic control structuresnSequentiallynConditionallynRepetitivelynWith subprograms (Divide a
12、nd Conquer)nBOOK P10 Figure1-611/29/2021C+程序设计 教师:23Computer SystemnHardware(P11 Figure 1-7)nCPUnALU Perform arithmetic and logical operations.nControl unit controls the actions of the other components.nMemorynI/O devicenPeripheral devicenSoftwarenOperating SystemnA set of programs that manages all
13、of the computers resources.nApplication11/29/2021C+程序设计 教师:24Problem-SolvingTechniquesnAsk QuestionsnLook for Things That Are FamiliarnSolve by AnalogynMeans-Ends AnalysisnDivide and Conquer(Functional Decomposition-FD, Object-oriented Design-OOD)nThe Building-Block ApproachnMerging SolutionsnRewriting the problem in your own words11/29/
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 苏教版小学四年级下册教学设计
- 江西省赣州市会昌县2022年高三下学期第五次调研考试物理试题含解析
- 苏教版五年级下册 科学教案
- 《父爱之舟》父爱教案
- 赋权协议书模板高清
- 财政专户开户协议书模板
- 别墅结伴租赁协议书模板
- 食品的采购协议书模板范本
- 爱心捐赠协议书模板范文
- 2024某师范学院社科类横向科研项目合同书样本
- 最新干部人事档案目录模板
- 玄天上帝灵签解
- 污水管道工程沟槽深度大于5m沟槽开挖与支护专项施工方案
- 关节臂测量仪培训
- 成语大赛(小学生).ppt
- 旅游区项目控制性详细规划文本(22页)
- 焊条使用前的烘干与保管规定
- 电气自动化专业考试试题(共100分)
- 中医治疗心悸的临床体会
- 导线点复核记录excel应用(呕心沥血自动计算)
- 养老服务需求评估表(全套)
评论
0/150
提交评论