100% found this document useful (5 votes)
46 views48 pages

(Ebook PDF) Big C++: Late Objects 3rd Editioninstant Download

The document provides information about the eBook 'Big C++: Late Objects 3rd Edition' and includes links for downloading various related programming eBooks. It outlines the book's structure, which covers fundamentals, object-oriented design, and data structures and algorithms, along with various learning aids and online resources. The book is designed for a two-semester introduction to programming and includes pedagogical elements to enhance student learning.

Uploaded by

uhegbuosalde
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (5 votes)
46 views48 pages

(Ebook PDF) Big C++: Late Objects 3rd Editioninstant Download

The document provides information about the eBook 'Big C++: Late Objects 3rd Edition' and includes links for downloading various related programming eBooks. It outlines the book's structure, which covers fundamentals, object-oriented design, and data structures and algorithms, along with various learning aids and online resources. The book is designed for a two-semester introduction to programming and includes pedagogical elements to enhance student learning.

Uploaded by

uhegbuosalde
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 48

(eBook PDF) Big C++: Late Objects 3rd Edition

instant download

https://ebooksecure.com/product/ebook-pdf-big-c-late-objects-3rd-
edition/

Download more ebook from https://ebooksecure.com


We believe these products will be a great fit for you. Click
the link to download now, or visit ebooksecure.com
to discover even more!

(eBook PDF) Brief C++: Late Objects, 3rd Edition

http://ebooksecure.com/product/ebook-pdf-brief-c-late-
objects-3rd-edition/

(eBook PDF) Big Java Late Objects 2nd Edition

http://ebooksecure.com/product/ebook-pdf-big-java-late-
objects-2nd-edition/

(eBook PDF) Java Concepts: Late Objects, 3rd Edition

http://ebooksecure.com/product/ebook-pdf-java-concepts-late-
objects-3rd-edition/

(eBook PDF) Big Java: Early Objects 5th Edition

http://ebooksecure.com/product/ebook-pdf-big-java-early-
objects-5th-edition/
(eBook PDF) Big Java: Early Objects, 7th Edition

http://ebooksecure.com/product/ebook-pdf-big-java-early-
objects-7th-edition/

(eBook PDF) Java How to Program, Late Objects Global


Edition 11th Edition

http://ebooksecure.com/product/ebook-pdf-java-how-to-program-
late-objects-global-edition-11th-edition/

(eBook PDF) Big Java: Early Objects, 6th Edition by Cay


S. Horstmann

http://ebooksecure.com/product/ebook-pdf-big-java-early-
objects-6th-edition-by-cay-s-horstmann/

(eBook PDF) Starting Out with C++: Early Objects 9th


Edition

http://ebooksecure.com/product/ebook-pdf-starting-out-with-c-
early-objects-9th-edition/

C++ How to Program Early Objects Version 9th Edition


(eBook PDF)

http://ebooksecure.com/product/c-how-to-program-early-objects-
version-9th-edition-ebook-pdf/
BigC++
Cay Horstmann
Late
Objects

3/e
vi Preface

Example Table Example table activities make the student the active participant in
building up tables of code examples similar to those found in the book. The tables
come in many different forms. Some tables ask the student to determine the output of
a line of code, or the value of an expression, or to provide code for certain tasks. This
activity helps students assess their understanding of the reading—while it is easy to
go back and review.
Algorithm Animation An algorithm animation shows the essential steps of an
algorithm. However, instead of passively watching, students get to predict each step.
When finished, students can start over with a different set of inputs. This is a surpris-
ingly effective way of learning and remembering algorithms.
Rearrange Code Rearrange code activities ask the student to arrange lines of code
by dragging them from the list on the right to the area at left so that the resulting code
fulfills the task described in the problem. This activity builds facility with coding
structure and implementing common algorithms.
Object Diagram Object diagram activities ask the student to create a memory
diagram to illustrate how variables and objects are initialized and updated as sample
code executes. The activity depicts variables, objects, and references in the same way
as the figures in the book. After an activity is completed, pressing “Play” replays the
animation. This activity goes beyond hand-tracing to illuminate what is happening in
memory as code executes.
Code Completion Code completion activities ask the student to finish a partially-
completed program, then paste the solution into CodeCheck (a Wiley-based online
code evaluator) to learn whether it produces the desired result. Tester classes on the
CodeCheck site run and report whether the code passed the tests. This activity serves
as a skill-building lab to better prepare the student for writing programs from scratch.

A Tour of the Book


This book is intended for a two-semester introduction to programming that may also
include algorithms and data structures. The organization of chapters offers the same
flexibility as the previous edition; dependencies among the chapters are also shown
in Figure 1.

Part A: Fundamentals (Chapters 1–8)


The first six chapters follow a traditional approach to basic programming concepts.
Students learn about control structures, stepwise refinement, and arrays. Objects are
used only for input/output and string processing. Input/output is first covered in
Chapter 2, which may be followed by an introduction to reading and writing text
files in Section 8.1.
In a course for engineers with a need for systems and embedded programming,
you will want to cover Chapter 7 on pointers. Sections 7.1 and 7.4 are sufficient for
using pointers with polymorphism in Chapter 10.
File processing is the subject of Chapter 8. Section 8.1 can be covered sooner for
an intro­duction to reading and writing text files. The remainder of the chapter gives
addi­tional material for practical applications.
Preface vii

Part B: Object-Oriented Design (Chapters 9–10)


After students have gained a solid foundation, they are ready to tackle the implemen-
tation of classes. Chapters 9 and 10 introduce the object-oriented features of C++.
Chapter 9 introduces class design and implementation. Chapter 10 covers inheritance
and polymorphism. By the end of these chapters, students will be able to implement
programs with multiple interacting classes.

Part C: Data Structures and Algorithms (Chapters 11–17)


Chapters 11–17 cover algorithms and data structures at a level suitable for begin-
ning students. Recursion, in Chapter 11, starts with simple examples and progresses

Fundamentals
1. Introduction
Object-Oriented Design
Data Structures & Algorithms

2. Fundamental
Data Types

3. Decisions

4. Loops

A gentle
introduction to recursion
5. Functions is optional.
Section 8.1
contains the core
material
6. Arrays
6. Iteration
and Vectors

7. Pointers 8. Streams 9. Classes 11. Recursion

Sections 10. Inheritance 13. Advanced 12. Sorting


C++ and Searching
7.1 and 7.4 are
required
14. Linked Lists,
Stacks and Queues

15. Sets, Maps


Section 15.1
and Hash Tables
is required

16. Trees

Figure 1 17. Priority


Queues and Heaps
Chapter Dependencies
viii Preface

to meaningful applications that would be difficult to implement iteratively. Chapter


12 covers quadratic sorting algorithms as well as merge sort, with an informal intro-
duction to big-Oh notation. Chapter 13 introduces advanced C++ features that are
required for implementing data structures, including templates and memory man-
agement. Chapters 14–17 cover linear and tree-based data structures. Students learn
how to use the standard C++ library versions. They then study the implementations
of these data structures and analyze their efficiency.
Any subset of these chapters can be incorporated into a custom print version of
this text; ask your Wiley sales representative for details, or visit customselect.wiley.com
to create your custom order.

Appendices
Appendices A and B summarize C++ reserved words and operators. Appendix C
lists character escape sequences and ASCII character code values. Appendix D docu-
ments all of the library functions and classes used in this book.
Appendix E contains a programming style guide. Using a style guide for program­
ming assignments benefits students by directing them toward good habits and reduc-
ing gratuitous choice. The style guide is available in electronic form on the book’s
companion web site so that instructors can modify it to reflect their preferred style.
Appendix F introduces common number systems used in computing.

Web Resources
This book is complemented by a complete suite of online resources. Go to www.wiley.
com/go/bclo3 to visit the online companion sites, which include

• Source code for all example programs in the book and its Worked Examples, plus
additional example programs.
• Worked Examples that apply the problem-solving steps in the book to other
realistic examples.
• Lecture presentation slides (for instructors only).
• Solutions to all review and programming exercises (for instructors only).
• A test bank that focuses on skills, not just terminology (for instructors only). This
extensive set of multiple-choice questions can be used with a word processor or
imported into a course management system.
• “CodeCheck” assignments that allow students to work on programming prob-
lems presented in an innovative online service and receive immediate feedback.
Instructors can assign exercises that have already been prepared, or easily add
their own. Visit http://codecheck.it to learn more.

Pointers in the print


companion describe what
students will find in their WORKED EXAMPLE 2.1
Computing Travel Time
E-Text or online.
Learn how to develop a hand calculation to compute the time that
a robot requires to retrieve an item from rocky terrain. See your
.
E-Text or visit wiley.com/go/bclo3
Courtesy of NASA.

EXAMPLE CODE See how_to_1/scores_vector in your companion code for a solution using vectors instead of arrays.
Walkthrough ix

A Walkthrough of the Learning Aids


The pedagogical elements in this book work together to focus on and reinforce key
concepts and fundamental principles of programming, with additional tips and detail
organized to support and deepen these fundamentals. In addition to traditional
features, such as chapter objectives and a wealth of exercises, each chapter contains
elements geared to today’s visual learner.

106 Chapter 4 Loops

4.3 The for Loop


Throughout each chapter,
It often happens that you want to execute a sequence of
margin notes show where The for loop is
used when a statements a given number of times. You can use a while
value runs from a loop that is controlled by a counter, as in the following
new concepts are introduced starting point to an
ending point with a
example:
and provide an outline of key ideas. constant increment
or decrement.
counter = 1; // Initialize the counter
while (counter <= 10) // Check the counter
{
cout << counter << endl;
counter++; // Update the counter
}

Because this loop type is so common, there is a special


form for it, called the for loop (see Syntax 4.2).
for (counter = 1; counter <= 10; counter++)
{
© Enrico Fianchini/iStockphoto.
cout << counter << endl;
}
You can visualize the
Some people call this loop count-controlled. In contrast, for loop as an orderly
the while loop of the preceding section can be called an sequence of steps.
event-controlled loop because it executes until an event
occurs (for example, when the balance reaches the target). Another commonly-used
Annotated syntax boxes term for a count-controlled loop is definite. You know from the outset that the loop
body will be executed a definite number of times––ten times in our example. In con-
provide a quick, visual overview trast, you do not know how many iterations it takes to accumulate a target balance.
Such a loop is called indefinite.
of new language constructs.
Syntax 4.2 for Statement

These three
expressions should be related.
See Programming Tip 4.1.

Annotations explain This initialization The loop is This update is


required components happens once
before the loop starts.
executed while
this condition is true.
executed after
each iteration.
and point to more information for (int i = 5; i <= 10; i++)

on common errors or best practices The variable i is


{
sum = sum + i;
This loop executes 6 times.
associated with the syntax. defined only in this
for loop.
}
See Programming Tip 4.3.

The for loop neatly groups the initialization, condition, and update expressions
together. However, it is important to realize that these expressions are not executed
together (see Figure 3).

Analogies to everyday objects are


used to explain the nature and behavior
of concepts such as variables, data
Like a variable in a computer types, loops, and more.
program, a parking space has
an identifier and contents.
x Walkthrough

Memorable photos reinforce


analogies and help students
remember the concepts. pie(fruit) pie(fruit)

