Object-Oriented Software in ANSI C++ / Edition 2 by Michael A. Smith | 9780077095048 | Hardcover | Barnes & Noble
Object-Oriented Software in ANSI C++ / Edition 2

Object-Oriented Software in ANSI C++ / Edition 2

by Michael A. Smith
     
 

ISBN-10: 0077095049

ISBN-13: 9780077095048

Pub. Date: 06/28/2000

Publisher: McGraw-Hill Higher Education

The book covers ANSI C++ and is illustrated with numerous programming examples. The first few chapters introduce computer programming for those who have no previous programming knowledge. The book avoids the early use of low level constructs such as pointers so that the key object-oriented concepts can be fully introduced. Only when the core ideas have been covered

Overview

The book covers ANSI C++ and is illustrated with numerous programming examples. The first few chapters introduce computer programming for those who have no previous programming knowledge. The book avoids the early use of low level constructs such as pointers so that the key object-oriented concepts can be fully introduced. Only when the core ideas have been covered are the low-level components of C++ introduced. A case study is used to show how a UML design can be formulated and from the developed design a solution in C++ is developed. The UML notation is used in the book to illustrate object-oriented ideas and concepts.
At the end of each chapter are self assessment exercises to answer and programming examples to implement.

Product Details

ISBN-13:
9780077095048
Publisher:
McGraw-Hill Higher Education
Publication date:
06/28/2000
Edition description:
2ND
Pages:
475
Product dimensions:
7.40(w) x 9.61(h) x 1.18(d)
Age Range:
18 Years

Related Subjects

Table of Contents

