Introduction to Programming with Java: A Problem Solving Approach 3rd Edition John Dean instant download
Introduction to Programming with Java: A Problem Solving Approach 3rd Edition John Dean instant download
https://ebookmeta.com/product/introduction-to-programming-with-
java-a-problem-solving-approach-3rd-edition-john-dean/
https://ebookmeta.com/product/java-an-introduction-to-problem-
solving-and-programming-7th-edition-walter-savith/
https://ebookmeta.com/product/a-practical-introduction-to-
programming-and-problem-solving-solutions-manual-stormy-attaway/
https://ebookmeta.com/product/python-programming-using-problem-
solving-approach-reema-thareja/
https://ebookmeta.com/product/the-rooster-house-my-ukrainian-
family-story-1st-edition-victoria-belim/
Twice Cursed Ancient Blood 3 1st Edition Rain
Carrington
https://ebookmeta.com/product/twice-cursed-ancient-blood-3-1st-
edition-rain-carrington/
Rise of the School for Good and Evil (The School for
Good and Evil 0) 1st Edition Soman Chainani
https://ebookmeta.com/product/rise-of-the-school-for-good-and-
evil-the-school-for-good-and-evil-0-1st-edition-soman-chainani-2/
https://ebookmeta.com/product/occlusal-splints-for-painful-
craniomandibular-dysfunction-1st-edition-hans-j-schindler/
https://ebookmeta.com/product/the-sailor-s-sin-bin-cruisers-
confess-to-their-boating-blunders-1st-edition-theo-stocker/
https://ebookmeta.com/product/eyes-of-the-void-final-
architecture-2-1st-edition-adrian-tchaikovsky-2/
Prototype of a Biomimetic Multi spiked Connecting
Scaffold for a New Generation of Resurfacing
Endoprostheses 1st Edition Ryszard Uklejewski
https://ebookmeta.com/product/prototype-of-a-biomimetic-multi-
spiked-connecting-scaffold-for-a-new-generation-of-resurfacing-
endoprostheses-1st-edition-ryszard-uklejewski/
Page i
John Dean
Park University
Raymond Dean
University of Kansas
Page ii
1 2 3 4 5 6 7 8 9 LCR 24 23 22 21 20
ISBN 978-1-26057524-8
MHID 1-260-57524-1
The Internet addresses listed in the text were accurate at the time
of publication. The inclusion of a website does not indicate an
endorsement by the authors or McGraw Hill LLC, and McGraw Hill
LLC does not guarantee the accuracy of the information presented at
these sites.
mheducation.com/highered
𝒟edication Page iii
—To Stan and Kate
Page iv
Contents
Preface x
Project Summary xxiv
CHAPTER 1
CHAPTER 2
CHAPTER 3
Java Basics 65
3.1 Introduction 66
3.2 “I Have a Dream” Program 66
3.3 Comments and Readability 67
3.4 The Class Heading 69
3.5 The main Method’s Heading 69
3.6 Braces 70
3.7 System.out.println 71
3.8 Compilation and Execution 73
3.9 Identifiers 73
3.10 Variables 74
3.11 Assignment Statements 75
3.12 Initialization Statements 77
3.13 Numeric Data Types—int, long, float, double 78
3.14 Constants 80
3.15 Arithmetic Operators 83
3.16 Expression Evaluation and Operator Precedence 86
3.17 More Operators: Increment, Decrement, and
Compound Assignment 88
3.18 Tracing 90
3.19 Type Casting 90
3.20 char Type and Escape Sequences 93
3.21 Primitive Variables Versus Reference Variables 95
3.22 Strings 96
3.23 Input—the Scanner Class 100
3.24 Simple File Input for Repetitive Testing During
Program Development 105
3.25 GUI Track: Input and Output with Dialog Boxes
(Optional) 107
CHAPTER 4
CHAPTER 5
Interlude 213
Multiple-Method Programs in a Non-Object-Oriented
Environment 213
GUI Track: Multiple-Method Program That Uses
StackPane and Group to Display Images, Rectangles,
Lines, an Oval, and Text (Optional) 216
CHAPTER 6
CHAPTER 7
CHAPTER 8
CHAPTER 9
Arrays 384
9.1 Introduction 385
9.2 Array Basics 385
9.3 Array Declaration and Creation 387
9.4 Array length Property and Partially Filled Arrays 391
9.5 Copying an Array 393
9.6 Problem Solving with Array Case Studies 397
9.7 Searching an Array 403
9.8 Sorting an Array 408
9.9 Two-Dimensional Arrays 412
9.10 Arrays of Objects 418
9.11 For-Each Loops 425
CHAPTER 10
Language: English
WILLIAMSBURG
Published by Colonial Williamsburg
MCMLXXVIII
The Leatherworker
in Eighteenth-Century
Williamsburg
Once upon a time there lived in France a poet-bureaucrat by the
name of Charles Perrault, who wrote fairy tales. He called one of
them Cendrillon ou la Petite Pantoufle de Verre, and ever since 1697,
for that was the date of Cinderella’s appearance in modern literature,
her glass slippers have been a puzzle.
After all, logic and reason and custom and tradition say that footwear
has been made of leather since time unknown. And who ever heard
of making shoes out of glass?
Well, who ever heard of making bottles out of leather, for that
matter? Or of fire hose made of leather? Or of leather cannons?
Yet leather has been put to these and many other uses over the
centuries of recorded history. A list of them would be almost endless,
and so would a list of the sources of leather. The following
compilation, doubtless far from complete, could have been (it was
not) drawn up by an English eighteenth-century or colonial American
leatherworker:
SOURCES 2
cow
ox
calf
horse
sheep
lamb
goat
kid
pig
dog
wolf
deer
elk
antelope
moose
buffalo
bear
wildcat
rabbit
muskrat
beaver
alligator
rattlesnake
USES
Clothing
shoes, boots, moccasins, galoshes
leggings, breeches, aprons
shirts, coats, caps, hats, gloves
belts, suspenders, points and laces
fur items, fur trim
Shelter and furnishings
tents, tepees
wall hangings, door curtains
chair seats and backs, beds
upholstery, cushion covers
fur rugs, fur bedding
Transportation
saddles, bridles, harness (including that for human porters)
carriage upholstery, wagon covers
scupper leathers, antichafing binding on sailing gear
Containers, liquid
wineskins, waterbags, bottles
jugs, mugs, buckets
inkwells and inkhorns
hoses, pipes
Containers, dry
bags, purses, food pouches
trunks, boxes, caskets, coffers
snuff boxes, dice cups
Military items
shields, scabbards, sheaths
bowcases, quivers, gun buckets
helmets, cartridge boxes
powder horns and buckets
Other
bookbinding, parchment, vellum
hornbooks, bellows, hinges
pump washers, airtight floats
spinning-wheel belts
cricket balls, drumheads, banjos
surgical trusses
As the legislature of colonial Virginia put it in 1691 (in an act that will
shortly engage our attention again):
And for the avoyding of all ambiguities and doubts, which may and
doe grow and arise upon the difinition and interpretation of this
word leather, Be it enacted and declared, that hydes and skinns of
oxe, steer, bull, cow, calfe, deer, goats and sheep being tann’d shall
be, and ever hath been reputed and taken leather.
The key word is “tanned.” Like any organic matter, skins and hides
will soon begin to decay unless they receive some kind of
preservative treatment. They may be simply scraped and sundried—
or salted or smoked or soaked in brine or in slaked lime. From some
of these processes may come extremely tough and durable products
—rawhide, parchment, and vellum are limed—but they are not
leather because they have not been tanned.
Taneur
This illustration from Diderot’s great eighteenth-century French
encyclopedia shows the essential operations in a tannery: A)
washing hides in a stream; B) scraping hair or flesh from a hide
on the “beam”; C) soaking hides in a series of lime pits; D)
bedding hides in a tanning vat with a layer of shredded bark
between each hide; E) stirring lighter hides in a hot water
tanning solution.
Mineral tanning with alum, called “tawing,” has been in use since
earliest time in Babylonia, Egypt, and probably China. Because the
leather so made is snow white, workers in this specialty gained the
name of “whitetawyers.” Tawed leather, although soft and stretchy, is
very strong; quite appropriately, one of his eighteenth-century
contemporaries described Richard Bland, the Williamsburg lawyer and
political pamphleteer, as “staunch & tough as whitleather.”
cofferers
cordwainers
curriers
girdlers
glovers
leather dyers
leathersellers
loriners (or lorimers)
malemakers
pouchmakers
saddlers
skinners
tanners
whitetawyers
9
Cordonier
As the shoemaker needed an assortment of lasts on which to
make shoes of differing sizes and shapes, so the bootmaker
needed “boot legs” resembling his customers’ calves. The
engraving also shows a variety of eighteenth-century boot styles,
the more formidable being heavy military boots. Diderot.
10
BEFORE FREE ENTERPRISE
Tanners, this law decreed, were not to leave hides too long in the
lime-pits, nor put them into the tan-vats until they had been
thoroughly cleansed of lime; curriers were not to work “any hyde or
skin not being thoroughly dry,” and were not to skimp on the amount
or quality or freshness of the grease they used in currying;
cordwainers or shoemakers were to use only leather that was “well
and truly tann’d and curryed,” and were to make their boots, shoes,
and slippers “well and substantially sewed with good thread well
twisted and made, and sufficiently waxed with wax well rosined, and
the stitches hard drawn with handleathers.”
Perhaps even more interesting than these regulations are the reasons
given for enacting them: “Forasmuch as divers and sundry deceits
and abuses have been hitherto committed, and daily are committed
and practiced by the Tanners, curriers, and workers of leather in ...
Virginia, to the great injury and damage of the inhabitants ...; And
forasmuch as no leather can be so well tann’d but it may be marred
and spoyled in the currying ...; and forasmuch as leather well tann’d
and curryed may by the negligence, deceit or evill workmanship of
the cordwainer or shoemaker be used deceitfully to the hurt of the
occupier or wearer thereof.”
For all its great length and detail, the act of 1691 seems not to have
had much effect. Governor Edmund Andros in 1697 asserted, “There
are no manufactures setled in Virginia Except Inconsiderable tanning
and shoemaking (bad Leather).” And in 1705 Robert Beverley wrote
of the Virginians:
13
THE ROBERT GILBERT STORY
I HAVE a parcel of CALF SKINS, and SOLE LEATHER, both back and
crop, which I will sell, for ready money, on reasonable terms.
ROBERT GILBERT
16
Corroyeur
The shop of a currier and the tools used by his workers. Against
the wall at the left a man is scraping a skin with the “moon
knife” (figs. 7 and 7 no. 2), holding the skin taut by means of
pincers and a thong (fig. 6) around his seat. In the background
workers are treading, slicking, and graining skins. In the
foreground one man uses the “head knife” to work over the skin
on the beam, while another softens a skin with the currier’s
mace. Diderot.
This establishment lay just to the east of the town, its location
recalled to this day in the name of Tanyard Street. It had been
founded in the early 1750s by Craig in partnership with Christopher
Ford, carpenter, and Nicholas Sim, tanner. Craig bought out his
partners in 1758, and two years later Pearson came on the scene. At
that time the tannery consisted of “Tan Vatts ... New and Old Bark
Houses, Mill House and Fleshing House ... and all other Houses and
Buildings ... used in the Business of Tanning and making Leather.”
When Pearson died in 1777, his estate included “four Negro men
Tanners and Curriers, two shoemakers” and three other slaves,
indicating that the late master tanner operated a considerable
business. The tanyard continued in the possession of Pearson’s
widow and descendants for nearly sixty years, being operated at least
part of the time by William Plume, tanner and currier from Norfolk.