A recipe for a fruit pie may say to use any kind of fruit.
Here, “fruit” is an example of a parameter variable.
Apples and cherries are examples of arguments.

Problem Solving sections teach


techniques for generating ideas and
6.5 Problem Solving: Discovering Algorithms by Manipulating Physical Objects 277
evaluating proposed solutions, often
using pencil and paper or other Now how does that help us with our problem, switching the first and the second
half of the array?
artifacts. These sections emphasize Let’s put the first coin into place, by swapping it with the fifth coin. However, as
C++ programmers, we will say that we swap the coins in positions 0 and 4:
that most of the planning and problem
solving that makes students successful
happens away from the computer.

Next, we swap the coins in positions 1 and 5:

HOW TO 1.1
Describing an Algorithm with Pseudocode
This is the first of many “How To” sections in this book that give you step-by-step proce-
dures for carrying out important tasks in developing computer programs.
Before you are ready to write a program in C++, you need to develop an algorithm—a
method for arriving at a solution for a particular problem. Describe the algorithm in pseudo-
code––a sequence of precise steps formulated in English. To illustrate, we’ll devise an algo-
rithm for this problem:
How To guides give step-by-step
Problem Statement You have the choice of buying one guidance for common programming
of two cars. One is more fuel efficient than the other, but also
more expensive. You know the price and fuel efficiency (in miles tasks, emphasizing planning and
per gallon, mpg) of both cars. You plan to keep the car for ten
years. Assume a price of $4 per gallon of gas and usage of 15,000 testing. They answer the beginner’s
miles per year. You will pay cash for the car and not worry about
financing costs. Which car is the better deal? © dlewis33/Getty Images. question, “Now what do I do?” and
Step 1 Determine the inputs and outputs. integrate key concepts into a
In our sample problem, we have these inputs: problem-solving sequence.
• purchase price1 and fuel efficiency1, the price and fuel efficiency (in mpg) of the first car
• purchase price2 and fuel efficiency2, the price and fuel efficiency of the second car

WORKED EXAMPLE 1.1


Writing an Algorithm for Tiling a Floor

Problem Statement Your task is to tile a rectangular bathroom floor with alternating Worked Examples apply
black and white tiles measuring 4 × 4 inches. The floor dimensions, measured in inches, are
multiples of 4. the steps in the How To to
Step 1 Determine the inputs and outputs.
a different example, showing
The inputs are the floor dimensions (length × width), how they can be used to
measured in inches. The output is a tiled floor.
Step 2 Break down the problem into smaller tasks.
plan, implement, and test
A natural subtask is to lay one row of tiles. If you can a solution to another
solve that task, then you can solve the problem by lay-
ing one row next to the other, starting from a wall, until programming problem.
you reach the opposite wall.
How do you lay a row? Start with a tile at one wall.
If it is Names
Table 3 Variable white, putin
a black
C++ one next to it. If it is black, put
a white one next to it. Keep going until you reach the
Variable Name wall. The row will contain width / 4 tiles.
opposite Comment © rban/iStockphoto.

Step 3 Describe each subtask in pseudocode.


can_volume1 Variable names consist of letters, numbers, and the underscore
character.
x In mathematics, you use short variable names such as x or y. This is
legal in C++, but not very common, because it can make programs
harder to understand (see Programming Tip 2.1). Example tables support beginners
!
Can_volume Caution: Variable names are case sensitive. This variable name is with multiple, concrete examples.
different from can_volume.
These tables point out common
6pack Error: Variable names cannot start with a number.

can volume Error: Variable names cannot contain spaces.


errors and present another quick
double Error: You cannot use a reserved word as a variable name. reference to the section’s topic.
ltr/fl.oz Error: You cannot use symbols such as . or /
Walkthrough xi

Consider the function call illustrated in Figure 3:


double result1 = cube_volume(2); Progressive figures trace code
• The parameter variable side_length of the cube_volume function is created. ❶
• The parameter variable is initialized with the value of the argument that was
segments to help students visualize
passed in the call. In our case, side_length is set to 2. ❷ the program flow. Color is used
• The function computes the expression side_length * side_length * side_length,
which has the value 8. That value is stored in the variable volume. ❸ consistently to make variables and
• The function returns. All of its variables are removed. The return value is trans-
ferred to the caller, that is, the function calling the cube_volume function. ❹
other elements easily recognizable.

1 Function call result1 =


double result1 = cube_volume(2);

1 Initialize counter
side_length = for (counter = 1; counter <= 10; counter++)
{
cout << counter << endl;
2 Initializing function parameter variable counter = 1 }
result1 =
double result1 = cube_volume(2);
2 Check condition
side_length = for (counter = 1; counter <= 10; counter++)
2
{
cout << counter << endl;
counter = 1 }
3 About to return to the caller result1 =

3 Execute loop body


for (counter = 1; counter <= 10; counter++)
side_length = 2 {
double volume = side_length * side_length * side_length;
return volume; cout << counter << endl;
volume = 8 counter = 1 }

4 After function call result1 = 8 4 Update counter


for (counter = 1; counter <= 10; counter++)
double result1 = cube_volume(2); {
cout << counter << endl;
counter = 2 }
Figure 3 Parameter Passing

5 Check condition again


for (counter = 1; counter <= 10; counter++)
{
cout << counter << endl;
counter = 2 }

Figure 3 Execution of a for Loop


Optional engineering exercises
engage students with applications
from technical fields. Engineering P7.12 Write a program that simulates the control
software for a “people mover” system, a set of
driverless trains that move in two concentric
circular tracks. A set of switches allows trains
to switch tracks.
In your program, the outer and inner tracks
should each be divided into ten segments.
Each track segment can contain a train that
moves either clockwise or counterclockwise.
sec02/cube.cpp A train moves to an adjacent segment in its track or, if that segment is occupied, to
the adjacent segment in the other track.
1 #include <iostream>
2 Define a Segment structure. Each segment has a pointer to the next and previous
3 using namespace std; segments in its track, a pointer to the next and previous segments in the other track,
4
5 /**
6 Computes the volume of a cube.
7 @param side_length the side length of the cube
8 @return the volume
9 */
10 double cube_volume(double side_length)
11 {
12 double volume = side_length * side_length * side_length;
13 return volume;
14 }
15
16 int main()
Program listings are carefully
17
18
{
double result1 = cube_volume(2); designed for easy reading,
double result2 = cube_volume(10);
19
20 cout << "A cube with side length 2 has volume " << result1 << endl; going well beyond simple
21 cout << "A cube with side length 10 has volume " << result2 << endl;
22 color coding. Functions are set
23 return 0;
24 } off by a subtle outline.
Program Run
A cube with side length 2 has volume 8
A cube with side length 10 has volume 1000

EXAMPLE CODE See sec04 of your companion code for another implementation of the earthquake program that you
Additional example programs
saw in Section 3.3. Note that the get_description function has multiple return statements.
are provided with the companion
code for students to read, run,
and modify.
xii Walkthrough

Common Errors describe the kinds Common Error 2.1


Using Undefined Variables
of errors that students often make, You must define a variable before you use it for the first time. For example, the following
with an explanation of why the errors sequence of statements would not be legal:
double can_volume = 12 * liter_per_ounce;
occur, and what to do about them. double liter_per_ounce = 0.0296;
In your program, the statements are compiled in order. When the compiler reaches the first
statement, it does not know that liter_per_ounce will be defined in the next line, and it reports
an error.

Programming Tip 3.6


Hand-Tracing
A very useful technique for understanding whether a program
works correctly is called hand-tracing. You simulate the pro-
gram’s activity on a sheet of paper. You can use this method with
pseudocode or C++ code.
Get an index card, a cocktail napkin, or whatever sheet of
Programming Tips explain paper is within reach. Make a column for each variable. Have the
program code ready. Use a marker, such as a paper clip, to mark
good programming practices, the current statement. In your mind, execute statements one at a
time. Every time the value of a variable changes, cross out the old
and encourage students to be value and write the new value below the old one.
© thomasd007/iStockphoto.

