C++复习资料1

上传人:日度 文档编号:146136193 上传时间:2020-09-26 格式:DOCX 页数:34 大小:67.25KB
返回 下载 相关 举报
C++复习资料1_第1页
第1页 / 共34页
C++复习资料1_第2页
第2页 / 共34页
C++复习资料1_第3页
第3页 / 共34页
C++复习资料1_第4页
第4页 / 共34页
C++复习资料1_第5页
第5页 / 共34页
点击查看更多>>
资源描述

《C++复习资料1》由会员分享,可在线阅读,更多相关《C++复习资料1(34页珍藏版)》请在金锄头文库上搜索。

1、1.1 Fill in the blanks in each of the following:a. The company that popularized personal computing was _ Apple._b. The computer that made personal computing legitimate in business andindustry was the _IBM Personal Computerc. Computers process data under the control of sets of instructions calledcomp

2、uter _programs_.d. The six key logical units of the computer are the _input unit_, _output unit,_memory unit_, _arithmetic and logic unit_, _central processing unit_ and the _secondary storage unit_e. The three classes of languages discussed in the chapter are _machine languages_,_assembly languages

3、_, and _high-level languages_.f. The programs that translate high-level language programs into machinelanguage are called _compilers_.g. C is widely known as the development language of the _UNIX_ operatingsystem.h. The _Pascal_ language was developed by Wirth for teaching structuredprogramming.i. T

4、he Department of Defense developed the Ada language with a capabilitycalled _multitasking._, which allows programmers to specify that many activities canproceed in parallel.1.2 Fill in the blanks in each of the following sentences about the C+ environment.a. C+ programs are normally typed into a com

5、puter using a(n) _editor._program.b. In a C+ system, a(n) _preprocessor_ program executes before the compilerstranslation phase begins.c. The _linker_ program combines the output of the compiler with variouslibrary functions to produce an executable image.d. The _loader._ program transfers the execu

6、table image of a C+ program fromdisk to memory.1.3 Fill in the blanks in each of the following statements a. Objects have the property of _information hiding _ although objects may know how tocommunicate with one another across well-defined interfaces, they normallyare not allowed to know how other

7、objects are implemented.b. C+ programmers concentrate on creating _classes_, which contain datamembers and the member functions that manipulate those data members andprovide services to clients.c. Classes can have relationships with other classes. These relationships are called_associations_.d. The

8、process of analyzing and designing a system from an object-oriented pointof view is called _object-oriented analysis and design (OOAD)._.e. OOD also takes advantage of _inheritance_ relationships, where new classes ofobjects are derived by absorbing characteristics of existing classes, then addingun

9、ique characteristics of their own.f. _The Unified Modeling Language (UML)_ is a graphical language that allows people who design softwaresystems to use an industry-standard notation to represent them.g. The size, shape, color and weight of an object are considered _attributes_ of theobject.1.7 Why i

10、s so much attention today focused on object-oriented programming in general and C+ in particular?ANS1:Object-oriented programming enables the programmer to build reusablesoftwarecomponents that model items in the real world. Building software quickly, correctly,andeconomically has been an elusive go

11、al in the software industry. The modular, object-orienteddesign and implementation approach has been found to increase productivity while reducingdevelopment time, errors, and cost.ANS2: In object-oriented programming, the source code is organized in classes and objects, whichis easy to be mapping i

12、nto the items in physical world. It is easy to design, reuse and maintainsuch kind of software in large scale software development, which is favored by the softwareindustry.【参考教材的答案】面向对象的编程让编程者可以建立可重用的软件组件,这些组件是现实世界事物的抽象模型。软件工业的目标是快速、正确、有效率的开发软件。面向对象的设计和实现方法模型已经被事实证明是可以提高生产效率和减少开发时间、错误和代价。【参考讲义的答案】面

13、向对象的编程方法中,以类和对象来组织源代码,可以方便的实现与现实物理世界事物的映射。采用这种方法,易于在大型软件开发中进行软件的设计、重用和维护,因此受到软件行业的支持和采用。1.10 You are probably wearing on your wrist one of the worlds most common types of objectsa watch. Discuss how each of the following terms and concepts applies to the notion of a watch: object, attributes, behavi

14、ors, class, inheritance (consider, forexample, an alarm clock), abstraction, modeling, messages, encapsulation, interface,information hiding, data members and member functions.1.10 可能现在你的手腕上就戴着世界上最普遍的对象类型之一手表。论述以下这些术语和概念如何应用于手表这个概念上:对象、属性、行为、类、继承(例如,考虑闹钟)、封装、接口、信息隐藏、数据成员和成员函数。ANS:The entire watch is

15、 an object that is composed of many other objects (such as the moving parts, the band, the face, etc.)Watch attributes are time, color, band, style (digital or analog), etc. The behaviors of the watch include setting the time and getting the time, A watch can be considered a specific type of clock(a

16、s can an alarm clock), With that in mind, it is possible that a class called Clock could exist from which other classes such as watch and alarm clock can inherit the basic features in the clock. The watch is an abstraction of the mechanics needed to keep track of the time. The user of the watch does not need

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 大杂烩/其它

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号