0% found this document useful (0 votes)
8 views

Introduction to Programming with Java 3rd Edition John Dean download

The document is a digital download link for the 3rd edition of 'Introduction to Programming with Java' by John Dean, which covers fundamental programming concepts and Java programming techniques. It includes details about the authors, publication information, and a comprehensive table of contents outlining various programming topics. Additional resources and recommended products related to programming are also provided.

Uploaded by

yarnoboder
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Introduction to Programming with Java 3rd Edition John Dean download

The document is a digital download link for the 3rd edition of 'Introduction to Programming with Java' by John Dean, which covers fundamental programming concepts and Java programming techniques. It includes details about the authors, publication information, and a comprehensive table of contents outlining various programming topics. Additional resources and recommended products related to programming are also provided.

Uploaded by

yarnoboder
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 44

Introduction to Programming with Java 3rd

Edition John Dean download

https://ebookultra.com/download/introduction-to-programming-with-
java-3rd-edition-john-dean/

Explore and download more ebooks or textbooks


at ebookultra.com
Here are some recommended products for you. Click the link to
download, or explore more at ebookultra.com

Introduction to Programming with Greenfoot Object Oriented


Programming in Java with Games and Simulations 1st Edition
Michael Kolling
https://ebookultra.com/download/introduction-to-programming-with-
greenfoot-object-oriented-programming-in-java-with-games-and-
simulations-1st-edition-michael-kolling/

Introduction to Java Programming Brief 8th Edition Edition


Y. Daniel Liang

https://ebookultra.com/download/introduction-to-java-programming-
brief-8th-edition-edition-y-daniel-liang/

Chaudhary Introduction to Java Programming Advanced


Features Core Series Updated To Java 8 2nd Edition Harry
H.
https://ebookultra.com/download/chaudhary-introduction-to-java-
programming-advanced-features-core-series-updated-to-java-8-2nd-
edition-harry-h/

Introduction to Neural Networks with Java 2nd Edition Jeff


Heaton

https://ebookultra.com/download/introduction-to-neural-networks-with-
java-2nd-edition-jeff-heaton/
Beginning Programming with Python For Dummies 3rd Edition
John Paul Mueller

https://ebookultra.com/download/beginning-programming-with-python-for-
dummies-3rd-edition-john-paul-mueller/

Practical Database Programming with Java 1st Edition Ying


Bai

https://ebookultra.com/download/practical-database-programming-with-
java-1st-edition-ying-bai/

Dean Dyer Introduction to Intellectual Property Law 1st


Edition Owen Dean

https://ebookultra.com/download/dean-dyer-introduction-to-
intellectual-property-law-1st-edition-owen-dean/

Python Programming An Introduction to Computer Science


John M. Zelle

https://ebookultra.com/download/python-programming-an-introduction-to-
computer-science-john-m-zelle/

Beginning Programming with Java For Dummies 4th Edition


Barry Burd

https://ebookultra.com/download/beginning-programming-with-java-for-
dummies-4th-edition-barry-burd/
Introduction to Programming with Java 3rd Edition John
Dean Digital Instant Download
Author(s): John Dean, Ray Dean
ISBN(s): 9781259875762, 1259875768
Edition: 3
File Details: PDF, 92.85 MB
Year: 2020
Language: english
Page i

John Dean
Park University

Raymond Dean
University of Kansas
Page ii

INTRODUCTION TO PROGRAMMING WITH JAVA

Published by McGraw Hill LLC, 1325 Avenue of the Americas, New York, NY 10121.
Copyright ©2021 by McGraw Hill LLC. All rights reserved. Printed in the United States of
America. No part of this publication may be reproduced or distributed in any form or by any
means, or stored in a database or retrieval system, without the prior written consent of
McGraw Hill LLC, including, but not limited to, in any network or other electronic storage or
transmission, or broadcast for distance learning.

Some ancillaries, including electronic and print components, may not be available to
customers outside the United States.

This book is printed on acid-free paper.

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

Cover Image: ©Shutterstock/Brian Lasenby

All credits appearing on page or at the end of the book are considered to be an extension of
the copyright page.

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
Page iii
edication
—To Stan and Kate
Page iv

About the Authors

John Dean is an Associate Professor in the Computer Science and Information Systems
Department at Park University. He earned a Ph.D. degree in computer science from Nova
Southeastern University and an M.S. degree in computer science from the University of
Kansas. He is Java certified and has worked in industry as a software engineer and project
manager, specializing in Java and various web technologies—JavaScript, JavaServer Pages,
and servlets. He has taught a full range of computer science courses, including Java
programming and Java-based web programming. He has authored a web programming
textbook with a focus on client-side technologies HTML5, CSS, and JavaScript.

Raymond Dean is a Professor Emeritus, Electrical Engineering and Computer Science,


University of Kansas. He earned an M.S. degree from MIT and a Ph.D. degree from
Princeton University. As a professional engineer in the HVAC industry, he wrote computer
programs that design air distribution systems and analyze energy consumption and sound
propagation in buildings. At the University of Kansas, he taught microprocessor
programming, data structures, and other courses in electrical engineering and computer
science.
Page v

Contents
Preface x
Project Summary xxiv