For example, let’s trace the tax program with the data from the
more productive with tips and program run in Section 3.4. In lines 13 and 14, tax1 and tax2 are
Hand-tracing helps you
understand whether a
initialized to 0. program works correctly.
techniques such as hand-tracing. 6 int main()
7 {
8 const double RATE1 = 0.10; marital
9 const double RATE2 = 0.25; tax1 tax2 income status
10 const double RATE1_SINGLE_LIMIT = 32000;
11 const double RATE1_MARRIED_LIMIT = 64000; 0 0
12
13 double tax1 = 0;
14 double tax2 = 0;
15

In lines 18 and 22, income and marital_status are initialized by input statements.
16 double income;
17 cout << "Please enter your income: ";
18 cin >> income; marital
19 tax1 tax2 income status
20 cout << "Please enter s for single, m for married: ";
21 string marital_status; 0 0 80000 m
22 cin >> marital_status;
23

Because marital_status is not "s", we move to the else


branch of the outer if statement (line 36).
24 if (marital_status == "s")
25 {
26 if (income <= RATE1_SINGLE_LIMIT)
27
28
{ Special Topic 6.5
tax1 = RATE1 * income;
29
30
}
else The Range-Based for Loop
31 {
32 C++ 11 introduces a convenient syntax for visiting all elements in a “range” or sequence of ele-
tax1 = RATE1 * RATE1_SINGLE_LIMIT;
ments. This loop displays all elements in a vector:
vector<int> values = {1, 4, 9, 16, 25, 36};
for (int v : values)
{
cout << v << " ";
}

Special Topics present optional In each iteration of the loop, v is set to an element of the vector. Note that you do not use an
index variable. The value of v is the element, not the index of the element.
topics and provide additional If you want to modify elements, declare the loop variable as a reference:
for (int& v : values)
explanation of others. {
v++;
}
This loop increments all elements of the vector.
You can use the reserved word auto, which was introduced in Special Topic 2.3, for the type
of the element variable:
for (auto v : values) { cout << v << " "; }
The range-based for loop also works for arrays:
int primes[] = { 2, 3, 5, 7, 11, 13 };
for (int p : primes)
{
cout << p << " ";
}
Computing & Society 7.1 Embedded Systems The range-based for loop is a convenient shortcut for visiting or updating all elements of a
vector or an array. This book doesn’t use it because one can achieve the same result by looping
An embedded sys- would feel comfortable upgrading the duced in large volumes. Thus, the pro-
tem is a computer software in their washing machines grammer of an embedded system has
over index values. But if you like the more concise form, and use C++ 11 or later, you should
system that controls a device. The or automobile engines. If you ever a much larger economic incentive to certainly consider using it.
device contains a processor and other handed in a programming assignment conserve resources than the desktop
EXAMPLE CODE See special_topic_5 of your companion code for a program that demonstrates the range-based
hardware and is controlled by a com- that you believed to be correct, only to software programmer. Unfortunately, for loop.
puter program. Unlike a personal have the instructor or grader find bugs trying to conserve resources usually
computer, which has been designed in it, then you know how hard it is to makes it harder to write programs that
to be flexible and run many different write software that can reliably do its work correctly.
computer programs, the hardware task for many years without a chance C and C++ are commonly used
and software of an embedded system of changing it. Quality standards are languages for developing embedded
are tailored to a specific device. Com- especially important in devices whose systems.
puter controlled devices are becom- failure would destroy property or
ing increasingly common, ranging endanger human life. Many personal
from washing machines to medical computer purchasers buy computers Computing & Society presents social
equipment, cell phones, automobile that are fast and have a lot of stor-
engines, and spacecraft.
Several challenges are specific to
age, because the investment is paid
back over time when many programs
and historical topics on computing—for
programming embedded systems.
Most importantly, a much higher stan-
are run on the same equipment. But
the hardware for an embedded device
interest and to fulfill the “historical and
dard of quality control applies. Ven-
dors are often unconcerned about
is not shared––it is dedicated to one
device. A separate processor, memory,
social context” requirements of the
bugs in personal computer software,
because they can always make you
and so on, are built for every copy of
the device. If it is possible to shave a ACM/IEEE curriculum guidelines.
install a patch or upgrade to the next few pennies off the manufacturing © Courtesy of Professor Prabal Dutta.
version. But in an embedded system, cost of every unit, the savings can add
that is not an option. Few consumers up quickly for devices that are pro- The Controller of an Embedded System
Walkthrough xiii

Interactive activities in the E-Text


engage students in active reading as they…

Trace through a code segment

Build an example table

Explore common algorithms

Arrange code to fulfill a task

Complete a program and Create a memory diagram


get immediate feedback
Acknowledgments xv

Acknowledgments
Many thanks to Don Fowley, Graig Donini, Dan Sayre, Ryann Dannelly, David
Dietz, Laura Abrams, and Billy Ray at John Wiley & Sons for their help with this
project. An especially deep acknowledgment and thanks goes to Cindy Johnson for
her hard work, sound judgment, and amazing attention to detail.
I am grateful to Mark Atkins, Ivy Technical College, Katie Livsie, Gaston College,
Larry Morell, Arkansas Tech University, and Rama Olson, Gaston College, for
their contributions to the supplemental material. Special thanks to Stephen Gilbert,
Orange Coast Community College, for his help with the interactive exercises.
Every new edition builds on the suggestions and experiences of new and prior
reviewers, contributors, and users. We are very grateful to the individuals who pro-
vided feedback, reviewed the manuscript, made valuable suggestions and contribu-
tions, and brought errors and omissions to my attention. They include:
Charles D. Allison, Utah Valley State College
Fred Annexstein, University of Cincinnati
Mark Atkins, Ivy Technical College
Stefano Basagni, Northeastern University
Noah D. Barnette, Virginia Tech
Susan Bickford, Tallahassee Community College
Ronald D. Bowman, University of Alabama, Huntsville
Robert Burton, Brigham Young University
Peter Breznay, University of Wisconsin, Green Bay
Richard Cacace, Pensacola Junior College, Pensacola
Kuang-Nan Chang, Eastern Kentucky University
Joseph DeLibero, Arizona State University
Subramaniam Dharmarajan, Arizona State University
Mary Dorf, University of Michigan
Marty Dulberg, North Carolina State University
William E. Duncan, Louisiana State University
John Estell, Ohio Northern University
Waleed Farag, Indiana University of Pennsylvania
Evan Gallagher, Polytechnic Institute of New York University
Stephen Gilbert, Orange Coast Community College
Kenneth Gitlitz, New Hampshire Technical Institute
Daniel Grigoletti, DeVry Institute of Technology, Tinley Park
Barbara Guillott, Louisiana State University
Charles Halsey, Richland College
Jon Hanrath, Illinois Institute of Technology
Neil Harrison, Utah Valley University
Jurgen Hecht, University of Ontario
Steve Hodges, Cabrillo College
xvi Acknowledgments

Jackie Jarboe, Boise State University


Debbie Kaneko, Old Dominion University
Mir Behrad Khamesee, University of Waterloo
Sung-Sik Kwon, North Carolina Central University
Lorrie Lehman, University of North Carolina, Charlotte
Cynthia Lester, Tuskegee University
Yanjun Li, Fordham University
W. James MacLean, University of Toronto
LindaLee Massoud, Mott Community College
Adelaida Medlock, Drexel University
Charles W. Mellard, DeVry Institute of Technology, Irving
Larry Morell, Arkansas Tech University
Ethan V. Munson, University of Wisconsin, Milwaukee
Arun Ravindran, University of North Carolina at Charlotte
Philip Regalbuto, Trident Technical College
Don Retzlaff, University of North Texas
Jeff Ringenberg, University of Michigan, Ann Arbor
John P. Russo, Wentworth Institute of Technology
Kurt Schmidt, Drexel University
Brent Seales, University of Kentucky
William Shay, University of Wisconsin, Green Bay
Michele A. Starkey, Mount Saint Mary College
William Stockwell, University of Central Oklahoma
Jonathan Tolstedt, North Dakota State University
Boyd Trolinger, Butte College
Muharrem Uyar, City College of New York
Mahendra Velauthapillai, Georgetown University
Kerstin Voigt, California State University, San Bernardino
David P. Voorhees, Le Moyne College
Salih Yurttas, Texas A&M University

A special thank you to all of our class testers:


Pani Chakrapani and the students of the University of Redlands
Jim Mackowiak and the students of Long Beach City College, LAC
Suresh Muknahallipatna and the students of the University of Wyoming
Murlidharan Nair and the students of the Indiana University of South Bend
Harriette Roadman and the students of New River Community College
David Topham and the students of Ohlone College
Dennie Van Tassel and the students of Gavilan College
CONTENTS
PREFACE iii PT2 Do Not Use Magic Numbers 34
SPECIAL FEATURES xxiv ST1 Numeric Types in C++ 34
ST2 Numeric Ranges and Precisions 35
ST3 Defining Variables with auto 35
1 INTRODUCTION 1
2.2 Arithmetic  36
1.1 What Is Programming?   2 Arithmetic Operators  36
1.2 The Anatomy of a Computer   3 Increment and Decrement   36
Integer Division and Remainder   36
C&S Computers Are Everywhere 5
Converting Floating-Point Numbers to
1.3 Machine Code and Programming Integers  37
Languages  5 Powers and Roots   38
C&S Standards Organizations 7 CE3 Unintended Integer Division 39
1.4 Becoming Familiar with Your CE4 Unbalanced Parentheses 40
Programming Environment   7 CE5 Forgetting Header Files 40
PT1 Backup Copies 10 CE6 Roundoff Errors 41
PT3 Spaces in Expressions 42
1.5 Analyzing Your First Program   11
ST4 Casts 42
CE1 Omitting Semicolons 13
ST5 Combining Assignment and Arithmetic 42
ST1 Escape Sequences 13
C&S The Pentium Floating-Point Bug 43
1.6 Errors  14
2.3 Input and Output   44
CE2 Misspelling Words 15
Input  44
1.7 PROBLEM SOLVING Algorithm Design   16
Formatted Output  45
The Algorithm Concept   16
2.4 PROBLEM SOLVING First Do It By Hand   47
An Algorithm for Solving an Investment
Problem  17 WE1 Computing Travel Time 48
Pseudocode  18 HT1 Carrying out Computations 48
From Algorithms to Programs   19 WE2 Computing the Cost of Stamps 51
HT1 Describing an Algorithm with 2.5 Strings  51
Pseudocode 19
The string Type  51
WE1 Writing an Algorithm for Tiling a Floor 21
Concatenation  52
String Input  52
2 FUNDAMENTAL DATA String Functions  52
TYPES 25 C&S International Alphabets and Unicode 55

2.1 Variables  26
3 DECISIONS 59
Variable Definitions  26
Number Types  28 3.1 The if Statement   60
Variable Names    29 CE1 A Semicolon After the if Condition 63
The Assignment Statement   30
PT1 Brace Layout 63
Constants  31
PT2 Always Use Braces 64
Comments  31
PT3 Tabs 64
CE1 Using Undefined Variables 33
PT4 Avoid Duplication in Branches 65
CE2 Using Uninitialized Variables 33
ST1 The Conditional Operator 65
PT1 Choose Descriptive Variable Names 33

xvii
xviii Contents

3.2 Comparing Numbers and Strings   66 4.5 Processing Input   112


CE2 Confusing = and == 68 Sentinel Values  112
CE3 Exact Comparison of Floating-Point Reading Until Input Fails   114
Numbers 68 ST1 Clearing the Failure State 115
PT5 Compile with Zero Warnings 69 ST2 The Loop-and-a-Half Problem and the
ST2 Lexicographic Ordering of Strings 69 break Statement 116
HT1 Implementing an if Statement 70 ST3 Redirection of Input and Output 116
WE1 Extracting the Middle 72 4.6 PROBLEM SOLVING Storyboards  117
C&S Dysfunctional Computerized Systems 72
4.7 Common Loop Algorithms   119
3.3 Multiple Alternatives   73 Sum and Average Value   119
ST3 The switch Statement 75 Counting Matches  120
3.4 Nested Branches   76 Finding the First Match   120
CE4 The Dangling else Problem 79 Prompting Until a Match is Found   121
PT6 Hand-Tracing 79 Maximum and Minimum   121
Comparing Adjacent Values   122
3.5 PROBLEM SOLVING Flowcharts  81
HT1 Writing a Loop 123
3.6 PROBLEM SOLVING Test Cases   83 WE1 Credit Card Processing 126
PT7 Make a Schedule and Make Time for
4.8 Nested Loops   126
Unexpected Problems 84
WE2 Manipulating the Pixels in an Image 129
3.7 Boolean Variables and Operators   85
4.9 PROBLEM SOLVING Solve a Simpler
CE5 Combining Multiple Relational Operators 88
Problem First   130
CE6 Confusing && and || Conditions 88
ST4 Short-Circuit Evaluation of Boolean 4.10 Random Numbers and Simulations   134
Operators 89 Generating Random Numbers   134
ST5 De Morgan’s Law 89 Simulating Die Tosses   135
3.8 APPLICATION Input Validation   90 The Monte Carlo Method   136
C&S Digital Piracy 138
C&S Artificial Intelligence 92

4 LOOPS 95 5 FUNCTIONS 141

4.1 The while Loop   96 5.1 Functions as Black Boxes   142


CE1 Infinite Loops 100 5.2 Implementing Functions   143
CE2 Don’t Think “Are We There Yet?” 101 PT1 Function Comments 146
CE3 Off-by-One Errors 101 5.3 Parameter Passing   146
C&S The First Bug 102 PT2 Do Not Modify Parameter Variables 148
4.2 PROBLEM SOLVING Hand-Tracing  103 5.4 Return Values   148
4.3 The for Loop   106 CE1 Missing Return Value 149
PT1 Use for Loops for Their Intended ST1 Function Declarations 150
Purpose Only 109 HT1 Implementing a Function 151
PT2 Choose Loop Bounds That Match WE1 Generating Random Passwords 152
Your Task 110 WE2 Using a Debugger 152
PT3 Count Iterations 110
5.5 Functions Without Return Values   153
4.4 The do Loop   111
5.6 PROBLEM SOLVING Reusable Functions   154
PT4 Flowcharts for Loops 111
Contents xix

5.7 PROBLEM SOLVING Stepwise 6.4 PROBLEM SOLVING Adapting


Refinement  156 Algorithms  198
PT3 Keep Functions Short 161 HT1 Working with Arrays 200
PT4 Tracing Functions 161 WE1 Rolling the Dice 203
PT5 Stubs 162 6.5 PROBLEM SOLVING Discovering Algorithms by
WE3 Calculating a Course Grade 163 Manipulating Physical Objects   203
5.8 Variable Scope and Global Variables   163 6.6 Two-Dimensional Arrays   206
PT6 Avoid Global Variables 165 Defining Two-Dimensional Arrays   207
5.9 Reference Parameters   165 Accessing Elements  207
PT7 Prefer Return Values to Reference Locating Neighboring Elements   208
Parameters 169 Computing Row and Column Totals   208
ST2 Constant References 170 Two-Dimensional Array Parameters   210
CE2 Omitting the Column Size of a Two-
5.10 Recursive Functions (Optional)   170
Dimensional Array Parameter 212
HT2 Thinking Recursively 173
WE2 A World Population Table 213
C&S The Explosive Growth of Personal
Computers 174 6.7 Vectors  213
Defining Vectors  214
Growing and Shrinking Vectors   215
6 ARRAYS AND VECTORS 179
Vectors and Functions   216
6.1 Arrays  180 Vector Algorithms  216
Two-Dimensional Vectors  218
Defining Arrays  180
PT2 Prefer Vectors over Arrays 219
Accessing Array Elements   182
ST5 The Range-Based for Loop 219
Partially Filled Arrays   183
CE1 Bounds Errors 184
PT1 Use Arrays for Sequences of Related 7 POINTERS AND
Values 184 STRUCTURES 223
C&S Computer Viruses 185

6.2 Common Array Algorithms   185 7.1 Defining and Using Pointers   224
Filling  186 Defining Pointers  224
Copying   186 Accessing Variables Through Pointers   225
Sum and Average Value   186 Initializing Pointers  227
Maximum and Minimum   187 CE1 Confusing Pointers with the Data to Which
Element Separators  187 They Point 228
Counting Matches  187 PT1 Use a Separate Definition for Each Pointer
Linear Search  188 Variable 229
Removing an Element   188 ST1 Pointers and References 229
Inserting an Element   189 7.2 Arrays and Pointers   230
Swapping Elements  190 Arrays as Pointers    230
Reading Input  191 Pointer Arithmetic  230
ST1 Sorting with the C++ Library 192 Array Parameter Variables Are Pointers   232
ST2 A Sorting Algorithm 192 ST2 Using a Pointer to Step Through
ST3 Binary Search 193 an Array 233
6.3 Arrays and Functions   194 CE2 Returning a Pointer to a Local Variable 234

ST4 Constant Array Parameters 198 PT2 Program Clearly, Not Cleverly 234
ST3 Constant Pointers 235
xx Contents

7.3 C and C++ Strings   235 8.5 Command Line Arguments   274
The char Type  235 C&S Encryption Algorithms 277
C Strings  236 HT1 Processing Text Files 278
Character Arrays  237 WE1 Looking for for Duplicates 281
Converting Between C and C++ Strings   237
8.6 Random Access and Binary Files   281
C++ Strings and the [] Operator  238
Random Access  281
ST4 Working with C Strings 238
Binary Files  282
7.4 Dynamic Memory Allocation   240 Processing Image Files   282
CE3 Dangling Pointers 242 C&S Databases and Privacy 286
CE4 Memory Leaks 243

7.5 Arrays and Vectors of Pointers   243 9 CLASSES 289


7.6 PROBLEM SOLVING Draw a Picture   246
HT1 Working with Pointers 248 9.1 Object-Oriented Programming   290
WE1 Producing a Mass Mailing 249 9.2 Implementing a Simple Class   292
C&S Embedded Systems 250 9.3 Specifying the Public Interface of
7.7 Structures  250 a Class   294
Structured Types  250 CE1 Forgetting a Semicolon 296
Structure Assignment and Comparison   251 9.4 Designing the Data Representation   297
Functions and Structures   252
9.5 Member Functions   299
Arrays of Structures   252
Structures with Array Members   253 Implementing Member Functions   299
Nested Structures  253 Implicit and Explicit Parameters   299
Calling a Member Function from a
7.8 Pointers and Structures   254 Member Function  301
Pointers to Structures   254 PT1 All Data Members Should Be Private; Most
Structures with Pointer Members   255 Member Functions Should Be Public 303
ST5 Smart Pointers 256 PT2 const Correctness 303

9.6 Constructors  304
8 STREAMS 259 CE2 Trying to Call a Constructor 306
ST1 Overloading 306
8.1 Reading and Writing Text Files   260 ST2 Initializer Lists 307
Opening a Stream   260 ST3 Universal and Uniform Initialization
Reading from a File   261 Syntax 308
Writing to a File   262
9.7 PROBLEM SOLVING Tracing Objects   308
A File Processing Example   262
HT1 Implementing a Class 310
8.2 Reading Text Input   265 WE1 Implementing a Bank Account Class 314
Reading Words  265 C&S Electronic Voting Machines 314
Reading Characters  266
9.8 PROBLEM SOLVING Discovering
Reading Lines  267
Classes  315
CE1 Mixing >> and getline Input 268
PT3 Make Parallel Vectors into Vectors of
ST1 Stream Failure Checking 269
Objects 317
8.3 Writing Text Output   270
9.9 Separate Compilation   318
ST2 Unicode, UTF-8, and C++ Strings 272
9.10 Pointers to Objects   322
8.4 Parsing and Formatting Strings   273
Dynamically Allocating Objects   322
The -> Operator  323
The this Pointer  324
Contents xxi

9.11 PROBLEM SOLVING Patterns for 11.5 Mutual Recursion 380


Object Data   324 11.6 Backtracking 383
Keeping a Total   324 WE2 Towers of Hanoi 389
Counting Events  325 C&S The Limits of Computation 390
Collecting Values  326
Managing Properties of an Object   326
Modeling Objects with Distinct States   327 12 SORTING AND
Describing the Position of an Object   328 SEARCHING 393
C&S Open Source and Free Software 329
12.1 Selection Sort 394
12.2 Profiling the Selection Sort Algorithm 397
10 INHERITANCE 333
12.3 Analyzing the Performance of the Selection
10.1 Inheritance Hierarchies   334 Sort Algorithm 398
10.2 Implementing Derived Classes   338 ST1 Oh, Omega, and Theta 399

CE1 Private Inheritance 341 ST2 Insertion Sort 400

CE2 Replicating Base-Class Members 341 12.4 Merge Sort 402


PT1 Use a Single Class for Variation in Values, 12.5 Analyzing the Merge Sort Algorithm 405
Inheritance for Variation in Behavior 342
ST3 The Quicksort Algorithm 407
ST1 Calling the Base-Class Constructor 342
12.6 Searching 408
10.3 Overriding Member Functions   343
Linear Search  408
CE3 Forgetting the Base-Class Name 345
Binary Search  410
10.4 Virtual Functions and Polymorphism   346 PT1 Library Functions for Sorting and
The Slicing Problem   346 Binary Search 412
Pointers to Base and Derived Classes   347 ST4 Defining an Ordering for Sorting
Virtual Functions  348 Objects 413
Polymorphism  349 12.7 PROBLEM SOLVING Estimating the Running
PT2 Don’t Use Type Tags 352 Time of an Algorithm 413
CE4 Slicing an Object 352 Linear Time  413
CE5 Failing to Override a Virtual Function 353 Quadratic Time  414
ST2 Virtual Self-Calls 354 The Triangle Pattern   415
HT1 Developing an Inheritance Hierarchy 354 Logarithmic Time  417
WE1 Implementing an Employee Hierarchy for WE1 Enhancing the Insertion Sort Algorithm 418
Payroll Processing 359 C&S The First Programmer 418
C&S Who Controls the Internet? 360

13 ADVANCED C++ 421


11 RECURSION 363
13.1 Operator Overloading 422
11.1 Triangle Numbers 364 Operator Functions  422
CE1 Tracing Through Recursive Functions 367 Overloading Comparison Operators   425
CE2 Infinite Recursion 368 Input and Output   425
HT1 Thinking Recursively 369 Operator Members  426
WE1 Finding Files 372 ST1 Overloading Increment and Decrement
11.2 Recursive Helper Functions 372 Operators 427
ST2 Implicit Type Conversions 428
11.3 The Efficiency of Recursion 373
ST3 Returning References 429
11.4 Permutations 377 WE1 A Fraction Class 430
xxii Contents

13.2 Automatic Memory Management 430 15 SETS, MAPS, AND HASH


Constructors That Allocate Memory   430 TABLES 495
Destructors  432
Overloading the Assignment Operator   433 15.1 Sets 496
Copy Constructors  437 15.2 Maps 499
PT1 Use Reference Parameters To PT1 Use the auto Type for Iterators 503
Avoid Copies 441
ST1 Multisets and Multimaps 503
CE1 Defining a Destructor Without the Other Two
WE1 Word Frequency 504
Functions of the “Big Three” 442
ST4 Virtual Destructors 443 15.3 Implementing a Hash Table 504
ST5 Suppressing Automatic Generation of Hash Codes  504
Memory Management Functions 443 Hash Tables  505
ST6 Move Operations 444 Finding an Element   507
ST7 Shared Pointers 445 Adding and Removing Elements   508
WE2 Tracing Memory Management
Iterating over a Hash Table   508
of Strings 446 ST2 Implementing Hash Functions 514
ST3 Open Addressing 516
13.3 Templates 446
Function Templates  447
Class Templates  448 16 TREE STRUCTURES 519
ST8 Non-Type Template Parameters 450
16.1 Basic Tree Concepts 520
16.2 Binary Trees 524
14 LINKED LISTS, STACKS, AND
Binary Tree Examples   524
QUEUES 453
Balanced Trees  526
14.1 Using Linked Lists 454 A Binary Tree Implementation   527
WE1 Building a Huffman Tree 528
14.2 Implementing Linked Lists 459
The Classes for Lists, Node, and Iterators   459 16.3 Binary Search Trees 528
Implementing Iterators  460 The Binary Search Property   529
Implementing Insertion and Removal   462 Insertion  530
WE1 Implementing a Linked List Template 472 Removal  532
Efficiency of the Operations   533
14.3 The Efficiency of List, Array, and Vector
Operations 472 16.4 Tree Traversal 538
Inorder Traversal  539
14.4 Stacks and Queues 476
Preorder and Postorder Traversals   540
14.5 Implementing Stacks and Queues 479 The Visitor Pattern   541
Stacks as Linked Lists   479 Depth-First and Breadth-First Search   542
Stacks as Arrays   482 Tree Iterators  543
Queues as Linked Lists   482 16.5 Red-Black Trees 544
Queues as Circular Arrays   483
Basic Properties of Red-Black Trees   544
14.6 Stack and Queue Applications 484 Insertion  546
Balancing Parentheses  484 Removal  548
Evaluating Reverse Polish Expressions   485 WE2 Implementing a Red-Black Tree 551
Evaluating Algebraic Expressions   487
Backtracking  490
ST1 Reverse Polish Notation 492
Contents xxiii

17 PRIORITY QUEUES AND ALPHABETICAL LIST OF SYNTAX BOXES


HEAPS 553 Assignment  30

17.1 Priority Queues 554 C++ Program  12


Class Definition   295
WE1 Simulating a Queue of Waiting
Class Template  449
Customers 557
Comparisons  67
17.2 Heaps 557 Constructor with Base-Class Initializer   342
Copy Constructor  440
17.3 The Heapsort Algorithm 567
Defining an Array   181
Appendix A RESERVED WORD SUMMARY   A-1 Defining a Structure   251
Defining a Vector   213
Appendix B OPERATOR SUMMARY  A-3
Derived-Class Definition  340
Appendix C CHARACTER CODES  A-5 Destructor Definition  433
Appendix D C++ LIBRARY SUMMARY   A-8 Dynamic Memory Allocation   240

Appendix E C++ LANGUAGE CODING for Statement  106


Function Definition  145
GUIDELINES  A-12
Function Template  448
Appendix F NUMBER SYSTEMS AND BIT AND SHIFT
if Statement  61
OPERATIONS  A-19
Input Statement  44
Member Function Definition   301
GLOSSARY  G-1
Output Statement  13
INDEX  I-1 Overloaded Assignment Operator  437
CREDITS  C-1 Overloaded Operator Definition  424
QUICK REFERENCE   C-2 Pointer Syntax  226
Two-Dimensional Array Definition   207
Variable Definition  27
while Statement  97
Working with File Streams   262
Another Random Document on
Scribd Without Any Related Topics
saving the fact that some might have affirmed she was a trifle too much
inclined to embonpoint, and was indeed a bouncer in person as well as in
name. Especially, too, as Miss Fanny Bouncer was both good-humoured and
clever, and, besides being mistress of the usual young-lady accomplishments,
was a clever proficient in the fascinating art of photography, and had brought
her camera and chemicals, and had not only calotyped Mr. Verdant Green,
but had made no end of duplicates of him, in a manner that was suggestive
of the deepest admiration and affection. But these sort of likings are not
made to rule, and Mr. Verdant Green could see Miss Fanny Bouncer approach
without betraying any of those symptoms of excitement, under the influence
of which we had the privilege to see him, as he gazed from the window of
his paternal mansion, and then, on beholding the approaching form of Miss
Patty Honeywood, rush wildly to the vestibule.
The party had no occasion to ring, for the hall door was already opened for
them, and Mr. Verdant Green was soon exchanging a delightful pressure of
the hand with the blooming Patty.
"We were such a formidable party," said that young lady, as she laughed
merrily, and thereby disclosed to the enraptured gazer a remarkably even set
of white teeth ("All her own, too!" as little Mr. Bouncer afterwards remarked
to the enraptured gazer); "we were such a formidable party," said Miss Patty,
"that papa and mamma declared they would stay behind at the Rectory, and
would not join in such a visitation."
Mr. Verdant Green replies, "Oh dear! I am very sorry," and looks remarkably
delighted—though it certainly may not be at the absence of the respected
couple; and he then proclaims that everything is ready, and that Miss
Bouncer and his sisters had found out some capital words.
"What a mysterious communication, Verdant!" remarks the rector, as they
pass into the house. But the rector is only to be let so far into the secret as
to be informed that, at the evening party which is to be held at the Manor
Green that night, a charade or two will be acted, in order to diversify the
amusements. The Misses Honeywood are great adepts in this sort of
pastime; so, also, are Miss Bouncer and her brother. For although the latter
does not shine as a mimic, yet, as he is never deserted by his accustomed
coolness, he has plenty of the nonchalance and readiness which is a requisite
for charade acting. The Miss Honeywoods and Mr. Bouncer have therefore
suggested to Mr. Verdant Green and his sisters, that to get up a little
amateur performance would be "great fun;" and the suggestion has met with
a warm approval.
The drawing-room at the Manor Green opened by large folding-doors to the
library; so (as Mr. Bouncer observed to our hero), "there you've got your
stage and your drop-scene as right as a trivet; and, if you stick a lot of
candles and lights on each side of the doors in the library, there you'll have a
regular flare-up that'll show off your venerable giglamps no end."
So charades were determined on; and, when words had been hunted up, a
council of war was called. But, as the ladies and gentlemen hold their council
with closed doors, we cannot intrude upon them. We must therefore wait till
the evening, when the result of their deliberations will be publicly
manifested.
CHAPTER IX.
MR. VERDANT GREEN MAKES HIS FIRST
APPEARANCE ON ANY BOARDS.
It is the last night of December. The old year, worn out and spent with age,
lies a dying, wrapped in sheets of snow.
A stern stillness reigns around. The steps
of men are muffled; no echoing footfalls
disturb the solemn nature of the time.
The little runnels weep icy tears. The
dark pines hang out their funereal
plumes, and nod with their weight of
snow. The elms have thrown off their
green robes of joy, and, standing up in
gaunt nakedness, wildly toss to heaven
their imploring arms. The old year lies a
dying.
Silently through the snow steal certain
carriages to the portals of the Manor
Green: and, with a ringing of bells and a
banging of steps, the occupants
disappear in a stream of light that issues
from the hall door. Mr. Green's small
sanctum to the right of the hall has been
converted into a cloak-room, and is fitted
up with a ladies'-maid and a looking-glass, in a manner not to be
remembered by the oldest inhabitant.
There the finishing stroke of ravishment is given to the toilette disarranged
by a long drive through the impeding snow. There Miss Parkington (whose
papa has lately revived his old school friendship with Mr. Green) discovers, to
her unspeakable disgust, that the ten mile drive through the cold has
invested her cheek with purple tints, and given to her retroussé (ill-natured
people call it "pug") nose a hue that mocks
The turkey's crested fringe.
There, too, Miss Waters (whose
paternities had hitherto only been on
morning-call terms with the Manor
Green people, but had brushed up
their acquaintance now that there
was a son of marriageable years and
heir to an independent fortune)
discovers to her dismay that the
joltings received during a six-mile
drive through snowed-up lanes, have
somewhat deteriorated the very full-
dress aspect of her attire, and
considerably flattened its former
balloon-like dimensions. And there,
too, Miss Brindle (whose family have
been hunted up for the occasion)
makes the alarming discovery that,
in the lurch which their hack-fly had
made at the cross roads, her brother
Alfred's patent boots had not only dragged off some yards (more or less) of
her flounces, but had also—to use her own mystical language—"torn her
skirt at the gathers!"
All, however, is put right as far as possible. A warm at the sanctum's fire
diminishes the purple in Miss Parkington's cheeks; and the maid, by some
hocus-pocus peculiar to her craft, again inflates Miss Waters into a balloon,
and stitches up Miss Brindle's flounces and "gathers." The ladies join their
respective gentlemen, who have been cooling their toes and uttering warm
anathemas in the hall; and the party sail, arm-in-arm, into the drawing-room,
and forthwith fall to lively remarks on that neutral ground of conversation,
the weather.
Mr. Verdant Green is there, dressed with elaborate magnificence; but he
continues in a state of listless apathy, and is indifferent to the "lively" rattle
of the balloon-like Miss Waters, until John the footman (who is suffering from
influenza) rouses him into animation by the magic talisman "Bister, Bissis, an'
the Biss 'Oneywoods;" when he beams through his spectacles in the most
benign and satisfied manner. The Misses Honeywood are as blooming as
usual: the cold air, instead of spoiling their good looks, has but improved
their healthy style of beauty; and
they smile, laugh, and talk in a
perfectly easy, unaffected, and
natural manner. Mr. Verdant Green at
once makes his way to Miss Patty
Honeywood's side, and, gracefully
standing beside her, coffee-cup in
hand, plunges headlong into the
depths of a tangled conversation.
Meanwhile, the drawing-room of the
Manor Green becomes filled in a way
that has not been seen for many a
long year; and the intelligent Mr.
Mole, the gardener (who has been
impressed as an odd man for the
occasion, and is served up in a
pseudo-livery to make him more
presentible), sees more "genteel"
people than have, for a long time,
been visible to his naked eye. The intelligent Mr. Mole, when he has
afterwards been restored to the bosom of Mrs. Mole and his family, confides
to his equally intelligent helpmate that, in his opinion, "Master has guv the
party to get husbands for the young ladies"—an opinion which, though
perhaps not founded on fact so far as it related to the party which was the
subject of Mr. Mole's remark, would doubtless be applicable to many similar
parties given under somewhat similar circumstances.
It is not improbable that the intelligent Mr. Mole may have based his opinion
on a circumstance—which, to a gentleman of his sagacity, must have carried
great weight—namely, that whenever in the course of the evening the hall
was made the promenade for the loungers and dancers, he perceived, firstly,
that Miss Green was invariably accompanied by Mr. Charles Larkyns;
secondly, that the Rev. Josiah Meek kept Miss Helen dallying about the wine
and lemonade tray much longer than was necessary for the mere
consumption of the cooling liquids; and thirdly, that Miss Fanny, who was a
pert, talkative Miss of sixteen, was continually to be found there with either
Mr. Henry Bouncer or Mr. Alfred Brindle dancing attendance upon her. But, be
this as it may, the intelligent Mr. Mole was impressed with the conviction that
Mr. Green had called his young friends together as to a matrimonial auction,
and that his daughters were to be put up without reserve, and knocked
down to the highest bidder.
All the party have arrived. The weather has been talked over for the last time
(for the present); a harp, violin, and a cornet-à-piston from the county town,
influenced by the spirit of gin-and-water, are heard discoursing most
eloquent music in the dining-room, which has been cleared out for the
dance. Miss Patty Honeywood, accepting the offer of Mr. Verdant Green's
arm, swims joyously out of the room; other ladies and gentlemen pair, and
follow: the ball is opened.
A polka follows the quadrille; and, while the dancers rest awhile from their
exertions, or crowd around the piano in the drawing-room to hear the
balloon-like Miss Waters play a firework piece of music, in which execution
takes the place of melody, and chromatic scales are discharged from her
fingers like showers of rockets, Mr. Verdant Green mysteriously weeds out
certain members of the party, and vanishes with them upstairs.

When Miss Waters has discharged all her fireworks, and has descended from
the throne of her music-stool, a set of Lancers is formed; and, while the
usual mistakes are being made in the figures, the dancers find a fruitful
subject of conversation in surmises that a charade is going to be acted. The
surmise proves to be correct; for when the set has been brought to an end
with that peculiar in-and-out tum-tum-tiddle-iddle-tum-tum-tum movement
which characterises the last figure of Les Lanciers, the trippers on the light
fantastic toe are requested to assemble in the drawing-room, where the
chairs and couches have been pulled up to face the folding doors that lead
into the library. Mr. Verdant Green appears; and, after announcing that the
word to be acted will be one of three syllables, and that each syllable will be
represented by itself, and that then the complete word will be given, throws
open the folding doors for
Scene I. Syllable 1.—Enter the Miss Honeywoods, dressed in fashionable
bonnets and shawls. They are shown in by a footman (Mr. Bouncer) attired in
a peculiarly ingenious and effective livery, made by pulling up the trousers to
the knee, and wearing the dress-coat inside out, so as to display the crimson
silk linings of the sleeves: the effect of Mr. Bouncer's appearance is
considerably heightened by a judicious outlay of flour sprinkled over his hair.
Mr. Bouncer (as footman) gives the ladies chairs, and inquires, "What name
shall I be pleased to say, mem?" Miss Patty answers in a languid and
fashionable voice, "The Ladies Louisa and Arabella Mountfidget." Mr. Bouncer
evaporates with a low bow, leaving the ladies to play with their parasols, and
converse. Lady Arabella (Miss Patty) then expresses a devout wish that Lady
Trotter (wife of Sir Lambkin Trotter, Bart.), in whose house they are supposed
to be, will not keep them waiting as long as she detained her aunt, Lady
Bellwether, when the poor old lady fell asleep from sheer fatigue, and was
found snoring on the sofa. Lady Louisa then falls to an inspection of the
card-tray, and reads the paste-boards of some high-sounding titles not to be
found in Debrett, and expresses wonder as to where Lady Trotter can have
picked up the Duchess of Ditchwater's card, as she (Lady Louisa) is morally
convinced that her Grace can never have condescended to have even sent in
her card by a footman. Becoming impatient at the non-appearance of Lady
Trotter, Miss Patty Honeywood then rings the bell, and, with much asperity of
manner, inquires of Mr. Bouncer (as footman) if Lady Trotter is informed that
the Ladies Louisa and Arabella Mountfidget are waiting to see her? Mr.
Bouncer replies, with a footman's bow, and a footman's hexasperation of his
h's, "Me lady is hawcer hof your ladyships' visit; but me lady is at present
hunable to happear: me lady, 'owever, has give me a message, which she
hasks me to deliver to your ladyships." "Then why don't you deliver it at
once," says Miss Patty, "and not waste the valuable time of the Ladies Louisa
and Arabella Mountfidget? What is the message?" "Me lady," replies Mr.
Bouncer, "requests me to present her compliments to your ladyships, and
begs me to hinform you that me lady is a cleaning of herself!" Amid great
laughter from the audience, the Ladies Mountfidget toss their heads and
flutter grandly out of the room, followed by the floured footman; while Mr.
Verdant Green, unseen by those in front, pushes-to the folding doors, to
show that the first syllable is performed.
Praises of the acting, and guesses at the word, agreeably fill up the time till
the next scene. The Revd Josiah Meek, who is not much used to charades,
confides to Miss Helen Green that he surmises the word to be, either "visitor"
or "impudence" but, as the only ground to this surmise rests on these two
words being words of three syllables, Miss Helen gently repels the idea, and
sagely observes "we shall see more in the next scene."
Scene II. Syllable 2.—The folding-doors open, and discover Mr. Verdant Green,
as a sick gentleman, lying on a sofa, in a dressing-gown, with pillows under
his head, and Miss Patty Honeywood in attendance upon him. A table,
covered with glasses and medicine bottles, is drawn up to the sufferer's
couch in an inviting manner. Miss Patty informs the sufferer that the time is
come for him to take his draught. The sufferer groans in a dismal manner,
and says, "Oh! is it, my dear?" She replies, "Yes! you must take it now;" and
sternly pours some sherry wine out of the medicine bottle into a cup. The
sufferer makes piteous faces, and exclaims, "It is so nasty, I can't take it, my
love!" (It is to be observed that Mr. Verdant Green, skilfully taking advantage
of the circumstance that Miss Patty Honeywood is supposed to represent the
wife of the sufferer, plentifully besprinkles his conversation with endearing
epithets.) When, after much persuasion and groaning, the sufferer has been
induced to take his medicine, his spouse announces the arrival of the doctor;
when, enter Mr. Bouncer, still floured as to his head, but wearing spectacles,
a long black coat, and a shirt-frill, and having his dress otherwise altered so
as to represent a medical man of the old school. The doctor asks what sort
of a night his patient has had, inspects his tongue with professional gravity,
feels his pulse, looks at his watch, and mysteriously shakes his head. He then
commences thrusting and poking Mr. Verdant Green in various parts of his
body,—after the manner of doctors with their victims, and farmers with their
beasts,—enquiring between each poke, "Does that hurt you?" and being
answered by a convulsive "Oh!" and a groan of agony. The doctor then
prescribes a draught to be taken every half-hour, with the pills and blister at
bed-time; and, after covering his two fellow-actors with confusion, by
observing that he leaves his patient in admirable hands, and, that in an
affection of the heart, the application of lip-salve and warm treatment will
give a decided tone to the system, and produce soothing and grateful
emotions—takes his leave; and the folding-doors are closed on the blushes
of Miss Patty Honeywood, and Mr. Verdant Green.
More applause: more agreeable conversation: more ingenious speculations.
The Revd. Josiah Meek is now of opinion that the word is either "medicine"
or "suffering." Miss Helen still sagely observes, "we shall see more in the
next scene."
Scene III. Syllable 3.—Mr. Verdant Green discovered sitting at a table
furnished with pens and ink, books, and rolls of paper. Mr. Verdant Green
wears on his head a Chelsea pensioner's cocked-hat (the "property" of the
Family,—as Mr. Footelights would have said), folded into a shovel shape; and
is supposed to accurately represent the outside of a London publisher. To him
enter Mr. Bouncer—the flour off his head—coat buttoned tightly to the
throat, no visible linen, and wearing in his face and appearance generally,
"the garb of humility." Says the publisher "Now, sir, please to state your
business, and be quick about it: I am much engaged in looking over for the
press a work of a distinguished author, which I am just about to publish."
Meekly replies the other, as he holds under his arm an immense paper
packet: "It is about a work of my own, sir, that I have now ventured to
intrude upon you. I have here, sir, a small manuscript," (producing his roll of
a book), "which I am ambitious to see given to the world through the
medium of your printing establishment." To him, the Publisher—"Already am
I inundated with manuscripts on all possible subjects, and cannot undertake
to look at any more for some time to come. What is the nature of your
manuscript?" Meekly replies the other—"The theme of my work, sir, is a
History of England before the Flood. The subject is both new and interesting.
It is to be presumed that our beloved country existed before the Flood: if so,
it must have had a history. I have therefore endeavoured to fill up what is
lacking in the annals of our land, by a record of its antediluvian state,
adapted to the meanest comprehension, and founded on the most baseless
facts. I am desirous, sir, to see myself in print. I should like my work, sir, to
appear in large letters; in very large letters, sir. Indeed, sir, it would give me
joy, if you would condescend to print it altogether in capital letters: my
magnum opus might then be called with truth, a capital work." To him, the
Publisher—"Much certainly depends on the character of the printing." Meekly
the author—"Indeed, sir, it does. A great book, sir, should be printed in great
letters. If you will permit me, I will show you the size of the letters in which I
should wish my book to be printed." Mr. Bouncer then points out in some
books on the table, the printing he most admires; and, beseeching the
Publisher to read over his manuscript, and think favourably of his History of
England before the Flood, makes his bow to Mr. Verdant Green and the
Chelsea pensioner's cocked hat.
More applause, and speculations. The Revd. Josiah Meek confident that he
has discovered the word. It must be either "publisher" or "authorship." Miss
Helen still sage.
Scene IV. The Word.—Miss Bouncer discovered with her camera, arranging
her photographic chemicals. She soliloquises. "There! now, all is ready for my
sitter." She calls the footman (Mr. Verdant Green), and says, "John, you may
show the Lady Fitz-Canute upstairs." The footman shows in Miss
Honeywood, dressed in an antiquated bonnet and mantle, waving a huge
fan. John gives her a chair, into which she drops, exclaiming, "What an
insufferable toil it is to ascend to these elevated Photographic rooms;" and
makes good use of her fan. Miss Bouncer then fixes the focus of her camera,
and begs the Lady Fitz-Canute to sit perfectly still, and to call up an
agreeable smile to her face. Miss Honeywood thereupon disposes her face in
ludicrous "wreathed smiles;" and Miss Bouncer's head disappears under the
velvet hood of the camera. "I am afraid," at length says Miss Bouncer, "I am
afraid that I shall not be able to succeed in taking a likeness of your ladyship
this morning." "And why, pray?" asks her ladyship with haughty surprise.
"Because it is a gloomy day," replies the Photographer, "and much depends
upon the rays of light." "Then procure the rays of light!" "That is more than I
can do." "Indeed! I suppose if the Lady Fitz-Canute wishes for the rays of
light, and condescends to pay for the rays of light, she can obtain the rays of
light." Miss Bouncer considers this too exigeant, and puts her sitter off by
promising to complete a most fascinating portrait of her on some more
favourable day. Lady Fitz-Canute appears to be somewhat mollified at this,
and is graciously pleased to observe, "Then I will undergo the fatigue of
ascending to these elevated Photographic-rooms at some future period. But,
mind, when I next come, that you procure the rays of light!" So she is shown
out by Mr. Verdant Green, and the folding-doors are closed amid applause,
and the audience distract themselves with guesses as to the word.
"Photograph" is a general favourite, but is found not to agree with the three
first scenes, although much ingenuity is expended in endeavouring to make
them fit the word. The Curate makes a headlong rush at the word
"Daguerreotype," and is confident that he has solved the problem, until he is
informed that it is a word of more than three syllables. Charles Larkyns has
already whispered the word to Mary Green; but they keep their discovery to
themselves. At length, the Revd. Josiah Meek, in a moment of inspiration,
hits upon the word, and proclaims it to be calotype ("Call—oh!—type;") upon
which Mr. Alfred Brindle declares to Miss Fanny Green that he had fancied it
must be that, all along, and, in fact, was just on the point of saying it: and
the actors, coming in in a body, receive the violet-crowns and laurel-wreaths
of praise as the meed of their exertions. Perhaps, the Miss Honeywoods and
Mr. Bouncer receive larger crowns than the others, but Mr. Verdant Green
gets his due share, and is fully satisfied with his first appearance on "the
boards."
Dancing then succeeds, varied by songs from the young ladies, and
discharges of chromatic fireworks from the fingers of Miss Waters, for whom
Charles Larkyns does the polite, in turning over the leaves of her music.
Then some carol-singers come to the Hall-door, and the bells of the church
proclaim, in joyful peals, the birth of the New Year;—a new year of hopes,
and joys, and cares, and griefs, and unions, and partings;—a new year of
which, who then present shall see the end? who shall be there to welcome in
its successor? who shall be absent, laid in the secret places of the earth? Ah,
who? For, even in the midst of revelry and youth, the joy-peals of those old
church bells can strike the key-note of a wail of grief.
Another charade follows, in which new actors join. Then comes a merry
supper, in which Mr. Alfred Brindle, in order to give himself courage to appear
in the next charade, takes more champagne than is good for him; in which,
too (probably, from similar champagney reasons), Miss Parkington's
unfortunately self-willed nose again assumes a more roseate hue than is
becoming to a maiden; in which, too, Mr. Verdant Green being called upon to
return thanks for "the ladies"—(toast, proposed in eloquent terms by H.
Bouncer, Esq., and drunk "with the usual honours,")—is so alarmed at finding
himself upon his legs, that his ideas altogether vanish, and in great confusion
of utterance, he observes,—"I—I—ladies and gentlemen—feel—I—I—a—feel
—assure you—grattered and flattified—I mean, flattered and gratified—being
called on—return thanks—I—I—a—the ladies—give a larm to chife—I mean,
charm to life—(applause)—and—a—a—grace by their table this presence,—I
mean—a—a—(applause),—and joytened our eye—I mean, heighted our joy,
to-night—(applause),—in their name—thanks—honour." Mr. Verdant Green
takes advantage of the applause which follows these incoherent remarks,
and sits down, covered with confusion, but thankful that the struggle is over.
More dancing follows. Our hero performs prodigies in the valse à deux
temps, and twirls about until he has not a leg left to stand upon. The harp,
the violin, and the cornet-à-piston, from the county-town, play mechanically
in their sleep, and can only be roused by repeated applications of gin-and-
water. Carriages are ordered round: wraps are in requisition: the mysterious
rites under the white-berried bush are stealthily repeated for the last time:
the guests depart, as it were, in a heap; the Rectory party being the last to
leave. The intelligent Mr. Mole, who has fuddled himself by an injudicious
mixture of the half-glasses of wine left on the supper-table, is exasperated
with the butler for not allowing him to assist in putting away the silver; and
declares that he (the butler) is "a hold himage," for which, he (the intelligent
Mr. M.), "don't care a button!" and, as the epithet "image" appears to
wondrously offend the butler, Mr. Mole is removed from further consequences
by his intelligent wife, who is waiting to conduct her lord and master home.
At length, the last light is out in the Manor-Green. Mr. Verdant Green is lying
uncomfortably upon his back, and is waltzing through Dreamland with the
blooming Patty Honeywood.
CHAPTER X.
MR. VERDANT GREEN ENJOYS A REAL CIGAR.
The Christmas vacation passed rapidly away; the Honeywood family returned
to the far north; and, once more, Mr. Verdant Green found himself within the
walls of Brazenface. He and Mr. Bouncer had together gone up to Oxford,
leaving Charles Larkyns behind to keep a grace-term.
Charles Larkyns had determined to take a good degree. For some time past,
he had been reading steadily; and, though only a few hours in each day may
be given to books—yet, when that is done, with regularity and painstaking, a
real and sensible progress is made. He knew that he had good abilities, and
he had determined not to let them remain idle any longer, but to make that
use of them for which they were given to him. His examination would come
on during the next term; and he hoped to turn the interval to good account,
and be able in the end to take a respectable degree. He was destined for the
Bar; and, as he had no wish to be a briefless Barrister, he knew that college
honours would be of great advantage to him in his after career. He, at once,
therefore, set bodily to work to read up his subjects; while his father assisted
him in his labours, and Mary Green smiled a kind approval.
Meanwhile, his friends, Mr. Verdant Green and Mr. Henry Bouncer, were
enjoying Oxford life, and disporting themselves among the crowd of skaters
in the Christ Church meadows. And a very different scene did the meadows
present to the time when they had last skimmed over its surface. Then, the
green fields were covered with sailing-boats, out-riggers, and punts, and Mr.
Verdant Green had nearly come to an untimely end in the waters. But now
the scene was changed! Jack Frost had stepped in, and had seized the flood
in his frozen fingers, and had bound it up in an icy breast-plate.
And a capital place did the meadows make for any Undergraduate who was
either a professed skater, or whose skating education (as in the case of our
hero) had been altogether neglected. For the water was only of a moderate
depth; so that, in the event of the ice giving way, there was nothing to fear
beyond a slight and partial ducking. This was especially fortunate for Mr.
Verdant Green, who, after having experienced total submersion and a narrow
escape from drowning on that very spot, would never have been induced to
again commit himself to the surface of the deep, had he not been fully
convinced that the deep had now subsided into a shallow. With his breast
fortified by this resolution, he therefore fell a victim to the syren tongue of
Mr. Bouncer, when that gentleman observed to him with sincere feeling,
"Giglamps, old fellow! it would be a beastly shame, when there's such jolly
ice, if you did not learn to skate; especially, as I can show you the trick."
For, Mr. Bouncer was not only skilful with his hands and arms, but could also
perform feats with his feet. He could not only dance quadrilles in dress boots
in a ball-room, but he could also go through the figures on the ice in a pair
of skates. He could do the outside edge at a more acute angle than the
generality of people; he could cut figures of eight that were worthy of Cocker
himself, he could display spread-eagles that would have astonished the
Fellows of the Zoological Society. He could skim over the thinnest ice in the
most don't-care way; and, when at full speed, would stoop to pick up a
stone. He would take a hop-skip-and-a-jump; and would vault over walking-
sticks, as easily as if he were on dry land,—an accomplishment which he had
learnt of the Count Doembrownski, a Russian gentleman, who, in his own
country, lived chiefly on skates, and, in this country, on pigeons, and whose
short residence in Oxford was suddenly brought to a full stop by the arbitrary
power of the Vice-Chancellor. So, Mr. Verdant Green was persuaded to
purchase, and put on a pair of skates, and to make his first appearance as a
skater in the Christ Church meadows, under the auspices of Mr. Bouncer.
The sensation of first finding yourself in a pair
of skates is peculiar. It is not unlike the
sensation which must have been felt by the
young bear, when he was dropped from his
mamma's mouth, and, for the first time, told to
walk. The poor little bear felt, that it was all
very well to say "walk,"—but how was he to do
it? Was he to walk with his right fore-leg only?
or, with his left fore-leg? or, with both his fore-
legs? or, was he to walk with his right hind-leg?
or, with his left hind-leg? or, with both his hind-
legs? or, was he to make a combination of hind
and fore-legs, and walk with all four at once? or,
what was he to do? So he tried each of these
ways; and they all failed. Poor little bear!
Mr. Verdant Green felt very much in the little bear's condition. He was
undecided whether to skate with his right leg, or with his left leg, or with
both his legs. He tried his right leg, and immediately it glided off at right
angles with his body, while his left leg performed a similar and spontaneous
movement in the contrary direction. Having captured his left leg, he put it
cautiously forwards, and immediately it twisted under him, while his right leg
amused itself by describing an altogether unnecessary circle. Obtaining a
brief mastery over both legs, he put them forwards at the same moment,
and they fled from beneath him, and he was flung—bump!—on his back.
Poor little bear!
But, if it is hard to make a start in a pair of skates when you are in a
perpendicular position, how much is the difficulty increased when your
position has become a horizontal one! You raise yourself on your knees,—you
assist yourself with your hands,—and, no sooner have you got one leg right,
than away slides the other, and down you go. It is like the movement in that
scene with the pair of short stilts, in which the French clowns are so
amusing, and it is almost as difficult to perform. Mr. Verdant Green soon
found that though he might be ambitious to excel in the polite
accomplishment of skating, yet that his ambition was destined to meet with
many a fall. But he persevered, and perseverance will achieve wonders,
especially when aided by the tuition of such an indefatigable gentleman as
Mr. Bouncer.