Preface xii
Introduction to programming
1(20)
Computer programming
1(1)
Programming languages
1(1)
Range of programming languages
2(2)
A small problem
4(1)
Solving the problem using a calculator
4(1)
Solving the problem using the C++ language
5(3)
The role of comments
8(1)
Summary
9(1)
A more descriptive program
9(2)
Types of memory location
11(1)
Repetition
11(1)
Introduction to the while statement
12(3)
Selection
15(3)
Self-assessment
18(1)
Paper exercises
19(2)
Software design
21(8)
The software crisis
21(1)
A problem, the model and the solution
21(2)
Objects
23(2)
The class
25(1)
Methods and messages
25(1)
Class objects
26(1)
Inheritance
27(1)
Polymorphism
28(1)
Self-assessment
28(1)
Introducing C++ - part 1
29(14)
A first C++ program
29(3)
A larger C++ program
32(1)
Repetition: while
33(1)
Selection: if
33(1)
Other repetition constructs
34(1)
Other selection constructs
35(2)
Input and output
37(2)
The , operator
39(2)
Self-assessment
41(1)
Exercises
42(1)
Introducing C++ - part 2
43(16)
Introduction
43(1)
Declarations of data items
43(1)
Fundamental types of C++
44(1)
Typedef
44(1)
The types float, double, long double
45(1)
Const declarations
46(1)
Enumerations
46(1)
Arithmetic operators
47(1)
Relational operators in C++
48(1)
Logical operators
48(1)
The type bool
49(1)
Bitwise operators
49(2)
The size of operators
51(1)
Promotion of variables
51(2)
Casts
53(1)
Shortcuts increment and decrement
54(1)
Expressions
55(1)
Summary of operators
55(1)
Self-assessment
56(3)
Classes
59(18)
Introduction
59(1)
Objects, messages and methods
60(1)
The class
60(3)
Functions
63(3)
Specification and implementation of the class Account
66(4)
A personal account manager
70(3)
Mutators and inspectors
73(1)
Keeping specification and implementation together
74(1)
Self-assessment
75(1)
Exercises
75(2)
Functions
77(22)
Introduction
77(2)
Call by value/call by reference
79(3)
const parameters to a function
82(1)
Recursion
82(2)
Inline vs. out of line code
84(3)
Overloading of functions
87(1)
Different number of parameters to a function
88(1)
Default values to parameters
89(1)
Matching a function call to a function declaration
90(3)
Function templates
93(2)
Order of function matching (overloaded functions)
95(1)
Self-assessment
96(1)
Exercises
97(2)
Separate compilation
99(14)
Introduction
99(3)
Actual compilation
102(1)
Separate compilation and the inline directive
102(1)
A personal account manager revisited
103(9)
Self-assessment
112(1)
Exercises
112(1)
Arrays
113(30)
Arrays
113(1)
Using arrays
114(1)
No subscript checking with C++ arrays
114(1)
Multidimensional arrays
115(1)
A single dimension array as a parameter to a function
116(1)
Multidimensional arrays as parameters to a function
117(3)
Initializing arrays of objects
120(1)
Case study: the game of noughts and crosses
120(7)
A stack built using an array
127(4)
A computerized bank system
131(4)
The part_of relation
135(1)
Arrays and strings
135(3)
A class to manipulate a person's name and address
138(3)
Self-assessment
141(1)
Exercises
141(2)
Templates
143(10)
Introduction to templated classes
143(3)
Multiple parameters to a template class
146(1)
Problems with templated classes
147(4)
Separate compilation and template classes
151(1)
Self-assessment
151(1)
Exercises
151(2)
Static variables and functions
153(6)
Static variables
153(2)
Account with an audit trail
155(3)
Self-assessment
158(1)
Exercises
158(1)
Inheritance
159(32)
Account with statement
159(5)
The is_a relation
164(1)
A savings account
164(5)
A saving account with tiered interest rates
169(3)
Visibility of class members
172(3)
Constructors and destructors
175(1)
A class to describe a room
176(1)
A class to describe an office
177(2)
Initializing data members of a class
179(1)
Multiple inheritance
180(3)
Accessing base class objects
183(2)
Static binding
185(1)
Inherited functions
185(1)
Inheritance of the same base class
186(2)
Self-assessment
188(1)
Exercises
188(3)
The game of four counters
191(22)
Four counters
191(4)
Class diagram
195(1)
Specification of the C++ classes
195(2)
The implementation
197(14)
Self-assessment
211(1)
Exercises
212(1)
Namespace
213(6)
Introduction to namespace
213(1)
Selectively using names in different namespace
214(1)
Nested namespaces
215(1)
Namespace alias
216(1)
Adding to a namespace
217(1)
Self-assessment
217(1)
Exercises
217(2)
Exceptions
219(6)
Exceptions
219(2)
Capturing any exception
221(1)
Specifying exceptions which may be propagated
222(1)
Putting it all together
223(1)
Self-assessment
223(1)
Exercises
224(1)
Operator overloading
225(22)
Defining operators in C++
225(1)
The class Money
225(3)
Declaration of instances of a class with an initial value(s)
228(1)
Class constants
229(3)
Use of friend functions
232(3)
Restrictions on overloading operators
235(1)
Conversion operators
235(2)
The class Money as a base class
237(7)
Initializing arrays of objects
244(1)
Self-assessment
245(1)
Exercises
245(2)
Polymorphism
247(12)
Rooms in a building
247(1)
The classes for Office and Room
248(4)
Heterogeneous collections of objects
252(1)
A building information program
253(3)
Advantages and disadvantages of polymorphism
256(1)
Program maintenance and polymorphism
257(1)
Self-assessment
258(1)
Exercises
258(1)
Pointers and dynamic storage
259(28)
Introduction
259(2)
Use of pointers in C++
261(1)
From arrays to pointers
261(3)
Pointers vs. arrays
264(2)
Dynamic storage allocation
266(2)
Use of dynamic storage
268(5)
struct vs. class
273(1)
Dynamic vs. static storage allocation
274(1)
Overloading the operators new and delete
274(4)
Standard operators new and delete
278(1)
Operators.* and ->*
279(2)
Pointers and polymorphism
281(1)
Opaque types
282(2)
Class component *this
284(1)
Self-assessment
285(1)
Exercises
286(1)
Polymorphism revisited
287(16)
Abstract class
287(3)
A derived interest-bearing account
290(3)
A derived higher interest account
293(6)
Run-time typeid
299(1)
Downcasting
300(1)
Self-assessment
301(1)
Exercises
302(1)
Declarations and casts
303(8)
Storage declarations of derived types
303(1)
Structures allocated
304(1)
Function prototypes
305(1)
Union
306(1)
Bit-field
307(1)
Casts
308(1)
Self-assessment
309(2)
Container classes
311(20)
Introduction
311(1)
A safe vector
312(9)
Implementing a stack with the class Vector
321(2)
Hashtable
323(7)
Self-assessment
330(1)
Exercises
330(1)
Pre-processing directives
331(10)
Introduction
331(1)
Source inclusion of files
331(1)
Text substitution
331(2)
Conditional compilation
333(2)
The error directive
335(1)
The pragma directive
336(1)
The line directive
336(1)
Predefined names
336(1)
Creating a string
337(1)
Pasting tokens together
337(1)
Overuse of macros
338(1)
Inclusion of header files
339(1)
Parameter specification: variable number of parameters
339(1)
Self-assessment
340(1)
Exercises
340(1)
C++ input and output
341(14)
Overview of the C++ I/O system
341(2)
Inserters, extractors and IO manipulators
343(6)
A computerized bank system (using binary data)
349(5)
Self-assessment
354(1)
Exercises
354(1)
Deep and shallow copying
355(10)
Descriptors
355(2)
A class to perform deep and shallow copying
357(5)
Example of usage
362(1)
Preventing assignment of an object
363(1)
Self-assessment
364(1)
Exercises
364(1)
Pointers and generic algorithms
365(22)
Generic algorithms
365(1)
Generic algorithm copy
366(1)
Generic algorithm for_each
367(2)
Sorting
369(1)
Generic algorithm sort
370(4)
Generic algorithm find
374(1)
Generic algorithm find with criteria
375(2)
Generic algorithm transform
377(3)
Useful function objects
380(1)
Generic algorithm generate
380(2)
Function adapters
382(4)
The STL library
386(1)
Self-assessment
386(1)
Exercises
386(1)
STL containers
387(28)
Introduction to STL containers
387(1)
The vector container
387(3)
Containers and iterators
390(5)
Adding range checking to the vector container
395(2)
The list container
397(3)
The deque container
400(2)
The stack container
402(1)
The queue container
403(1)
The priority queue container
404(2)
The map and multimap containers
406(5)
The set and multiset containers
411(3)
Self-assessment
414(1)
Exercises
414(1)
Using legacy C++ compilers
415(6)
Overview
415(1)
Include directive
415(1)
The bool type not implemented
415(1)
Scope of the for-init-statement in a for loop
416(1)
Dynamic memory allocation with new
416(1)
The exception mechanism not implemented
417(1)
The exception classes not implemented
417(1)
The namespace directive not implemented
417(1)
The template mechanism not implemented
418(1)
The mutable qualifier not implemented
419(1)
The explicit qualifier not implemented
420(1)
No initialized const members in a class
420(1)
Self-assessment
420(1)
Exercises
420(1)
Attributes
421(10)
Introduction
421(1)
Lifetime
421(2)
Linkage
423(1)
Scope
424(1)
Visibility
425(1)
Storage class
425(1)
Modifiers
426(1)
Type
427(1)
Run-time execution of a program
428(3)
C++: a summary
431(7)
Appendix A: C++ style input/output 438(4)
Appendix B: C style input/output 442(4)
Appendix C: Useful functions 446(6)
Appendix D: The string class 452(1)
Appendix E: The standard library 453(7)
Appendix F: Priority of operators 460(1)
Appendix G: String and character escape sequences 461(1)
Appendix H: Fundamental types 462(1)
Appendix I: Literals in C++ 463(1)
Appendix J: Keywords in C++ 464(1)
Appendix K: Passing data to a C++ program 465(1)
Appendix L: Access to C functions in A C++ program 466(1)
Appendix M: Compatibility of code 467

Customer Reviews

Average Review:

Write a Review

and post it to your social network

     

Most Helpful Customer Reviews

See all customer reviews >