CHAPTER 1

Introduction to Computers and Programming 1


1.1 Introduction 2
1.2 Hardware Terminology 2
1.3 Program Development 10
1.4 Source Code 12
1.5 Compiling Source Code into Object Code 13
1.6 Portability 14
1.7 Emergence of Java 15
1.8 Computer Ethics 18
1.9 First Program—Hello World 19
1.10 GUI Track: Hello World (Optional) 24

CHAPTER 2
Algorithms and Design 32
2.1 Introduction 32
2.2 Output 33
2.3 Variables 34
2.4 Operators and Assignment Statements 35
2.5 Input 36
2.6 Flow of Control and Flowcharts 37
2.7 if Statements 38
2.8 Loops 43
2.9 Loop Termination Techniques 45
2.10 Nested Looping 48
2.11 Tracing 51
2.12 Problem Solving: Other Pseudocode Formats and an Asset Management
Example 55

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

Control Statements 119


4.1 Introduction 120 Page vi
4.2 Conditions and Boolean Values 120
4.3 if Statements 121
4.4 && Logical Operator 124
4.5 | | Logical Operator 129
4.6 ! Logical Operator 131
4.7 Switching Constructs 132
4.8 while Loop 138
4.9 do Loop 142
4.10 for Loop 144
4.11 Solving the Problem of Which Loop to Use 149
4.12 Nested Loops 150
4.13 boolean Variables 152
4.14 Input Validation 156
4.15 Problem Solving with Boolean Logic (Optional) 157

CHAPTER 5
Using Prebuilt Methods 170
5.1 Introduction 170
5.2 The API Library 171
5.3 Math Class 177
5.4 Wrapper Classes for Primitive Types 182
5.5 Character Class 186
5.6 String Methods 188
5.7 Formatted Output with the printf> Method 194
5.8 Problem Solving with Random Numbers (Optional) 199
5.9 GUI Track: Covering an Image with a Tinted Pane (Optional) 203

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

Object-Oriented Programming 222


6.1 Introduction 223
6.2 Object-Oriented Programming Overview 223
6.3 First OOP Class 227
6.4 Driver Class 230
6.5 Calling Object, this Reference 234
6.6 Instance Variables 236
6.7 Tracing an OOP Program 237
6.8 UML Class Diagrams 242
6.9 Local Variables 244
6.10 The return Statement 247
6.11 Argument Passing 249
6.12 Specialized Methods—Accessors, Mutators, and Boolean Methods 252
6.13 Problem Solving with Simulation (Optional) 255

CHAPTER 7

Object-Oriented Programming— Additional Details 272


7.1 Introduction 273
7.2 Object Creation—A Detailed Analysis 273
7.3 Assigning a Reference 275
7.4 Testing Objects for Equality 279
7.5 Passing References as Arguments 284
7.6 Method-Call Chaining 286
7.7 Overloaded Methods 289
7.8 Constructors 293
7.9 Overloaded Constructors 299
7.10 Static Variables 303
7.11 Static Methods 306
7.12 Named Constants 312
7.13 Problem Solving with Multiple Driven Classes 314

CHAPTER 8

Software Engineering 324


8.1 Introduction 325
8.2 Coding-Style Conventions 325
8.3 Documentation for Outsiders 334
8.4 Helper Methods 338
8.5 Encapsulation (with Instance Variables and Local Variables) 342 Page vii
8.6 Recognizing the User’s Point of View 344
8.7 Design Philosophy 345
8.8 Top-Down Design 350
8.9 Bottom-Up Design 359
8.10 Case-Based Design 361
8.11 Iterative Enhancement 361
8.12 Merging the Driver Method into the Driven Class 363
8.13 Accessing Instance Variables Without Using this 365
8.14 Writing Your Own Utility Class 366
8.15 Problem Solving with the API Calendar Class (Optional) 368
8.16 GUI Track: Problem Solving with CRC Cards (Optional) 370

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

ArrayLists and an Introduction to the Java Collections Framework 435


10.1 Introduction 436
10.2 The ArrayList Class 437
10.3 Storing Primitives in an ArrayList 443
10.4 ArrayList Example Using Anonymous Objects and the For-Each Loop 446
10.5 ArrayLists Versus Standard Arrays 450
10.6 The LinkedList Class 451
10.7 The List Interface 452
10.8 Problem Solving: How to Compare Method Execution Times 453
10.9 Queues, Stacks, and the ArrayDeque Class 457
10.10 Overview of the Java Collections Framework 464
10.11 Collections Example—Information Flow in a Network of Friends 468
10.12 GUI Track: Second Iteration of Problem Solving with CRC Cards (Optional)
476

CHAPTER 11
Recursion 489
11.1 Introduction 490
11.2 Guidelines for Writing a Recursive Method 491
11.3 A Recursive Factorial Method 492
11.4 Comparison of Recursive and Iterative Solutions 496
11.5 Recursive Method Evaluation Practice 500
11.6 Binary Search 503
11.7 Merge Sort 506
11.8 Towers of Hanoi 510
11.9 Problem Solving with Performance Analysis 514
11.10 GUI Track: Drawing Trees with a Fractal Algorithm (Optional) 517