"You get on stunningly, Giglamps," said the little gentleman, "and hav'nt
been on your beam ends more than once a minute. But I should advise you,
old fellow, to get your sit-upons seated with wash-leather,—just like the
eleventh hussars do with their cherry-coloured pants. It'll come cheaper in
the end, and may be productive of comfort. And now, after all these exciting
ups and downs, let us go and have a quiet hand at billiards." So the two
friends strolled up the High, where they saw two Queensmen "confessing
their shame," as Mr. Bouncer phrased it, by standing under the gateway of
their college; and went on to Bickerton's, where they found all the tables
occupied, and Jonathan playing a match with Mr. Fluke of Christchurch. So,
after watching the celebrated marker long enough to inspire them with a
desire to accomplish similar feats of dexterity, they continued their walk to
Broad Street, and, turning up a yard opposite to the Clarendon, found that
Betteris had an upstair room at liberty. Here they accomplished several
pleasing mathematical problems with the balls, and contributed their
modicum towards the smoking of the ceiling of the room.
Since Mr. Verdant Green had acquired the art of getting through a cigar
without making himself ill, he had looked upon himself as a genuine smoker;
and had, from time to time, bragged of his powers as regarded the
fumigation of "the herb Nicotiana, commonly called tobacco," (as the Oxford
statute tersely says). This was an amiable weakness on his part that had not
escaped the observant eye of Mr. Bouncer, who had frequently taken
occasion, in the presence of his friends, to defer to Mr. Verdant Green's
judgment in the matter of cigars. The train of adulation being thus laid, an
opportunity was only needed to fire it. It soon came.
"Once upon a time," as the story-books say, it chanced that Mr. Bouncer was
consuming his minutes and cigars at his tobacconist's, when his eye lighted
for the thousandth time on the roll of cabbage-leaves, brown paper, and
refuse tobacco, which being done up into the form of a monster cigar (a foot
long, and of proportionate thickness), was hung in the shop-window, and did
duty as a truthful token of the commodity vended within. Mr. Bouncer had
looked at this implement nine hundred and ninety nine times, without its
suggesting anything else to his mind, than its being of the same class of art
as the monster mis-representations outside wild-beast shows; but he now
gazed upon it with new sensations. In short, Mr. Bouncer took such a fancy
to the thing, that he purchased it, and took it off to his rooms,—though he
did not mention this fact to his friend, Mr. Verdant Green, when he saw him
soon afterwards, and spoke to him of his excellent judgment in tobacco.
"A taste for smoke comes natural, Giglamps!" said Mr. Bouncer. "It's what
you call a nascitur non fit; and, if you haven't the gift, why you can't
purchase it. Now, you're a judge of smoke; it's a gift with you, don't you see;
and you could no more help knowing a good weed from a bad one, than you
could help waggling your tail if you were a baa-lamb."
Mr. Verdant Green bowed, and blushed, in acknowledgment of this delightful
flattery.
"Now, there's old Footelights, you know; he's got an uncle, who's a governor,
or some great swell, out in Barbadoes. Well, every now and then the old
trump sends Footelights no end of a box of weeds; not common ones, you
understand, but regular tip-toppers; but they're quite thrown away on poor
Footelights, who'd think as much of cabbage-leaves as he would of real
Havannahs, so he's always obliged to ask somebody else's opinion about
them. Well, he's got a sample of a weed of a most terrific kind:—Magnifico
Pomposo is the name;—no end uncommon, and at least a foot long. We
don't meet with 'em in England because they're too expensive to import.
Well, it would'nt do to throw away such a weed as this on any one; so,
Footelights wants to have the opinion of a man who's really a judge of what
a good weed is. I refused, because my taste has been rather out of order
lately; and Billy Blades is in training for Henley, so he's obliged to decline; so
I told him of you, Giglamps, and said, that if there was a man in Brazenface
that could tell him what his Magnifico Pomposo was worth, that man was
Verdant Green. Don't blush, old feller! you can't help having a fine judgment,
you know; so don't be ashamed of it. Now, you must wine with me this
evening; Footelights and some more men are coming; and we're all anxious
to hear your opinion about these new weeds, because, if it's favourable we
can club together, and import a box." Mr. Bouncer's victim, being perfectly
unconscious of the trap laid for him, promised to come to the wine, and give
his opinion on this weed of fabled size and merit.
When the evening and company had
come, he was rather staggered at
beholding the dimensions of the pseudo-
cigar; but, rashly judging that to express
surprise would be to betray ignorance,
Mr. Verdant Green inspected the
formidable monster with the air of a
connoisseur, and smelt, pinched, and
rolled his tongue round it, after the
manner of the best critics. If this was a
diverting spectacle to the assembled
guests of Mr. Bouncer, how must the
humour of the scene have been
increased, when our hero, with great
difficulty, lighted the cigar, and, with still greater difficulty, held it in his
mouth, and endeavoured to smoke it! As Mr. Foote afterwards observed, "it
was a situation for a screaming farce."
"It doesn't draw well!" faltered the victim, as the bundle of rubbish went out
for the fourth time.
"Why, that's always the case with the Barbadoes baccy!" said Mr. Bouncer; "it
takes a long pull, and a strong pull, and a pull all together to get it to make a
start; but when once it does go, it goes beautiful—like a house a-fire. But
you can't expect it to be like a common threepenny weed. Here! let me light
him for you, Giglamps; I'll give the beggar a dig in his ribs, as a gentle
persuader." Mr. Bouncer thereupon poked his pen-knife through the rubbish,
and after a time induced it to "draw;" and Mr. Verdant Green pulled at it
furiously, and made his eyes water with the unusual cloud of smoke that he
raised.
"And now, what d'ye think of it, my beauty?" inquired Mr. Bouncer. "It's
something out of the common, ain't it?"
"It has a beautiful ash!" observed Mr. Smalls.
"And diffuses an aroma that makes me long to defy the trainer, and smoke
one like it!" said Mr. Blades.
"So pray give me your reading—at least, your opinion,—on my Magnifico
Pomposo!" asked Mr. Foote.
"Well," answered Mr. Verdant Green, slowly—turning very pale as he spoke,
—"at first, I thought it was be-yew-tiful; but, altogether, I think—that—the
Barbadoes tobacco—doesn't quite—agree with—my stom—" the speaker
abruptly concluded by dropping the cigar, putting his handkerchief to his
mouth, and rushing into Mr. Bouncer's bedroom. The Magnifico Pomposo had
been too much for him, and had produced sensations accurately interpreted
by Mr. Bouncer, who forthwith represented in expressive pantomine, the
actions of a distressed voyager, when he feebly murmurs "Steward!"

