分享
 
 
 

C++面向对象程序设计(第4版)(大学计算机教育国外著名教材系列(影印版))(Object Oriented Programming with C++ Fourth Edition)

C++面向对象程序设计(第4版)(大学计算机教育国外著名教材系列(影印版))(Object Oriented Programming with C++ Fourth Edition)  点此进入淘宝搜索页搜索
  特别声明:本站仅为商品信息简介,并不出售商品,您可点击文中链接进入淘宝网搜索页搜索该商品,有任何问题请与具体淘宝商家联系。
  參考價格: 点此进入淘宝搜索页搜索
  分類: 图书,教材教辅与参考书,大学,计算机专业,
  品牌: 巴拉古路萨米(E Balagurusamy)

基本信息·出版社:清华大学出版社

·页码:631 页

·出版日期:2009年09月

·ISBN:7302207321/9787302207320

·条形码:9787302207320

·包装版本:第1版

·装帧:平装

·开本:16

·正文语种:英语

·丛书名:大学计算机教育国外著名教材系列(影印版)

·外文书名:Object Oriented Programming with C++ Fourth Edition

产品信息有问题吗?请帮我们更新产品信息。

内容简介《C++面向对象程序设计(第4版)》以一种简单易懂的写作风格,介绍了何谓C++面向对象程序设计、为什么以及如何用C++进行面向对象程序设计。书给出了大量的示例、演示说明以及完整的程序。这些示例程序既简单也很具有教学意义。在必要的时候,《C++面向对象程序设计(第4版)》还使用了概念图,使得介绍更加清晰,便于更好地理解。《C++面向对象程序设计(第4版)》还介绍了面向对象方法的概念,简要讨论了系统的面向对象分析与设计的重要内容。《C++面向对象程序设计(第4版)》的最大亮点是附录A的两个新的程序设计项目:(1)基于菜单的计算系统;(2)银行系统。它们演示了如何在现实应用程序中集成C++的各种特性。

《C++面向对象程序设计(第4版)》不仅可以作为高等院校C++面向对象程序设计的教材,也是希望了解C++语言和面向对象程序设计知识的专业人员的很好参考书。

编辑推荐《C++面向对象程序设计(第4版)》:大学计算机教育国外著名教材系列(影印版)

目录

Preface . xiii

1. Principles of Object-Oriented Programming 1

1.1 Software Crisis 1

1.2 Software Evolution 3

1.3 A Look at Procedure-Oriented Programming 4

1.4 Object-Oriented Programming Paradigm 6

1.5 Basic Concepts of object-Oriented Programming 7

1.6 Benefits of OOP 12

1.7 Object-Oriented Languages 13

1.8 Applications of OOP 14

Summary 15

Review Questions 17

2. Beginning with C++ 19

2.1 Whatis C++? 19

2.2 Applications of C++ 20

2.3 A Simple C++ Program 20

2.4 More C++ Statements 25

2.5 An Example with Class 28

2.6 Structure of C++ Program 29

2.7 Creating the Source File 30

2.8 Compiling and Linking 30

Summary 31

Review Questions 32

Debugging Exercises 33

Programming Exercises 34

3. Tokens,Expressions and Control Structures 35

3.1 Introduction 35

3.2 Tokens 36

3.3 KeyWords 36

3.4 Identifiers and Constants 36

3.5 Basic Data Types 38

3.6 User-Defined Data Types 40

3.7 DeriVed Data Types 42

3.8 SymbolicConstants 43

3.9 Type Compatibility 45

3.10 Declaration of Variables 45

3.11 Dynamic initialization of Variables 46

3.12 Reference Variables 47

3.13 Operators in C++ 49

3.14 Scope Resolution Operator 50

3.15 Member Dereferencing Operators 52

3.16 Memory Management Operators 52

3.17 Manipulators 55

3.18 Type Cast Operator 57

3.19 EXPressions and their Types 58

3.20 SpecialAssignment Expressions 60

3.21 Implicit Conversions 61

3.22 Operator Overloading 63

3.23 Operator Precedence 63

3.24 Control Structures 64

Summary 69

Review Questions 71

Debugging Exercises 72

Programming Exercises 75

4. Function in C++ 77

4.1 Introduction 77

4.2 The Main Function 78

4.3 Function Prototyping 79

4.4 Call by Reference 81

4.5 Return by Reference 82

4.6 Inline Functions 82

4.7 DefaultArgUments 84

4.8 constArgUments 87

4.9 Function Overloading 87

4.10 Friend and Virtual Functions 89

4.11 Math Library Functions 90

Summary 90

Review Questions 92

Debugging Exercises 93

Programming Exercises 95

5. Classes and Objects 96

5.1 Introduction 96