CHAPTER 12
Type Details and Alternative Coding Mechanisms 530
12.1 Introduction 531
12.2 Integer Types and Floating-Point Types 532
12.3 char Type and the ASCII Character Set 536
12.4 Type Conversions 538
12.5 Prefix/Postfix Modes for Increment/ Decrement Operators 541
12.6 Embedded Assignments 544
12.7 Conditional Operator Expressions 546
12.8 Expression Evaluation Review 547
12.9 Short-Circuit Evaluation 551
12.10 Empty Statement 552
12.11 Using break to Exit from a Loop 554 Page viii
12.12 for Loop Header Details 555
12.13 Enumerated Types 557
12.14 forEach Method, Lambda Expressions, Method References, and Streams 564
12.15 Hexadecimal, Octal, and Binary Numbers 573
12.16 GUI Track: Unicode (Optional) 574
12.17 Introduction to GridWorld Case Study (Optional) 579

CHAPTER 13

Aggregation, Composition, and Inheritance 591


13.1 Introduction 592
13.2 Composition and Aggregation 592
13.3 Inheritance Overview 599
13.4 Implementation of a Person/Employee/FullTime Hierarchy 603
13.5 Constructors in a Subclass 605
13.6 Method Overriding 606
13.7 Using the Person/Employee/FullTime Hierarchy 609
13.8 The final Access Modifier 610
13.9 Using Inheritance with Aggregation and Composition 610
13.10 Design Practice with Card Game Example 613
13.11 GridWorld Case Study Extensions (Optional) 619
13.12 Problem Solving with Association Classes (Optional) 626
CHAPTER 14

Inheritance and Polymorphism 637


14.1 Introduction 638
14.2 The Object Class and Automatic Type Promotion 638
14.3 The equals Method 639
14.4 The toString Method 643
14.5 Polymorphism and Dynamic Binding 648
14.6 Assignments When the Two Sides’ Classes Are Different 653
14.7 Polymorphism with Arrays 654
14.8 abstract Methods and Classes 660
14.9 Interfaces 663
14.10 The protected Access Modifier 673
14.11 GUI Track: Three-Dimensional Graphics (Optional) 677

CHAPTER 15

Exception Handling 691


15.1 Introduction 692
15.2 Overview of Exceptions and Exception Messages 692
15.3 Using try and catch Blocks to Handle “Dangerous” Method Calls 693
15.4 Line Plot Example 695
15.5 try Block Details 699
15.6 Two Categories of Exceptions—Checked and Unchecked 700
15.7 Unchecked Exceptions 702
15.8 Checked Exceptions 705
15.9 Generic catch Block with Exception Class 708
15.10 Multiple catch Blocks and Multiple Exceptions per Block 712
15.11 Understanding Exception Messages 714
15.12 Using a throws Clause to Postpone the catch 718
15.13 Automatic Cleanup Using Try-With-Resources 720
15.14 GUI Track: Line Plot Example Revisited (Optional) 722

CHAPTER 16
Files, Buffers, Channels, and Paths 735
16.1 Introduction 736
16.2 Simple Text-File Example: HTML File Generator 737
16.3 A Website Reader 741
16.4 Object File I/O 743
16.5 Character Sets and File-Access Options 748
16.6 Buffered Text File I/O 749
16.7 Primitive Buffers with Random Access 752
16.8 Channel I/O and Memory-Mapped Files 760
16.9 Path, Whole-File, and Directory Operations 767
16.10 Walking a Directory Tree 769 Page ix
16.11 GUI Track: Final Iteration of Problem Solving with CRC Cards (Optional) 775

CHAPTER 17

GUI Programming Basics 787


17.1 Introduction 788
17.2 SimpleWindow Program 791
17.3 Stage and Scene 794
17.4 JavaFX Components 796
17.5 Label Control 797
17.6 TextField Control 799
17.7 Greeting Program 801
17.8 Event Handling 805
17.9 Property Binding 809
17.10 JavaFX CSS 812
17.11 Scene Graph Inheritance 818
17.12 Style Sheets and Cascading 821
17.13 Button Control and FactorialButton Program 826
17.14 Distinguishing Between Multiple Events 832
17.15 Colors 834
17.16 ColorChooser Program 838

CHAPTER 18
GUI Programming—Layout Panes 849
18.1 Introduction 849
18.2 Layout Panes 851
18.3 FlowPane and GridPane—Competing Layout Philosophies 853
18.4 VBox Program with Two Stages and an Image File 858
18.5 BorderPane 867
18.6 TilePane and TextFlow Containers 872
18.7 TicTacToe Program 878
18.8 Embedded Panes, HBox, and MathCalculator Program 882
18.9 Plain Pane Container and Component Positioning 889

CHAPTER 19

GUI Programming—Additional GUI Components, Additional Event


Handlers, Animation 896
19.1 Introduction 897
19.2 User Interface Design 897
19.3 TextArea Control 898
19.4 CheckBox and RadioButton Controls 903
19.5 ComboBox Control 909
19.6 Job Application Program 913
19.7 ScrollPane and Menu Classes 918
19.8 Images and Mouse Events 922
19.9 Lunar Eclipse Program with Circle, RadialGradient, and Slider 928
19.10 Animation 933

