




已阅读5页,还剩43页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1 C 程序设计ProgramminginC NellDaleChipWeems 2 CommunicationInformationTeacher 吕月娥E mail qddz2001 3 公共邮箱 qdudq 密码是qingdaodaxue 4 主要参考书 1 C 程序设计基础 周霭如等编 电子工业出版社2 面向对象程序设计基础 李师贤等编 高等教育出版社 5 MainContentsofTheCourse TheoryaboutComputerProgramming 计算机的编程理论 BasicProgrammingskillinC C 编程的基本技巧 Object OrientedProgramminginC ClassandObject etc 面向对象程序设计 6 Chapter1OverviewofProgrammingandProblemSolving 7 Chapter1Topics Tounderstandwhatacomputerprogramis Tounderstandwhatanalgorithmis 什么是算法 Tolearnwhatahigh levelprograminglanguageis Tounderstandthecompilationandexecutionprocesses 理解编程和执行过程 Tolearnwhatthemajorcomponentsofacomputerareandhowtheyworktogether 8 1 1 1BasicConcepts ComputerAprogrammabledevicethatcanstore retrieveandprocessdata ComputerProgramAsequenceofinstructionstobeperformedbyacomputer 1 1OverviewofProgramming 9 1 1 2Howdowewriteaprogram Maintenance 10 1 Problem SolvingPhase 解决问题阶段 ANALYZEtheproblemandSPECIFYwhatthesolutionmustdo 分析问题并找出解决方案 ALGORITHMdevelopalogicalsequenceofstepsthatsolvestheproblem 算法给出解决问题的逻辑步骤 VERIFYthatyoursolutionreallysolvestheproblem 验证方案的正确性 11 TESTINGYourprogrammeansrunning executing yourprogramonthecomputer toseeifitproducescorrectresults ifitdoesnot thenyoumustfindoutwhatiswrongwithyourprogramoralgorithmandfixit thisiscalleddebugging 调试 2 Implementationphase 实施阶段 PROGRAMTranslatethealgorithmintoaprogramminglanguage 12 3 MaintenancePhase 维护阶段 USEusetheprogram MaintainMODIFYtheprogramtomeetchangingrequirementsorcorrecterrorsthatshowupinusingit 13 1 2Whatisaprogramminglanguage Itisalanguagewith strictgrammarrules symbols andspecialwordsusedtoconstructacomputerprogram 14 1 2 1MachineLanguage Thelanguage madeupofbinary codedinstructions thatisuseddirectlybythecomputer InstructionNameMachineLanguageformadd100101sub010011 15 1 2 2HighLevelLanguages userwritesprograminlanguagesimilartonaturallanguageexamples FORTRAN COBOL Pascal Ada C C JavamostarestandardizedbyISO ANSItoprovideanofficialdescriptionofthelanguage 16 1 2 3BasicConcepts SourceProgramAprogramwritteninahigh levelprogramminglanguage ObjectProgramThemachinelanguageversionofasourceprogram 源程序的机器语言版本 CompilerAprogramthattranslatesahigh levellanguageintomachinecode 17 1 2 4ThreeC ProgramStages compiler linker 18 Programlistingpossiblywitherrormessages Machinelanguageversionofsourceprogram objectprogram Compilation 编译 19 Execution 执行 Results 20 1 2 5BasicControlStructures 基本控制结构 Programminglanguagerequirethatweusecertaincontrolstructurestoexpressalgorithmsasprograms therearefourbasicwaysofstructuringstatementsinmostprogramminglanguage sequenceselectionloopsubprogram 21 SEQUENCE 顺序结构 asequenceisaseriesofstatementsthatexecuteoneafteranother 22 SELECTION 选择结构 IFConditionTHENStatement1ELSEStatement2 selection branch isusedtoexecutedifferentstatementsdependingoncertainconditions 23 24 25 26 LOOP 循环结构 WHILEConditionDOStatement1 Looping repetition isusedtorepeatstatementswhilecertainconditionsaremet 27 while循环 Until型循环 28 SUBPROGRAM function子程序结构 asubprogramisusedtobreaktheprogramintosmallerunits 29 1 3WhatisaComputer Mostcomputershavesixbasiccomponents thememoryunitthearithmetic logicunitthecontrolunitinputdevicesoutputdevicesauxiliarystoragedevices 30 1 3WhatisaComputer 31 1 3WhatisaComputer InputDevice 32 1 3WhatisaComputer InputDevice MemoryUnit 33 1 3WhatisaComputer InputDevice AuxiliaryStorageDevice MemoryUnit 34 1 3WhatisaComputer InputDevice AuxiliaryStorageDevice MemoryUnit ArithmeticLogicUnit ControlUnit 35 1 3WhatisaComputer InputDevice AuxiliaryStorageDevice MemoryUnit ArithmeticLogicUnit CentralProcessingUnit CPU ControlUnit 36 1 3WhatisaComputer InputDevice OutputDevice AuxiliaryStorageDevice MemoryUnit ArithmeticLogicUnit CentralProcessingUnit CPU ControlUnit 37 Figure1 7BasicComponentsofComputer 38 MemoryUnit 39 MemoryUnit isanorderedsequenceofstoragecells eachcapableofholdingapieceofinformationeachcellhasitsownuniqueaddresstheinformationheldcanbeinputdata computedvalues oryourprograminstructions 40 MemoryOrganization twocircuitstatescorrespondto0and1bit shortforbinarydigit referstoasingle0or1 Bitpatternsrepresentboththecomputerinstructionsandcomputerdata1byte 8bits1KB 1024bytes1MB 1024x1024 1 048 576bytes1GB 1024x1024x1024bytes 41 2 CentralProcessingUnit 42 2 CentralProcessingUnit thepartofcomputerthatexecutestheinstructionsstoredinmemory ithas2componentstoexecuteprograminstructions Arithmetic LogicUnitperformsarithmeticoperations andmakeslogicalcomparisons ControlUnitcontrolstheorderinwhichyourprograminstructionsareexecuted 43 areinput output orauxiliarystoragedevicesattachedtoacomputer InputDevicesacceptdatatobeprocessed includekeyboardandmouse 3 Peripherals 外围设备 44 3 Peripherals 外围设备 areinput output orauxiliarystoragedevicesattachedtoacomputerOutputDevicespresenttheresultthathavebeenprocessed includeprinters videodisplay LCDscreens 45 areinput output orauxiliarystoragedevicesattachedtoacomputerAuxiliaryStorageDevicesincludediskdrives U disk CD ROMdrives 3 Peripherals 外围设备 46 BasicConcepts Hardware thephysicalcomponentsofacomputer Software thesetofallprogramsavailableoncomputers Interface Aconnectinglinkatasharedboundarythatallowsindependentsystemstomeetandactonorcommunicatewitheachother Operatingsystem Asetofprogramsthatmanagesallofthecomputer sresources 47 Editor aninteractiveprogramusedtocreateandmodifysourceprogramsordata L
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 社会救援力量管理制度
- 小学用教室管理制度
- 社区人员密集管理制度
- 生产车间品质管理制度
- 2025年体育场馆运营社会稳定性评估与风险防范报告
- 2025年商业地产数字化运营与客户体验提升解决方案汇编报告
- 药品研发阶段管理制度
- 药品销售药店管理制度
- 药店投诉举报管理制度
- 薪酬福利保密管理制度
- MOOC 创新管理-浙江大学 中国大学慕课答案
- 梨的贮藏特性及保鲜技术
- 2024年人参相关项目实施方案
- 2024年安徽淮河能源控股集团有限责任公司招聘笔试参考题库含答案解析
- 混合痔术后护理查房
- 建筑材料采购投标方案(技术标)
- 挪用资金案谅解书
- 机械连接预应力混凝土异型桩L19ZG403
- 港口码头考核管理制度
- 飞机仪电与飞控系统原理智慧树知到课后章节答案2023年下中国人民解放军海军航空大学
- 中医刮痧课件
评论
0/150
提交评论