5.2 C Structures Revisited 97

5.3 Specifying a Class 99

5.4 Defining Member Functions 103

5.5 A C++ Program with Class 104

5.6 Making an Outside Function inline 106

5.7 Nesting of Member Functions 107

5.8 PriVate Member Functions 108

5.9 AITays within a Class 109

5.10 Memory Allocation for Objects 114

5.11 Static Data Members 115

5.12 Static Member Functions 117

5.13 Arrays of objects 119

5.14 Objects as Function Arguments 122

5.15 Friendly Functions 124

5.16 Returning Objects 130

5.17 const Member Functions 132

5.18 Pointers to Members 132

5.19 Local Classes 134

Summary 135

Review Questions 136

Debugging Exercises 137

Programming Exercises 142

6. Constructors and Destructors

6.1 Introduction 144

6.2 Constructors 145

6.3 Parameterized Constructors 146

6.4 Multiple Constructors in a Class 150

6.5 Constructors with Default arguments 153

6.6 Dynamic initialization of objects 153

6.7 Copy Constructor 156

6.8 Dynamic Constructors 158

6.9 Constructing Two-dimensional AITays 160

6.10 const Objects 162

6.11 Destructors 162

Summary 164

Review Questions 165

Debugging Exercises 166

Programming Exercises 169

7. Operator Overloading and Type Conversions 171

7.1 Introduction 171

7.2 Defining Operator Overloading 172

7.3 Overloading Unary Operators 173

7.4 Overloading Binary Operators 176

7.5 Overloading Binary Operators Using Friends 179

7.6 Manipulation of Strings Using Operators 183

7.7 Rules for Overloading Operators 186

7.8 Type Conversions 187

Summary 195

Review Questions 196

Debugging Exercises 197

Programming Exercises 200

8. Inheritance:Extending Classes 201

8.1 Introduction 201

8.2 Defining Derived Classes 202

8.3 Single inheritance 204

8.4 Making a Private Member inheritable 210

8.5 Multilevel inheritance 213

8.6 Multiple inheritance 218

8.7 Hierarchical inheritance 224

8.8 Hybrid inheritance 225

8.9 Virtual Base Classes 228

8.10 Abstract Classes 232

8.11 Constructors in Derived Classes 232

8.12 Member Classes: Nesting of Classes 240

Summary 241

Review Questions 243

Debugging Exercises 243

Programming Exercises 248

9. Pointes,Virtual Functions and Polymorphism 251

9.1 Introduction 251

9.2 Pointers 253

9.3 Pointers to Objects 265

9.4 this Pointer 270

9.5 Pointers to Derived Classes 273

9.6 VirtualFunctions 275

9.7 Pure Virtual Functions 281

Summary 282

Review Questions 283

Debugging Exercises 284

Programming Exercises 289

10. Managing Console I/O Operations 290

10.1 Introduction 290

10.2 C++ Streams 291

10.3 C++ Stream Classes 292

10.4 Unformatted I/O Operations 292

10.5 Formatted Console I/O Operations 301

10.6 Managing Output with Manipulators 312

Summary 317

Review Questions 319

Debugging Exercises 320

Programming Exercises 321

11. Working with Files 323

11.1 Introduction 323

11.2 Classes for File Stream Operations 325

11.3 Opening and Closing a File 325

11.4 Detecting end-of-file 334

11.5 More about Openo: File Modes 334

11.6 File Pointers and Their Manipulations 335

11.7 Sequential input and Output Operations 338

11.8 Updating a File: Random Acess 343

11.9 Error Handling During File Operations 348

11.10 Command-line ArgUments 350

Summary 353

Review Questions 355

Debugging Exercises 356

Programming Exercises 358

12. Templates 359

12.1 Introduction 359

12.2 ClassTemplates 360

12.3 Class Templates with Multiple Parameters 365

12.4 FunctionTemplates 366

12.5 Function Templates with Multiple Parameters 371

12.6 Overloading of Template Functions 372

12.7 Member Function Templates 373

12.8 Non-Type Template ArgUments 374

Summary 375

Review Questions 376

Debugging Exercises 377

Programming Exercises 379

13. Exception Handling 380

13.1 Introduction 380

13.2 Basics of Exception Handling 381

13.3 Exception Handling Mechanism 381

13.4 ThrowingMechanism 386

13.5 CatchingMechanism 386

13.6 Rethrowing an Exception 391

13.7 SpecifvingExceptions 392

Summary 394

Review Questions 395

Debugging Exercises 396

Programming Exercises 400

14. Introduction to the Standard Template Library 401

14.1 Introduction 401

14.2 Components of STL 402

14.3 Containers 403

14.4 Algorithms 406

14.5 Iterators 408