Appendices
Appendix 1 ASCII Character Set 943
Appendix 2 Operator Precedence 945
Appendix 3 Java Keywords and Other Reserved Words 947
Appendix 4 Packages and Modules 951
Appendix 5 Java Coding-Style Conventions 963
Appendix 6 Javadoc with Tags 975
Appendix 7 UML Diagrams 980
Appendix 8 Number Systems and Conversions Between Them 986
Random documents with unrelated
content Scribd suggests to you:
we can get of them. We simply know that the admiral declined all
such proffers. From Amsterdam he wrote, under date of December,
1789, to his firm friend President Washington. In that letter he
writes:
“Count Segur and myself have frequently conversed on subjects
that regard America. And the most pleasing reflection of all has been
the happy establishment of the new constitution, and that you are
so deservedly placed at the head of the government, by the
unanimous voice of America. Your name alone, sir, has established in
Europe a confidence that was for some time before entirely wanting
in American concerns; and I am assured that the happy efforts of
your administration are still more sensibly felt throughout the United
States. This is more glorious for you than all the laurels that your
sword so nobly won in support of the rights of human nature. In war
your fame is immortal, as the hero of liberty. In peace you are her
patron, and the firmest supporter of her rights. Your greatest
admirers and even your best friends have now but one wish left
them—that you may long enjoy health and your present happiness.”
From Amsterdam he went to Hamburg by way of Copenhagen.
Toward the close of April, 1790, he crossed the channel to London.
“Upon landing,” he writes, “I escaped being murdered.” After a short
visit there he went to Paris. His health was feeble. Still he kept up an
active correspondence with his numerous distinguished friends all
over the continent. His mode of expressing himself, as the reader
will have perceived, was peculiar. He was a man of singular
frankness and transparency of character. He gave free utterance to
his thoughts as they arose. In Paris he again enjoyed the friendship
of Lafayette. Nothing special occurred during his residence in Paris.
Early in June, his health began more rapidly to fail. He lost his
appetite, and a dropsical affection swelled his legs and expanded his
chest. His physician at length warned him that his symptoms were
alarming, and advised him to settle his worldly affairs. He sat in his
chair as he dictated to the notary his will. After his friends had
retired he rose from his chair, went into his bedroom, and probably
feeling a little faint threw himself with his face upon his bed, and his
feet resting upon the floor. Soon after, the queen’s physician arrived
to visit the illustrious patient. He was conducted into the bedroom,
where the admiral was found dead. His disorder had terminated in
dropsy of the breast.
It was the evening of the 20th of July, 1789. The admiral had
reached the age of but forty-five years. His funeral attracted a large
concourse of the most distinguished of the residents in Paris. The
National Assembly, then in session, passed the following resolve:
“The National Assembly, desirous of honoring the memory of Paul
Jones, Admiral of the United States of America, and to preserve by a
memorable example, the equality of religious rights, decrees that
twelve of its members shall assist at the funeral solemnities of a man
who has so well served the cause of liberty.”
A funeral sermon was preached by M. Marson, a French Protestant
clergyman. In this oration he said:
“We have just returned to the earth the remains of an illustrious
stranger; one of the first champions of the liberty of America, of that
liberty which so gloriously ushered in our own. And what more
flattering homage can we offer the memory of Paul Jones than to
swear on his tomb to live or to die free. Let neither tyrants nor their
satellites ever pollute this sacred earth. May the ashes of the great
man, too soon lost to humanity, enjoy here an undisturbed repose.
May his example teach posterity the efforts which noble souls are
capable of making when stimulated by hatred to oppression. Identify
yourself with the glory of Paul Jones, in imitating his contempt of
danger, his devotion to his country, and the noble heroism which,
after having astonished the present age, will continue to call forth
the veneration of ages yet to come.”
Such was the career of this remarkable man. Such is a faithful
record of what he said and wrote and did. And this record surely
exhibits the character of a worthy and a noble man. He rose to
distinction by his own energies. His achievements gave him world-
wide renown. His character secured for him not only a cordial
welcome in the palaces of kings and in the castles of nobles, but,
that which is far higher praise, won for him the esteem and affection
of Washington, Jefferson, Franklin, Morris, Lafayette, Count Segur,
Count d’Estaing, and a host of others of the worthiest spirits in
America and France.
The following is a brief recapitulation of the services which, during
his short life, he rendered his country. During the Revolution he
fought twenty-three battles at sea, and was never vanquished. He
made seven victorious descents upon Great Britain and her colonies.
He captured two ships of equal size with his own, and two of far
superior force; besides taking many store-ships and other smaller
craft. He spread alarm throughout the whole island of Great Britain,
compelling the government to fortify all her ports. He also forced the
British to desist from their atrocious system of pillaging and burning
in America, and to exchange, as prisoners of war, the Americans
whom they had captured and plunged into prison dungeons as
“traitors, pirates, and felons.”
The distinguished Matthew Carey of Philadelphia, after examining
the voluminous correspondence of Paul Jones, contained in the
valuable biography compiled by Colonel John Henry Sherburne,
wrote to the author:
“I have read, with intense interest, your Life of John Paul Jones.
And it must be regarded as a valuable national object, placing, as it
does, in strong relief, the shining qualities of this hero, not only as a
naval commander but as a profound politician. The latter quality
appears clearly and distinctly in various parts of the correspondence,
wherein are developed views of the proper policy of this country
which are worthy of the first statesmen that sat in the Congress of
1774 and 1775—men never exceeded in the annals of the world for
sagacity, patriotism, and public spirit.
“No man has been the subject of more gross and shocking abuse,
and none of those who have distinguished themselves in the
Revolution were so little known as he has been to the nation to
whose service he devoted all the energies of his magnanimous soul.
I confess that for one I always regarded Paul Jones as very few
degrees above a freebooter who, in the prospect of plunder was
reckless of his life. I am now thoroughly undeceived, and consider
him as deserving a conspicuous rank among the most illustrious of
those heroes and statesmen who not only formed a wreath around
the brow of this country, but secured her a prouder destiny than
ever fell to the lot of any other portion of mankind.”
THE END.