To atone for the "chaffing" which he had been the means of inflicting on his
friend, the little gentleman, a few days afterwards, proposed to take our hero
to the Chipping Norton Steeple-chase,—Mr. Smalls and Mr. Fosbrooke making
up the quartet for a tandem. It was on their return from the races, that, after
having stopped at The Bear at Woodstock, "to wash out the horses' mouths,"
and having done this so effectually that the horses had appeared to have no
mouths left, and had refused to answer the reins, and had smashed the cart
against a house, which had seemed to have danced into the middle of the
road for their diversion,—and, after having put back to The Bear, and
prevailed upon that animal to lend them a non-descript vehicle of the "pre-
adamite buggy" species, described by Sidney Smith,—that, much time having
been consumed by the progress of this chapter of accidents, they did not
reach Peyman's Gate until a late hour; and Mr. Verdant Green found that he
was once more in difficulties. For they had no sooner got through the gate,
than the wild octaves from Mr. Bouncer's post-horn were suddenly brought to
a full stop, and Mr. Fosbrooke, who was the "waggoner," was brought to
Woh! and was compelled to pull up in obedience to the command of the
proctor, who, as on a previous occasion, suddenly appeared from behind the
toll-house, in company with his marshall and bull-dogs.
The Sentence pronounced on our hero the next day, was, "Sir!—You will
translate all your lectures; have your name crossed on the buttery and
kitchen books; and be confined to chapel, hall, and college."
This sentence was chiefly annoying, inasmuch as it somewhat interfered with
the duties and pleasures attendant upon his boating practice. For, wonderful
to relate, Mr. Verdant Green had so much improved in the science, that he
was now "Number 3" of his college "Torpid," and was in hard training. The
Torpid races commenced on March 10th, and were continued on the
following days. Our hero sent his father a copy of "Tintinnabulum's Life,"
which—after informing the Manor Green family that "the boats took up
positions in the following order: Brazenose, Exeter 1, Wadham, Balliol, St.
John's, Pembroke, University, Oriel, Brazenface, Christ Church 1, Worcester,
Jesus, Queen's, Christ Church 2, Exeter 2"—proceeded to enter into
particulars of each day's sport, of which it is only necessary to record such as
gave interest to our hero's family.
"First day. * * * Brazenface refused to acknowledge the bump by Christ
Church (1) before they came to the Cherwell. There is very little doubt but
that they were bumped at the Gut and the Willows. * * *
"Second day. * * * Brazenface rowed pluckily away from Worcester. * * *
"Third day. * * * A splendid race between Brazenface and Worcester; and, at
the flag, the latter were within a foot; they did not, however, succeed in
bumping. The cheering from the Brazenface barge was vociferous. * * *
"Fourth day. * * * Worcester was more fortunate, and succeeded in making
the bump at the Cherwell, in consequence of No. 3 of the Brazenface boat
fainting from fatigue."
Under "No. 3" Mr. Verdant Green had drawn a pencil line, and had written
"V. G." He shortly after related to his family the gloomy particulars of the
bump, when he returned home for the Easter vacation.
CHAPTER XI.
MR. VERDANT GREEN GETS THROUGH HIS SMALLS.
Despite the hindrance which the grande passion is supposed to bring to the
student, Charles Larkyns had made very good use of the opportunities
afforded him by the leisure of his grace-term. Indeed, as he himself
observed,
"Who hath not owned, with
rapture-smitten frame,
The power of grace?"
And as he felt that the hours of his grace-term had not been wasted in
idleness, but had been turned to profitable account, it is not at all unlikely
that his pleasures of hope regarding his Degree-examination, and the
position his name would occupy in the Class-list, were of a roseate hue. He
therefore, when the Easter vacation had come to an end, returned to Oxford
in high spirits, with our hero and his friend Mr. Bouncer, who, after a brief
visit to "the Mum," had passed the remainder of the vacation at the Manor
Green. During these few holiday weeks, Charles Larkyns had acted as private
tutor to his two friends, and had, in the language of Mr. Bouncer, "put them
through their paces uncommon;" for the little gentleman was going in for his
Degree, alias Great-go, alias Greats; and our hero for his first examination in
literis humanioribus, alias Responsions, alias Little-go, alias Smalls. Thus the
friends returned to Oxford mutually benefited; but, as the time for
examination drew nearer and still nearer, the fears of Mr. Bouncer rose in a
gradation of terrors, that threatened to culminate in an actual panic.
"You see," said the little gentleman, "the Mum's set her heart on my getting
through, and I must read like the doose. And I havn't got the head, you see,
for Latin and Greek; and that beastly Euclid altogether stumps me; and I feel
as though I should come to grief. I'm blowed," the little gentleman would cry,
earnestly and sadly, "I'm blow'd if I don't think they must have given me too
much pap when I was a babby, and softened my brains! or else, why can't I
walk into these classical parties just as easy as you, Charley, or old Giglamps
there? But I can't, you see: my brains are addled. They say it ain't a bad
thing for reading to get your head shaved. It cools your brains, and gives full
play to what you call your intellectual faculties. I think I shall try the dodge,
and get a gent's real head of hair, till after the exam.; and then, when I've
stumped the examiners, I can wear my own luxuriant locks again."

