Data Structures and Abstractions with Java 5th Edition (eBook PDF)instant download
Data Structures and Abstractions with Java 5th Edition (eBook PDF)instant download
https://ebooksecure.com/product/data-structures-and-abstractions-
with-java-5th-edition-ebook-pdf/
http://ebooksecure.com/product/ebook-pdf-data-structures-and-
abstractions-with-java-4th-edition/
http://ebooksecure.com/product/ebook-pdf-data-structures-and-
abstractions-with-java-4th-global-edition/
http://ebooksecure.com/product/ebook-pdf-data-structures-and-
abstractions-with-java-5th-edition-by-frank-m-carrano/
http://ebooksecure.com/product/ebook-pdf-starting-out-with-java-
from-control-structures-through-data-structures-3rd-edition/
(eBook PDF) Starting Out with Java: From Control
Structures through Data Structures 4th Edition
http://ebooksecure.com/product/ebook-pdf-starting-out-with-java-
from-control-structures-through-data-structures-4th-edition/
http://ebooksecure.com/product/ebook-pdf-java-foundations-
introduction-to-program-design-and-data-structures-5th-edition/
http://ebooksecure.com/product/ebook-pdf-data-structures-and-
other-objects-using-java-4th-edition/
http://ebooksecure.com/product/ebook-pdf-data-structures-and-
problem-solving-using-java-4th-edition/
http://ebooksecure.com/product/ebook-pdf-introduction-to-java-
programming-and-data-structures-comprehensive-version-11/
Data Structures and Abstractions
with Java™
Fifth Edition
Frank M. Carrano
Timothy M. Henry
Copyright © 2019, 2015, 2012 and 2007 Pearson Education, Inc., All
rights reserved. Printed in the United States of America. This publication is
protected by Copyright, and permission should be obtained from the
publisher prior to any prohibited reproduction, storage in a retrieval system,
or transmission in any form or by any means, electronic, mechanical,
photocopying, recording, or likewise. To obtain permission(s) to use material
from this work, please submit a written request to Pearson Education, Inc.,
Permissions Department, 221 River Street, Hoboken, NJ 07030, or you may
fax your request to 201-236-3290.
We hope that you enjoy reading this book. Like many others before you, you
can learn—or teach —data structures in an effective and sustainable way.
Warm regards,
Frank M. Carrano
Separating the relevant coverage of Java into Java Interludes, which you
can use as needed
Our use of Java Interludes to treat the pertinent aspects of Java clearly
separate our coverage of data structures from Java-specific issues. These
interludes occur between chapters throughout the book as needed. Our focus,
however, is on data structures not Java. You can see the titles of these
interludes, as well as their placement between chapters, in the table of
contents that follows.
Brief Table of Contents
Table of Contents at a Glance
The following brief table of contents shows the overall composition of the
book. Notice the Introduction, Prelude, and nine Java Interludes. Further
details—including a chapter-by-chapter description—are given later in this
preface.
Chapter 1 Bags
Chapter 9 Recursion
Chapter 10 Lists
Chapter 19 Searching
Chapter 20 Dictionaries
Chapter 24 Trees
Chapter 25 Tree Implementations
Chapter 29 Graphs
Included the appendix about Java classes within the book instead of
leaving it online.
Connect with Us
We are always available to instructors and students who use our books. Your
comments, suggestions, and corrections will be greatly appreciated. Please e-
mail us at [email protected] or [email protected]
Twitter: twitter.com/makingCSreal
Facebook: www.facebook.com/makingCSreal
A Note to Students
The topics that we cover in this book deal with the various ways of
organizing data so that a given application can access and manipulate data in
an efficient way. These topics are fundamental to your future study of
computer science, as they provide you with the foundation of knowledge
required to create complex and reliable software. Whether you are interested
in designing video games or software for robotic controlled surgery, the study
of data structures is vital to your success. Even if you do not study all of the
topics in this book now, you are likely to encounter them later. We hope that
you will enjoy reading the book, and that it will serve as a useful reference
tool for your future courses.
After looking over this preface, you should read the Introduction. There you
will quickly see what this book is about and what you need to know about
Java before you begin. The Prelude discusses class design and the use of Java
interfaces. We use interfaces throughout the book. Appendixes A, B, and C
review javadoc comments, Java classes, and inheritance. Java Interludes
occur throughout the book and cover advanced aspects of Java as they are
needed. Supplemental material is available online to review the basics of Java
and its file input and output, to define important terms, and to answer the
study questions. Note that inside the front and back covers you will find
Java’s reserved words, its primitive data types, the precedence of its
operators, and a list of Unicode characters.
Please be sure to browse the rest of this preface to see the features that will
help you in your studies.
Pedagogical Elements
Features to Enhance Learning
Each chapter begins with a table of contents, a list of prerequisite portions of
the book that you should have read, and the learning objectives for the
material to be covered. Other pedagogical elements appear throughout the
book, as follows:
A link to any misprints that have been discovered since the book was
published
Instructor Resources
The following protected material is available to instructors who adopt this
book by logging onto Pearson’s Instructor Resource Center (IRC), accessible
from pearsonhighered.com/carrano:
Instructor’s Guide
PowerPoint lecture slides that have ADA compatible descriptive text for
all images
Test bank
Please contact your Pearson sales representative for an instructor access code.
Contact information is available at pearsonhighered.com/replocator.
Student Resources
The following material is available to students by logging onto the
Companion Website accessible from pearsonhighered.com/carrano:
Instructional VideoNotes
Students must use the access card located in the front of the book to register
for and then enter the Companion Website. Students without an access code
can purchase access from the Companion Website by following the
instructions listed there.
Prelude: The Prelude discusses the design of classes. Among the topics
we cover are preconditions, postconditions, assertions, interfaces, and
the Unified Modeling language (UML). Design is an important aspect of
our presentation.
Java Interlude 3 : This Java interlude shows how the programmer can
write new exception classes. In doing so, it shows how to extend an
existing class of exceptions. It also introduces the finally block.
Chapters 10 , 11, and 12: The next three chapters introduce the ADT list.
We discuss this collection abstractly and then implement it by using an
array and a chain of linked nodes.
Java Interlude 4 and Chapter 13: Included in our coverage of Java
iterators are the standard interfaces Iterator, Iterable, and
ListIterator. Chapter 13 then shows ways to implement an iterator for
the ADT list. It considers and implements Java’s iterator interfaces
Iterator and ListIterator.
Java Interlude 5 : This interlude provides the Java concepts needed for
the sorting methods that we are about to present. It introduces the
standard interface Comparable, generic methods, bounded type
parameters, and wildcards.
Chapters 15 and 16: The next two chapters discuss various sorting
techniques and their relative complexities. We consider both iterative
and recursive versions of these algorithms.
Chapters 24 and 25: Chapter 24 discusses trees and their possible uses.
Included among the several examples of trees is an introduction to the
binary search tree and the heap. Chapter 25 considers implementations
of the binary tree and the general tree.
CLASSIFICATION
The literature of cheese-making contains reference to more than 500
names for varieties of cheese. Many of these can be thrown readily
into great groups or families in which there are variations in
unessential detail without modifying the characteristic texture and
flavor of the product. Many varietal names are attached to the
product of single factories or factory groups. Such varieties
frequently differ only slightly in size or shape, or in stage of drainage
or of ripening, from widely known varieties or other similar local
forms. The descriptions recorded for such varieties commonly
emphasize minor differences in manipulation without showing
differences in essential factors. Vessels of particular size are
prescribed to be made of wood, earthenware, or of a special metal.
These details specify the exact size and shape of hoops, the use of
particular styles of cutting or breaking instruments and of certain
stirring tools, the material and construction of mats and draining
racks.
The descriptions themselves are very commonly inadequate. The
variable factors in cheese-making are fat-content of the milk, acidity,
temperature of setting, amount of rennet, time allowed for curdling
and the method of draining the curd. The differences in practice lie,
with few exceptions, in the amount or intensity of particular factors,
not differences in kind or quality of treatment. Such contrasts are
quantitative, not qualitative. A great number of combinations is
possible by small variations of these factors.
Varieties selected as types of groups give marked contrasts in
character, but comparison of large numbers of forms shows that
almost every gradation from group to group can actually be found.
Within groups frequently the same physical results in texture and
flavor can be obtained by combinations or adjustments of factors for
the purpose of offsetting or counteracting the effects of one change
in practice by the manipulation of other factors. In ripening, an
equally large range of practices makes possible the development of
very different qualities in mature cheeses from the same lot.
Only a few of the large number of described varieties have obtained
even national importance; fewer still are known outside the country
of origin. In spite of the success of special products when properly
advertised, the largest place in the market is clearly accorded to the
standard forms which are widely known.
104. Basis of classification.—A series of these widely known
forms has been chosen as typical of groups in a system of
classification adapted from the French of Pouriau. No completely
satisfactory scheme of classifying all of these varieties has been
devised. The grouping proposed here is based on the principles of
curd-making already discussed together with consideration of the
ripening processes to be discussed with each group. The factors that
actually influence the quality of the final product are separated as
completely as possible from non-essential operative details.
The common use of the terms "soft" and "hard" cheese is based on
the single arbitrary fact of texture. The term "semi-hard" cheese
may be conveniently applied to a miscellaneous group of unrelated
families which are intermediate in texture between such soft forms
as Neufchâtel or Camembert and really hard cheeses like Cheddar or
Parmesan. Although these terms are not made the main basis of the
proposed grouping, their application to sections is indicated.
Classification based on the essential facts of manufacture is,
however, really helpful.
Analytical
Tabulation
of Groups
Section I. Cheeses with sour milk flavor only (Eaten fresh).
(Soft cheeses 45 to 75% water) Page
1. Curdled by souring, Cottage cheese and its allies in
America, many related varieties in Europe 90
2. Curdled by souring and rennet—the Neufchâtel group 95
a. Skim—Skim-milk Neufchâtel 105
b. Part skim to whole milk—American or Domestic
Neufchâtel 106
c. With fat added—the cream cheeses of the
Neufchâtel group (both American and European)
—such as Cream, Gervais, Malakoffs, etc. 108
Section II. Cheeses ripened.
Subsection A. Soft cheeses (40 to 50% water).
1. Curdled by souring, heated, then ripened.
Hand cheese, Pennsylvania pot cheese, Harz, etc. 112
2. Curdled by souring, and rennet, ripened.
Ripened (French) Neufchâtel 114
3. Curdled primarily by rennet.
a. Ripened by mold—Camambert, Brie and their
allies. 117
b. Ripened by bacteria.
* Made from soft or friable curd
—d'Isigny, Liederkranz, etc. 134
** Made from firm or tough curd
—Limburger and allies. 139
Subsection B. Semi-hard cheeses, firm, well-drained.
(38 to 45% water)
a. Curd not cooked, ripened by molds.
* Made from friable curd—Roquefort 150
** Made from firm or tough curd—Gorgonzola,
Stilton and such French forms as Gex,
Septmoncel 158
b. Curd cooked and ripened by bacteria,—brick,
Munster, Port du Salut (Oka) 164
Subsection C. Hard cheeses, cooked and pressed (30
to 40% water)
a. Ripened without gas holes. 164
1. Dutch—Edam, Gouda. 173
2. Danish. 173
3. The Cheddar group.
* English—Cheddar and numerous related
forms known principally in Great Britain 184
** American—the factory Cheddar of related
forms United States and Canada 173
b. Ripened with the development of gas holes. 164
* Holes large—Swiss-Emmenthal Gruyère,
American Swiss. 173
** Holes small—Parmesan and related varieties. 173
TABLE III
Cheese: Soft,
Cottage 70 trace a few days Bacteria
Skim Neufchâtel 70 trace a few days Bacteria
Neufchâtel 50-60 12-28 a few days Bacteria
Camembert 50 22-30 3-5 weeks Molds
Cream cheese 40-50 35-45 a few days Primarily
bacteria
Semi-hard:
Limburger 40-45 24-30 3-6 months Bacteria
Roquefort 38-40 31-34 3-6 months Mold
Brick 37-42 31-35 3-6 months Bacteria
Hard:
Cheddar 30-39 32-36 6-12 Bacteria
months
Swiss 31-34 28-31 9-18 Bacteria
months and yeasts
Parmesan 30-33 2-3 years Bacteria
The soft cheeses are quickly perishable products. Bacteria and molds
find favorable conditions for growth in products with 45 to 75 per
cent of water. If such growth is permitted, enzymic activities follow
quickly with resultant changes in appearance, texture, odor and
taste. Refrigeration is necessary to transport such cheeses to the
consumer, if properly ripened. Trade in these forms may continue
throughout the year in cool climates and in places where adequate
refrigeration is available. Practically, however, outside the large cities
this trade in America is at present limited to the cold months; inside
the large cities much reduced quantities of these cheeses continue
to be handled through the year.
In the stricter sense, the soft group of cheeses falls naturally into
two series: (1) the varieties eaten fresh; and (2) the ripened soft
cheeses. Those eaten fresh have a making process which commonly
involves the development of a lactic acid flavor by souring, but no
ripening is contemplated after the product leaves the maker's hands.
In the ripened series, after the making process is completed, the
essential flavors and textures are developed by the activity of micro-
organisms during ripening periods varying in length but fairly well-
defined for each variety.
In contrast to the soft cheeses, the hard kinds are low in water-
content, ripen more slowly and may be kept through much longer
periods. They retain their form through a wider range of climatic
conditions. They develop flavor slowly and correspondingly
deteriorate much more slowly. Such cheeses are in marketable
condition over longer periods. In their manufacture the cooking of
the curd takes a prominent place.
109. Relation of heat to classes.—The close relation between the
heat applied and the product sought forms the basis of a striking
series of graphs (Fig. 12, page 78). These show the changes hour by
hour in the heat relation during the making process of a series of
widely known forms, each of which is chosen as typical. In some of
these forms, heat is applied but once to bring the milk to the
renneting temperature typical for the variety. Subsequent
manipulations are accompanied by a steady fall in temperature. In
other forms, the curd when solid is specially heated or "cooked" to
bring about the changes characteristic of the variety. These contrasts
are clearly brought out by the graphs which represent practices well
recognized for the varieties. The detailed process for these groups is
considered in succeeding chapters.
CHAPTER VII
In working with the hand molding tube (Fig. 15) the same care is
required. Chilled curd is forced into a firm smooth mass with the
plunger. It is removed and wrapped when it reaches the regular size
of the variety.
All forms when molded go directly into the boxes and then back to
the refrigerators until demanded for actual use. The details of the
process differ according to the form made.
131. Skimmed-milk Neufchâtel.—Separator skimmed-milk is
frequently made into curd by the Neufchâtel process. The absence of
fat eliminates the largest element of loss in manufacture. Each stage
of the making process, therefore, may be shortened. The demand
that the curd shall be smooth and buttery in texture rather than
rough or gritty requires the exercise of care in curdling of milk. The
draining and pressing of the curd may be accomplished much more
rapidly than in the fatty cheeses. The final product should differ from
cottage cheese in smoother texture, milder acidity and, as a rule,
cleaner flavor. In composition, the absence of fat must be largely
compensated by leaving more water in the cheese. Such a product
reaches the market with 65 to 75 per cent of water and perhaps
1.25 per cent of salt. Casein forms 20 to 30 per cent of the mass.
These cheeses are very perishable on account of their high water-
content. The destructive effect of microorganisms both in the interior
of the cheese and upon its surface is rapid.
Cheeses of this description may be found in the trade as cottage
cheese, Neufchâtel style, and as Neufchâtel made from skimmed-
milk; skimmed-milk Neufchâtel would be a strictly proper labeling.
132. Baker's cheese.—There is considerable market for skimmed-
milk curd as Baker's cheese. This product is essentially skimmed-milk
Neufchâtel curd, partially drained and sold in bulk. When the bakery
is near by, the curd is frequently shoveled into milk-cans in very wet
condition and sent directly from the factory to the bakery. If the
distance is such as to require considerable time for transportation,
the same care is frequently given as for Neufchâtel curd packed in
bulk for storage and transportation.
Great variations in practice are found among the makers of this type
of product. In some cases low grade skimmed-milk is handled on a
large scale. Curdling is done quickly and little care is given to the
details of flavor and texture in the curd. Working in this manner, two
men are able to make a ton of such curd, and ship it out in milk-cans
each day. The resulting product, although very deficient in flavor and
texture, goes into manufactured specialties which conceal its
deficiencies if considered as cheese.
133. Domestic Neufchâtel.—The name Neufchâtel, unless limited
clearly by the label, should designate a cheese made from fresh
whole milk. Cheeses of this group are produced in a small number of
well-equipped factories scattered widely through the dairy states of
the North and Northeast. Every factory uses one or more trade
names for its product. The same product is frequently relabeled by
the distributor who uses his own trade name instead of that of the
maker.
The usual form of package is cylindrical, about 1¾ inches in
diameter and 2½ inches long, or sometimes rectangular 2½ by 1½
by 1½ inches. The cheese is protected by wrapping in parchment
paper closely surrounded by tin-foil. These packages vary from 2½
to 4 ounces. In some cases screw-topped glass jars are substituted
for the tin-foil package. They are objectionable, first, because of cost
and, second, because they are so commonly associated with less
perishable products as to mislead either dealer or consumer into
holding the product for too long a time. The paper or tin-foil
package can be kept only at refrigerator temperature, hence
automatically keeps its possessor reminded of the perishable nature
of its contents.
Neufchâtel of the best quality made from whole milk testing about 4
per cent fat may be expected to fall within the following limits;40
many grades contain more water than this at the expense of flavor
and keeping quality:
Water 50-55 per cent
Fat 23-28 per cent
Casein 18-21 per cent
Salt 0.5-1.25 per cent
ebooksecure.com