PRINTED BY LANGE, LITTLE & CO., NEW YORK.


Footnotes

A. Congress appropriated two-thirds of all prizes to the


Government, leaving but one-third to be divided among the captors.

B. Sir Joseph Yorke was the British ambassador at the Hague. He


insisted that the Dutch Government should take from Captain Jones,
the Serapis and the Countess of Scarborough. He said that as
England had not recognized the United States, the captures were
illegal, as a commission had not been granted to Captain Jones by a
sovereign power.

C. He doubtless refers to Commissioner Lee.

D. Life of Paul Jones, by Alexander Slidell Mackenzie, Vol. i, p. 195.

E. Subsequently Charles X.

F. Russian Minister for the Home Department.

G. Upon the reception of the Order of St. Anne by the empress,


Count Segur wrote from St. Petersburg a very complimentary letter
to the admiral, under date of the 14th of July, 1788. In this letter he
says:
“The empress being absent I forwarded a copy of the greatest
part of your letter to General Mouronoff, who had it read to that
princess. She is highly satisfied with it, and in two lines from her
hand, has been pleased to charge me with assurances to you, of the
great respect in which she holds your services. General Mouronoff
begs me to say that he will endeavor to merit the obliging things you
say of him.”

H. Mr. William Taylor, merchant, of New York, son of the admiral’s


eldest sister, Mrs. Taylor of Dumfries, Scotland.

I. Monsieur Crimpin was the advocate whom he had first engaged.

J. He refers to the gold medal ordered to be struck by Congress.

K. It was near the mouth of the river Liman that all these naval
battles were fought.
Transcriber’s Note
The name of a Greek officer, Alexiano, is misspelled in
both the table of content’s description of Chapter XIV,
and the summary at the head of the chapter itself. Both
were corrected.
Errors deemed most likely to be the printer’s have
been corrected, and are noted here. Except in the most
obvious cases, spelling in quoted text is not corrected,
but is noted. The references are to the page and line in
the original.
xi.1 A Greek Officer Replaced.
Alexian[a/o]
25.20 The Alfred mounted 30 Added.
guns, the Columbus 28
28[.]
45.26 he carried toplights until Added.
the morning[.]
52.17 An immense amou[n]t of Inserted.
shipping
53.27 extract from his first Added.
despatch from Nantes[:]
54.22 On the 10th of Transposed.
Feb[ur/ru]ary, 1778,
60.11 in salute of our national Replaced.
banner, gun for gun[,/.]
75.21 demonstration of the Removed.
uncertain[i]ty of human
prospects
93.1 desired to as[s]ist him Inserted.
110.25 Scarc[e]ly a breath of Inserted.
wind
125.10 the following extraordinary Added.
prayer[.]
143.12 after repeating my words Inserted.
t[w]o or three times
144.18 Just before ten o[’]clock Inserted.
151.12 declared that Land[ia/ai]s Transposed.
said to
158.6 and swarthy complexion. Added.
[”]
185.21 excite their indignation Inserted.
and deris[i]on.
185.24 thirty-six years [a/o]f age Replaced.
190.2 the laws and sic
[sovereignity] of the
United States
209.26 the virtuous Senate of Replaced.
America [h/b]e misled
210.27 Almost in[n]umerable Inserted.
obstacles arose
213.24 and rights of human Replaced.
nature.[’/”]
214.12 Such a quan[t]ity of Inserted.
powder
233.21 “Robert Morris[”] Added.
249.1 an extensive tract of Replaced.
excell[a/e]nt land
253.3 to the beautiful little Transposed.
Morav[ai/ia]n village
256.17 which regulate the Replaced.
intercourse of
gentlem[a/e]n
258.16 which regulate the Added.
intercourse of his
mission[.]
258.22 th[r]ough> the labors of Inserted.
two years
270.2 render him more Removed.
extensively useful.[”]
274.6 lessen the profits of any sic
[simular] undertaking
288.14 to sup with his majesty Replaced.
and the royal family[,/,]
288.17 was very brilliant.[”] Added.
291.7 co[u/n]strain> me to Inverted.
make this demand
295.12 in any measure or Added.
capacity.[”]
298.5 A Greek Officer Replaced.
Alexian[a/o]
312.25 This concil[i]atory speech Inserted.
314.23 I showed the Prince of Transposed.
Nass[ua/au] that letter
328.9 in a spirit of concil[i]ation Inserted.
328.16 the Prince of Na[u/s]sau Replaced.
334.11 Prince of Nass[ua/au] Transposed.
337.11 his flag-ship, the Inserted.
Wolo[d]imir
340.9 would still fu[r]ther irritate Inserted.
350.11 I know to[o] well Added.
359.4 among the most Inserted.
illustr[i]ous of those
heroes
*** END OF THE PROJECT GUTENBERG EBOOK THE LIFE AND
ADVENTURES OF REAR-ADMIRAL JOHN PAUL JONES, COMMONLY
CALLED PAUL JONES ***