14.6 APplication of Container Classes 409

14.7 Functionobjects 419

Summary 421

Review Questions 423

Debugging Exercises 424

Programming Exercises 426

15. Manipulating Strings 428

15.1 Introduction 428

15.2 Creating (string) Objects 430

15.3 Manipulating String Objects 432

15.4 Relational Operations 433

15.5 StringCharacteristics 434

15.6 Accessing Characters in Strings 436

15.7 Comparing and Swapping 438

Summary 440

Review Questions 441

Debugging Exercises 442

Programming Exercises 445

16. New Features of ANSI C++ Standard 446

16.1 Introduction 446

16.2 New Data Types 447

16.3 New Operators 449

16.4 Class Implementation 451

16.5 Namespace Scope 453

16.6 OperatorKeyWords 459

16.7 New KeyWords 460

16.8 New Headers 461

Summary 461

Review Questions 463

Debugging Exercises 464

Programming Exercises 467

17. Object-Oriented Systems Development 468

17.1 Introduction 468

17.2 Procedure-Oriented Paradigms 469

17.3 Procedure-Oriented Development Tools 472

17.4 Object-Oriented Paradigm 473

17.5 Object-Oriented Notations and Graphs 475

17.6 Steps in Object-Oriented Analysis 479

17.7 Steps in Object-Oriented Design 483

17.8 Implementation 490

17.9 Prototypingparadign 490

17.10 WrappingUp 491

Summary 492

Review Questions 494

APpcndln A: Projects 496

APpcndln B: EMcuting Turbo C++ 539

APpcndln C: executing C++ Under Windows 552

APpcndln D: Glossary of ANSI C++ Keywords 564

APpcndln E: C++ OPeratorprCcedence 570

APpcndln F: POints to Remember 572

APpcndln G: Glossary of important C++ and OOP Terms 584

APpcndln H: C++ Proficiency Test 596

Bibliograpby 632

……[看更多目录]

序言Object-Oriented Programming (OOP) has become the preferred programming approach bythe software industries, as it offers a powerful way to cope with the complexity of real-worldproblems. Among the OOP languages available today, C++ is by far the most widely usedlanguage.

Since its creation by Bjarne Stroustrup in early 1980s, C++ has undergone many changesand improvements. The language was standardized in 1998 by the American NationalStandards Institute (ANSI) and the International Standards Organization (ISO) byincorporating not only the new features but also the changes suggested by the user groups.This book has been thoroughly revised and this edition confirms to the specifications ofANSI/ISO standards. Besides confirming to the standards, many smaller changes andadditions to strengthen the existing topics as well as corrections to typographical errors andcertain inaccuracies in the text have been incorporated. The highlight of this edition is theinclusion of two new programming projects in Appendix A - (1) Menu Based CalculationSystem and (2) Banking System that demonstrate how to integrate the various features ofC++ in real life applications.

This book is for the programmers who wish to know all about C++ language and object-oriented programming. It explains in a simple and easy-to-understand style the what, whyand how of object-oriented programming with C++. The book assumes that the reader isalready familiar with C language, although he or she need not be an expert programmer. The book provides numerous examples, illustrations and complete programs. The sampleprograms are meant to be both simple and educational. Wherever necessary, pictorialdescriptions of concepts are included to improve clarity and facilitate better understanding.The book also presents the concept of object-oriented approach and discusses briefly theimportant elements of object-oriented analysis and design of systems.

文摘插图:

C++面向对象程序设计(第4版)(大学计算机教育国外著名教材系列(影印版))(Object Oriented Programming with C++ Fourth Edition)

not only creates the object intl of type integer but also initializes its data members m andn to zero. There is no need to write any statement to invoke the constructor function (as wedo with the normal member functions). If a 'normal' member function is defined for zeroinitialization, we would need to invoke this function for each of the objects separately. Thiswould be very inconvenient, if there are a large number of objects. A constructor that accepts no parameters is called the default constructor. The defaultconstructor for class A is At.A0. If no such constructor is defined, then the compiler suppliesa default constructor. Therefore a statement such as

A a;invokes the default constructor of the compiler to create the object a. The constructor functions have some special characteristics. These are :

They should be declared in the public section.

They are invoked automatically when the objects are created.

They do not have return types, not even void and therefore, and they cannot return values.

They cannot be inherited, though a derived class can call the base class constructor.

Like other C++ functions, they can have default arguments.

Constructors cannot be virtual. (Meaning of virtual will be discussed later in Chapter 9.)

We cannot refer to their addresses.

An object with a constructor (or destructor) cannot be used as a member of a union.

They make 'implicit calls' to the operators new and delete when memory alloca-

tion is required.

 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
>>返回首頁<<
 
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有