Cart
Free Shipping in the UK
Proud to be B-Corp

C++ Programming Style Tom Cargill

C++ Programming Style By Tom Cargill

C++ Programming Style by Tom Cargill


£9.40
New RRP £32.99
Condition - Very Good
Only 1 left

Summary

Examines the use of the in-the-large language features of C++, which sometimes confuse even experienced programmers. The author demonstrates that unwarranted use of the more powerful language features may lead to cluttered programs which are harder to comprehend and sometimes less efficient than more straightforward alternatives.

C++ Programming Style Summary

C++ Programming Style by Tom Cargill

C++ supports programming-in-the-large, allowing relationships between different parts of a program to be expressed. The scope of C++ programming style therefore goes beyond traditional in-the-small issues which relate to the details of line-by-line coding. This book examines the use of the in-the-large language features of C++, which sometimes confuse even experienced programmers. The author demonstrates that unwarranted use of the more powerful language features may lead to cluttered programs which are harder to comprehend and sometimes less efficient than more straightforward alternatives. Cargill rewrites several programs, using techniques that range from improving consistency to removing redundant inheritance. The presentation simulates a code review, in which readers may independently evaluate and criticize alternative approaches to programming problems, and then compare their analyses with those of the author. Design and coding style rules are distilled from the examples. Understanding and following these rules will help professional programmers design and write better C++ programs.A chapter is devoted to each of the following topics: *abstractions *operator overloading *consistency *wrappers *unnecessary inheritance *efficiency *virtual functions Building on the programming rules introduced in the first seven chapters, Cargill presents a case study in which a single program undergoes repeated transformations that improve its overall quality while reducing its size. The book concludes with a chapter on multiple inheritance. 0201563657B04062001

About Tom Cargill

Tom Cargill is a well-regarded expert in C++. While at AT&T Bell Laboratories, Murray Hill, NJ, he was among the first programmers to use C++. He is a columnist for The C++ Journal and The C++ Report, and is also the author of two of Technology Exchange Company's C++ courses. The material for this book was originally developed for tutorials that Cargill has presented at numerous technical conference.



0201563657AB04062001

Table of Contents



Preface.


Introduction.


Bibliographic Notes.


1. Abstraction.

Style Example: Pricing Computers.

Finding a Common Abstraction.

Differences Between Classes.

Reintroducing Inheritance.

Removing the Enumerations.

Summary.

Bibliographic Notes.

Exercise.



2. Consistency.

Style Example: Class string.

Well-defined State.

Consistent Physical State.

Class Invariants.

Consistent Use of Dynamic Memory.

Deallocating Dynamic Memory.

Style Example: A Second Approach.

Summary.

Bibliographic Notes.

Exercises.



3. Unnecessary Inheritance.

Style Example: Stacks.

Inheritance Scope Rules.

Inheritance Relationships.

Encapsulation.

Interface versus Implementation.

Templates.

Summary.

Bibliographic Notes.

Exercise.



4. Virtual Functions.

Style Example: Vehicles and Garages.

Consistency.

Base Destructors.

Inheritance.

Coupling.

Summary.

Bibliographic Notes.

Exercise.



5. Operator Overloading.

Operator Overloading Basics.

Style Example: Class FileArray.

Inheritance for Implementation.

A Programming Tradeoff: Overloaded Operators versus Member Functions.

Summary.

Bibliographic Notes.

Exercises.



6. Wrappers.

A C Library.

Style Example: A C++ Wrapper for dirent.

Multiple Directory Objects.

Constructor Failure.

Public Access to Failure State.

Error Condition Argument.

Summary.

Bibliographic Notes.

Exercise.



7. Efficiency.

Style Example: Class BigInt.

Exercising BigInt.

The Length of Dynamic Strings.

The Number of Dynamic Strings.

The Client Code.

Rewriting BigInt.

Summary.

Bibliographic Notes.

Exercises.



8. A Case Study.

Style Example: Finite State Machines.

Initialization.

Coupling.

Cohesion.

Modules versus Abstract Data Types.

Generalization.

Bibliographic Notes.

Exercises.



9. Multiple Inheritance.

Ambiguities under Multiple Inheritance.

Directed Acyclic Inheritance Graphs.

Exploring Virtual Base Classes.

Style Example: Class Monitor.

Style Example: A Virtual Base Class.

Multiple Protocol Inheritance.

Summary.

Bibliographic Notes.

Exercises.



10. Summary of Rules.


Index. 0201563657T04062001

Additional information

GOR004076807
9780201563658
0201563657
C++ Programming Style by Tom Cargill
Used - Very Good
Hardback
Pearson Education (US)
1992-06-30
248
N/A
Book picture is for illustrative purposes only, actual binding, cover or edition may vary.
This is a used book - there is no escaping the fact it has been read by someone else and it will show signs of wear and previous use. Overall we expect it to be in very good condition, but if you are not entirely satisfied please get in touch with us

Customer Reviews - C++ Programming Style