Updated editions will replace the previous one—the old editions


will be renamed.

Creating the works from print editions not protected by U.S.


copyright law means that no one owns a United States
copyright in these works, so the Foundation (and you!) can copy
and distribute it in the United States without permission and
without paying copyright royalties. Special rules, set forth in the
General Terms of Use part of this license, apply to copying and
distributing Project Gutenberg™ electronic works to protect the
PROJECT GUTENBERG™ concept and trademark. Project
Gutenberg is a registered trademark, and may not be used if
you charge for an eBook, except by following the terms of the
trademark license, including paying royalties for use of the
Project Gutenberg trademark. If you do not charge anything for
copies of this eBook, complying with the trademark license is
very easy. You may use this eBook for nearly any purpose such
as creation of derivative works, reports, performances and
research. Project Gutenberg eBooks may be modified and
printed and given away—you may do practically ANYTHING in
the United States with eBooks not protected by U.S. copyright
law. Redistribution is subject to the trademark license, especially
commercial redistribution.

START: FULL LICENSE


THE FULL PROJECT GUTENBERG LICENSE
PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK

To protect the Project Gutenberg™ mission of promoting the


free distribution of electronic works, by using or distributing this
work (or any other work associated in any way with the phrase
“Project Gutenberg”), you agree to comply with all the terms of
the Full Project Gutenberg™ License available with this file or
online at www.gutenberg.org/license.

Section 1. General Terms of Use and


Redistributing Project Gutenberg™
electronic works
1.A. By reading or using any part of this Project Gutenberg™
electronic work, you indicate that you have read, understand,
agree to and accept all the terms of this license and intellectual
property (trademark/copyright) agreement. If you do not agree
to abide by all the terms of this agreement, you must cease
using and return or destroy all copies of Project Gutenberg™
electronic works in your possession. If you paid a fee for
obtaining a copy of or access to a Project Gutenberg™
electronic work and you do not agree to be bound by the terms
of this agreement, you may obtain a refund from the person or
entity to whom you paid the fee as set forth in paragraph 1.E.8.

1.B. “Project Gutenberg” is a registered trademark. It may only


be used on or associated in any way with an electronic work by
people who agree to be bound by the terms of this agreement.
There are a few things that you can do with most Project
Gutenberg™ electronic works even without complying with the
full terms of this agreement. See paragraph 1.C below. There
are a lot of things you can do with Project Gutenberg™
electronic works if you follow the terms of this agreement and
help preserve free future access to Project Gutenberg™
electronic works. See paragraph 1.E below.
1.C. The Project Gutenberg Literary Archive Foundation (“the
Foundation” or PGLAF), owns a compilation copyright in the
collection of Project Gutenberg™ electronic works. Nearly all the
individual works in the collection are in the public domain in the
United States. If an individual work is unprotected by copyright
law in the United States and you are located in the United
States, we do not claim a right to prevent you from copying,
distributing, performing, displaying or creating derivative works
based on the work as long as all references to Project
Gutenberg are removed. Of course, we hope that you will
support the Project Gutenberg™ mission of promoting free
access to electronic works by freely sharing Project Gutenberg™
works in compliance with the terms of this agreement for
keeping the Project Gutenberg™ name associated with the
work. You can easily comply with the terms of this agreement
by keeping this work in the same format with its attached full
Project Gutenberg™ License when you share it without charge
with others.

1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside
the United States, check the laws of your country in addition to
the terms of this agreement before downloading, copying,
displaying, performing, distributing or creating derivative works
based on this work or any other Project Gutenberg™ work. The
Foundation makes no representations concerning the copyright
status of any work in any country other than the United States.

1.E. Unless you have removed all references to Project


Gutenberg:

1.E.1. The following sentence, with active links to, or other


immediate access to, the full Project Gutenberg™ License must
appear prominently whenever any copy of a Project
Gutenberg™ work (any work on which the phrase “Project
Gutenberg” appears, or with which the phrase “Project
Gutenberg” is associated) is accessed, displayed, performed,
viewed, copied or distributed:

This eBook is for the use of anyone anywhere in the United


States and most other parts of the world at no cost and
with almost no restrictions whatsoever. You may copy it,
give it away or re-use it under the terms of the Project
Gutenberg License included with this eBook or online at
www.gutenberg.org. If you are not located in the United
States, you will have to check the laws of the country
where you are located before using this eBook.