And, as Mr. Bouncer professed, so did he; and, not many days after,
astonished his friends and the University generally by appearing in a wig of
curly black hair. It was a pleasing sight to see the little gentleman with a
scalp like a billiard ball, a pipe in his mouth, and the wig mounted on a block,
with books spread before him, endeavouring to persuade himself that he was
working up his subjects. It was still more pleasing to view him, in moments
of hilarity, divest himself of his wig, and hurl it at the scout, or any other
offensive object that appeared before him. And it was a sight not to be
forgotten by the beholders, when, after too recklessly partaking of an
indiscriminate mixture of egg-flip, sangarce, and cider-cup, he feebly threw
his wig at the spectacles of Mr. Verdant Green, and, overbalanced by the
exertion, fell back into the coal-scuttle, where he lay, bald-headed and
helpless, laughing and weeping by turns, and caressed by Huz and Buz.
But the shaving of his head was not the only feature (or, rather, loss of
feature) that distinguished Mr. Bouncer's reading for his degree. The
gentleman with the limited knowledge of the cornet-à-piston, who had the
rooms immediately beneath those of our hero and his friend, had made such
slow progress in his musical education, that he had even now scarcely got
into his "Cottage near a Wood." This gentleman was Mr. Bouncer's
Frankenstein. He was always rising up when he was not wanted. When Mr.
Bouncer felt as if he could read, and sat down to his books, wigless and
determined, the doleful legend of the cottage near a wood was forced upon
him in an unpleasingly obtrusive and distracting manner. It was in vain that
Mr. Bouncer sounded his octaves in all their discordant variations; the
gentleman had no ear, and was not to be put out of his cottage on any
terms; Mr. Bouncer's notices of ejectment were always disregarded. He had
hoped that the ears of Mr. Slowcoach (whose rooms were in the angle of the
Quad) would have been pierced by the noise, and that he would have put a
stop to the nuisance; but, either from its being too customary a custom, or
that the ears of Mr. Slowcoach had grown callous, the nuisance was suffered
to continue unreproved.
Mr. Bouncer resolved, therefore, on some desperate method of calling
attention to one nuisance, by creating another of a louder description; and,
as his octaves appeared to fail in this,—notwithstanding the energy and
annoying ability that he threw into them,—he conceived the idea of setting
up a drum! The plan was no sooner thought of than carried out. He met with
an instrument sufficiently large and formidable for his purpose,—hired it, and
had it stealthily conveyed into college (like another Falstaff) in a linen "buck-
basket." He waited his opportunity; and, the next time that the gentleman in
the rooms beneath took his cornet to his cottage near a wood, Mr. Bouncer,
stationed on the landing above, played a thundering accompaniment on his
big drum.
The echoes from the tightened parchment rolled round the Quad, and
brought to the spot a rush of curious and excited undergraduates. Mr.
Bouncer,—after taking off his wig in honour of the air,—then treated them to
the National Anthem, arranged as a drum solo for two sticks, the chorus
being sustained by the voices of those present; when in the midst of the
entertainment, the reproachful features of Mr. Slowcoach appeared upon the
scene. Sternly the tutor demanded the reason of the strange hubbub; and
was answered by Mr. Bouncer, that, as one gentleman was allowed to play
his favourite instrument whenever he chose, for his own but no one else's
gratification, he could not see why he (Mr. Bouncer) might not also,
whenever he pleased, play for his own gratification his favourite instrument—
the big drum. This specious excuse, although logical, was not altogether
satisfactory to Mr. Slowcoach; and, with some asperity, he ordered Mr.
Bouncer never again to indulge in, what he termed (in reference probably to
the little gentleman's bald head), "such an indecent exhibition." But, as he
further ordered that the cornet-à-piston gentleman was to instrumentally
enter into his cottage near a wood, only at stated hours in the afternoon, Mr.
Welcome to Our Bookstore - The Ultimate Destination for Book Lovers
Are you passionate about testbank and eager to explore new worlds of
knowledge? At our website, we offer a vast collection of books that
cater to every interest and age group. From classic literature to
specialized publications, self-help books, and children’s stories, we
have it all! Each book is a gateway to new adventures, helping you
expand your knowledge and nourish your soul
Experience Convenient and Enjoyable Book Shopping Our website is more
than just an online bookstore—it’s a bridge connecting readers to the
timeless values of culture and wisdom. With a sleek and user-friendly
interface and a smart search system, you can find your favorite books
quickly and easily. Enjoy special promotions, fast home delivery, and
a seamless shopping experience that saves you time and enhances your
love for reading.
Let us accompany you on the journey of exploring knowledge and
personal growth!

ebooksecure.com

You might also like