did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9780139194245

C++ for Java Programmers

by
  • ISBN13:

    9780139194245

  • ISBN10:

    013919424X

  • Edition: 1st
  • Format: Paperback
  • Copyright: 2003-10-28
  • Publisher: Pearson

Note: Supplemental materials are not guaranteed with Rental or Used book purchases.

Purchase Benefits

  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $106.65 Save up to $49.06
  • Rent Book $57.59
    Add to Cart Free Shipping Icon Free Shipping

    TERM
    PRICE
    DUE
    USUALLY SHIPS IN 24-48 HOURS
    *This item is part of an exclusive publisher rental program and requires an additional convenience fee. This fee will be reflected in the shopping cart.

Supplemental Materials

What is included with this book?

Summary

Written for the moderately experienced Java programmer, this book builds on readers' existing knowledge of object-oriented programming and covers all important aspects of Standard C++emphasizing more lower-level C-style details later in the presentation. Chapter topics include philosophy of C++, simplest C++, pointers and reference variables, object-based programming: classes, operator overloading, object-oriented programming: inheritance, templates, abnormal control flow, input and output, collections: the standard template library, primitive arrays and strings, C-style C++, and using Java and C++: the JNI. For new C++ programmers converted from Java.

Table of Contents

Preface
Introductionp. 1
Basic Types and Control Structuresp. 10
Functions, Arrays, Strings, and Parameter Passingp. 19
Pointers and Reference Variablesp. 35
Object-Based Programming: Classesp. 51
Operator Overloadingp. 89
Object-Oriented Programming: Inheritancep. 112
Templatesp. 136
Abnormal Control Flowp. 155
Input and Outputp. 168
Collections: The Standard Template Libraryp. 184
Primitive Arrays and Stringsp. 207
C-Style C++p. 228
Using Java and C++: The JNIp. 247
Bibliographyp. 273
Indexp. 275
Table of Contents provided by Blackwell. All Rights Reserved.

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Excerpts

For many years, C++ was thedefactolanguage of choice in introductory Computer Science courses, due largely to its support for object-oriented programming, as well as its wide adoption in industry. However, because C++ is arguably the most complex language ever to be widely-used, Java, which also supports object-oriented programming, recently has emerged as the preferred introductory language. Nonetheless, demand for C++ skill is still high in industry and most universities require C++ programming at some point in the Computer Science curriculum. Although Java and C++ look similar, programming in C++ is somewhat more challenging and filled with subtle details. While there are many books that thoroughly describe C++ (see the Bibliography), the vast majority exceed 1,000 pages and, for the most part, are written for either experienced industry programmers or novices. This book is designed as a quick start guide for students who are knowledgeable in an object-oriented language (most likely Java) and would like to learn C++. Throughout the text, we compare and contrast Java and C++, and show C++ substitutes for Java equivalents. We do not describe in detail basic concepts (such as inheritance) that are common in both C++ and Java; rather, we describe how the concepts are implemented in C++. This helps achieve one of the important goals of this book, which is to keep the page count reasonably low. Consequently, this book is not appropriate for students who have limited or no prior programming experience. Organization The book begins with a brief overview of C++ in Chapter 0. In Chapter 1, we describe some of the basic expressions and statements in C++, which mostly mirror simple Java syntax. Functions, arrays, strings, and parameter passing are discussed in Chapter 2. We use the modern alternative of introducing and using the standard vector and string classes in the C++ library, rather than the older-style built-in array constructs. Chapter 3 describes pointers and reference variables, paying particular attention to the host of pitfalls that await a C++ programmer. Chapter 4 is a long chapter that describes the basics of classes. Two C++ features that are not part of Java are operator overloading and templates. Operator overloading is discussed in Chapter 5 and templates are discussed in Chapter 7. In between, we cover inheritance in Chapter 6. In Chapter 8, we examine exceptions in C++, as well as older library routines such as abort. The next two chapters discuss some C++ libraries. Chapter 9 deals with I/O and Chapter 10 introduces the Standard Template Library, which is the C++ equivalent of the Collections API. Both libraries are complex enough to require an entire book: We provide the most important highlights, rather than attempting to list every detail. Many courses will require C programming in addition to C++ programming. Because C++ builds on C, many C programming techniques are also found in C++, although in C++ they are not always the preferred way to do things. Chapter 11 covers primitive arrays and strings. As we mentioned earlier, modern C++ uses library classes as an alternative. Nonetheless, primitive arrays and strings will almost certainly be encountered by any C++ programmer, and the techniques are essentially the same in C++ and C. Chapter 12 covers C idioms that are occasionally used in C++, but probably should be avoided. Finally, in Chapter 13, we describe the Java Native Interface (again a whole book can be written on this one topic), which allows Java programmers to implement their methods in C++ or C.

Rewards Program