1.E.2. If an individual Project Gutenberg™ electronic work is


derived from texts not protected by U.S. copyright law (does not
contain a notice indicating that it is posted with permission of
the copyright holder), the work can be copied and distributed to
anyone in the United States without paying any fees or charges.
If you are redistributing or providing access to a work with the
phrase “Project Gutenberg” associated with or appearing on the
work, you must comply either with the requirements of
paragraphs 1.E.1 through 1.E.7 or obtain permission for the use
of the work and the Project Gutenberg™ trademark as set forth
in paragraphs 1.E.8 or 1.E.9.

1.E.3. If an individual Project Gutenberg™ electronic work is


posted with the permission of the copyright holder, your use and
distribution must comply with both paragraphs 1.E.1 through
1.E.7 and any additional terms imposed by the copyright holder.
Additional terms will be linked to the Project Gutenberg™
License for all works posted with the permission of the copyright
holder found at the beginning of this work.

1.E.4. Do not unlink or detach or remove the full Project


Gutenberg™ License terms from this work, or any files
containing a part of this work or any other work associated with
Project Gutenberg™.

1.E.5. Do not copy, display, perform, distribute or redistribute


this electronic work, or any part of this electronic work, without
prominently displaying the sentence set forth in paragraph 1.E.1
with active links or immediate access to the full terms of the
Project Gutenberg™ License.

1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if
you provide access to or distribute copies of a Project
Gutenberg™ work in a format other than “Plain Vanilla ASCII” or
other format used in the official version posted on the official
Project Gutenberg™ website (www.gutenberg.org), you must,
at no additional cost, fee or expense to the user, provide a copy,
a means of exporting a copy, or a means of obtaining a copy
upon request, of the work in its original “Plain Vanilla ASCII” or
other form. Any alternate format must include the full Project
Gutenberg™ License as specified in paragraph 1.E.1.

1.E.7. Do not charge a fee for access to, viewing, displaying,


performing, copying or distributing any Project Gutenberg™
works unless you comply with paragraph 1.E.8 or 1.E.9.

1.E.8. You may charge a reasonable fee for copies of or


providing access to or distributing Project Gutenberg™
electronic works provided that:

• You pay a royalty fee of 20% of the gross profits you derive
from the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”

• You provide a full refund of any money paid by a user who


notifies you in writing (or by e-mail) within 30 days of receipt
that s/he does not agree to the terms of the full Project
Gutenberg™ License. You must require such a user to return or
destroy all copies of the works possessed in a physical medium
and discontinue all use of and all access to other copies of
Project Gutenberg™ works.

• You provide, in accordance with paragraph 1.F.3, a full refund of


any money paid for a work or a replacement copy, if a defect in
the electronic work is discovered and reported to you within 90
days of receipt of the work.

• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.

1.E.9. If you wish to charge a fee or distribute a Project


Gutenberg™ electronic work or group of works on different
terms than are set forth in this agreement, you must obtain
permission in writing from the Project Gutenberg Literary
Archive Foundation, the manager of the Project Gutenberg™
trademark. Contact the Foundation as set forth in Section 3
below.

1.F.

1.F.1. Project Gutenberg volunteers and employees expend


considerable effort to identify, do copyright research on,
transcribe and proofread works not protected by U.S. copyright
law in creating the Project Gutenberg™ collection. Despite these
efforts, Project Gutenberg™ electronic works, and the medium
on which they may be stored, may contain “Defects,” such as,
but not limited to, incomplete, inaccurate or corrupt data,
transcription errors, a copyright or other intellectual property
infringement, a defective or damaged disk or other medium, a
computer virus, or computer codes that damage or cannot be
read by your equipment.

1.F.2. LIMITED WARRANTY, DISCLAIMER OF DAMAGES - Except


for the “Right of Replacement or Refund” described in
paragraph 1.F.3, the Project Gutenberg Literary Archive
Foundation, the owner of the Project Gutenberg™ trademark,
and any other party distributing a Project Gutenberg™ electronic
work under this agreement, disclaim all liability to you for
damages, costs and expenses, including legal fees. YOU AGREE
THAT YOU HAVE NO REMEDIES FOR NEGLIGENCE, STRICT
LIABILITY, BREACH OF WARRANTY OR BREACH OF CONTRACT
EXCEPT THOSE PROVIDED IN PARAGRAPH 1.F.3. YOU AGREE
THAT THE FOUNDATION, THE TRADEMARK OWNER, AND ANY
DISTRIBUTOR UNDER THIS AGREEMENT WILL NOT BE LIABLE
TO YOU FOR ACTUAL, DIRECT, INDIRECT, CONSEQUENTIAL,
PUNITIVE OR INCIDENTAL DAMAGES EVEN IF YOU GIVE
NOTICE OF THE POSSIBILITY OF SUCH DAMAGE.

1.F.3. LIMITED RIGHT OF REPLACEMENT OR REFUND - If you


