04.01.2015 Views

Thinking in C++ 2nd ed Volume 1 Revision 6

Thinking in C++ 2nd ed Volume 1 Revision 6

Thinking in C++ 2nd ed Volume 1 Revision 6

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

What’s <strong>in</strong>side...<br />

Preface 21<br />

What’s new <strong>in</strong> the<br />

second <strong>ed</strong>ition ........ 22<br />

What’s <strong>in</strong> <strong>Volume</strong> 2 of this<br />

book................................. 23<br />

How to get <strong>Volume</strong> 2 .......... 23<br />

Prerequisites .......... 23<br />

Learn<strong>in</strong>g <strong>C++</strong>......... 24<br />

Goals..................... 25<br />

Chapters................ 27<br />

Exercises ............... 31<br />

Exercise solutions............... 32<br />

Source code ........... 32<br />

Language standards 33<br />

Language support .............. 34<br />

The book’s CD ROM. 34<br />

CD ROMs, sem<strong>in</strong>ars, &<br />

consult<strong>in</strong>g .............. 35<br />

Errors.................... 35<br />

Acknowl<strong>ed</strong>gements . 35<br />

1: Introduction to<br />

objects 39<br />

The progress of<br />

abstraction............. 40<br />

An object has an<br />

<strong>in</strong>terface ................ 43<br />

The hidden<br />

implementation ...... 46<br />

Reus<strong>in</strong>g the<br />

implementation ...... 47<br />

Inheritance: reus<strong>in</strong>g<br />

the <strong>in</strong>terface .......... 48<br />

Is-a vs. is-like-a relationships53<br />

Interchangeable<br />

objects with<br />

polymorphism ........ 54<br />

Creat<strong>in</strong>g and<br />

destroy<strong>in</strong>g objects .. 59<br />

Exception handl<strong>in</strong>g:<br />

deal<strong>in</strong>g with errors.. 61<br />

Analysis and design 62<br />

Phase 0: Make a plan ..........64<br />

Phase 1: What are we mak<strong>in</strong>g66<br />

Phase 2: How will we build it69<br />

Phase 3: Build it .................73<br />

Phase 4: Iteration ...............74<br />

Plans pay off ......................76<br />

Why <strong>C++</strong> succe<strong>ed</strong>s. 76<br />

A better C ..........................77<br />

You’re already on the learn<strong>in</strong>g<br />

curve.................................78<br />

Efficiency ...........................78<br />

Systems are easier to express<br />

and understand ..................78<br />

Maximal leverage with libraries79<br />

Source-code reuse with<br />

templates ..........................79<br />

Error handl<strong>in</strong>g ....................79<br />

Programm<strong>in</strong>g <strong>in</strong> the large ....80<br />

Strategies for<br />

transition............... 80<br />

Guidel<strong>in</strong>es..........................81<br />

Management obstacles ........83<br />

Summary .............. 85

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!