discover a defect in this electronic work within 90 days of
receiving it, you can receive a refund of the money (if any) you
paid for it by sending a written explanation to the person you
received the work from. If you received the work on a physical
medium, you must return the medium with your written
explanation. The person or entity that provided you with the
defective work may elect to provide a replacement copy in lieu
of a refund. If you received the work electronically, the person
or entity providing it to you may choose to give you a second
opportunity to receive the work electronically in lieu of a refund.
If the second copy is also defective, you may demand a refund
in writing without further opportunities to fix the problem.

1.F.4. Except for the limited right of replacement or refund set


forth in paragraph 1.F.3, this work is provided to you ‘AS-IS’,
WITH NO OTHER WARRANTIES OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR ANY PURPOSE.

1.F.5. Some states do not allow disclaimers of certain implied


warranties or the exclusion or limitation of certain types of
damages. If any disclaimer or limitation set forth in this
agreement violates the law of the state applicable to this
agreement, the agreement shall be interpreted to make the
maximum disclaimer or limitation permitted by the applicable
state law. The invalidity or unenforceability of any provision of
this agreement shall not void the remaining provisions.

1.F.6. INDEMNITY - You agree to indemnify and hold the


Foundation, the trademark owner, any agent or employee of the
Foundation, anyone providing copies of Project Gutenberg™
electronic works in accordance with this agreement, and any
volunteers associated with the production, promotion and
distribution of Project Gutenberg™ electronic works, harmless
from all liability, costs and expenses, including legal fees, that
arise directly or indirectly from any of the following which you
do or cause to occur: (a) distribution of this or any Project
Gutenberg™ work, (b) alteration, modification, or additions or
deletions to any Project Gutenberg™ work, and (c) any Defect
you cause.

Section 2. Information about the Mission


of Project Gutenberg™
Project Gutenberg™ is synonymous with the free distribution of
electronic works in formats readable by the widest variety of
computers including obsolete, old, middle-aged and new
computers. It exists because of the efforts of hundreds of
volunteers and donations from people in all walks of life.

Volunteers and financial support to provide volunteers with the


assistance they need are critical to reaching Project
Gutenberg™’s goals and ensuring that the Project Gutenberg™
collection will remain freely available for generations to come. In
2001, the Project Gutenberg Literary Archive Foundation was
created to provide a secure and permanent future for Project
Gutenberg™ and future generations. To learn more about the
Project Gutenberg Literary Archive Foundation and how your
efforts and donations can help, see Sections 3 and 4 and the
Foundation information page at www.gutenberg.org.

Section 3. Information about the Project


Gutenberg Literary Archive Foundation
The Project Gutenberg Literary Archive Foundation is a non-
profit 501(c)(3) educational corporation organized under the
laws of the state of Mississippi and granted tax exempt status
by the Internal Revenue Service. The Foundation’s EIN or
federal tax identification number is 64-6221541. Contributions
to the Project Gutenberg Literary Archive Foundation are tax
deductible to the full extent permitted by U.S. federal laws and
your state’s laws.

The Foundation’s business office is located at 809 North 1500


West, Salt Lake City, UT 84116, (801) 596-1887. Email contact
links and up to date contact information can be found at the
Foundation’s website and official page at
www.gutenberg.org/contact
Section 4. Information about Donations to
the Project Gutenberg Literary Archive
Foundation
Project Gutenberg™ depends upon and cannot survive without
widespread public support and donations to carry out its mission
of increasing the number of public domain and licensed works
that can be freely distributed in machine-readable form
accessible by the widest array of equipment including outdated
equipment. Many small donations ($1 to $5,000) are particularly
important to maintaining tax exempt status with the IRS.

The Foundation is committed to complying with the laws


regulating charities and charitable donations in all 50 states of
the United States. Compliance requirements are not uniform
and it takes a considerable effort, much paperwork and many
fees to meet and keep up with these requirements. We do not
solicit donations in locations where we have not received written
confirmation of compliance. To SEND DONATIONS or determine
the status of compliance for any particular state visit
www.gutenberg.org/donate.

While we cannot and do not solicit contributions from states


where we have not met the solicitation requirements, we know
of no prohibition against accepting unsolicited donations from
donors in such states who approach us with offers to donate.

International donations are gratefully accepted, but we cannot


make any statements concerning tax treatment of donations
received from outside the United States. U.S. laws alone swamp
our small staff.

Please check the Project Gutenberg web pages for current


donation methods and addresses. Donations are accepted in a
number of other ways including checks, online payments and
credit card donations. To donate, please visit:
www.gutenberg.org/donate.

Section 5. General Information About


Project Gutenberg™ electronic works
Professor Michael S. Hart was the originator of the Project
Gutenberg™ concept of a library of electronic works that could
be freely shared with anyone. For forty years, he produced and
distributed Project Gutenberg™ eBooks with only a loose
network of volunteer support.

Project Gutenberg™ eBooks are often created from several


printed editions, all of which are confirmed as not protected by
copyright in the U.S. unless a copyright notice is included. Thus,
we do not necessarily keep eBooks in compliance with any
particular paper edition.

Most people start at our website which has the main PG search
facility: www.gutenberg.org.

This website includes information about Project Gutenberg™,


including how to make donations to the Project Gutenberg
Literary Archive Foundation, how to help produce our new
eBooks, and how to subscribe to our email newsletter to hear
about new eBooks.
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookultra.com

You might also like