100% found this document useful (1 vote)
80 views

Java Programming 8th Edition Joyce Farrell instant download

Ebook download

Uploaded by

yeyetkejs
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 (1 vote)
80 views

Java Programming 8th Edition Joyce Farrell instant download

Ebook download

Uploaded by

yeyetkejs
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/ 47

Java Programming 8th Edition Joyce Farrell

download

https://ebookultra.com/download/java-programming-8th-edition-
joyce-farrell/

Explore and download more ebooks or textbooks


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

Java Programming 7th Edition Joyce Farrell

https://ebookultra.com/download/java-programming-7th-edition-joyce-
farrell/

Programming Logic and Design Comprehensive 6th Edition


Joyce Farrell

https://ebookultra.com/download/programming-logic-and-design-
comprehensive-6th-edition-joyce-farrell/

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/

Computer programming for teens 1st Edition Mary E. Farrell

https://ebookultra.com/download/computer-programming-for-teens-1st-
edition-mary-e-farrell/
Advanced Java Game Programming Wallace Croft

https://ebookultra.com/download/advanced-java-game-programming-
wallace-croft/

Core Java Volume 1 Fundamentals 8th ed Edition Horstmann

https://ebookultra.com/download/core-java-volume-1-fundamentals-8th-
ed-edition-horstmann/

Java Programming 10 Minute Solutions 1st Edition Mark


Watson

https://ebookultra.com/download/java-programming-10-minute-
solutions-1st-edition-mark-watson/

Killer Game Programming in Java 1st Edition Andrew Davison

https://ebookultra.com/download/killer-game-programming-in-java-1st-
edition-andrew-davison/

Introduction to Programming with Java 3rd Edition John


Dean

https://ebookultra.com/download/introduction-to-programming-with-
java-3rd-edition-john-dean/
Java Programming 8th Edition Joyce Farrell Digital
Instant Download
Author(s): Joyce Farrell
ISBN(s): 9781285856919, 1285856910
Edition: 8th
File Details: PDF, 15.03 MB
Year: 2016
Language: english
EIGHTH EDITION

JAVA PROGRAMMING

JOYCE FARRELL
Java Programming,
Eighth Edition
Joyce Farrell

© 2016, 2014, 2012 Cengage Learning


WCN: 02-200-203

Library of Congress Control Number: 2014956152


ISBN: 978-1-285-85691-9
Cengage Learning
20 Channel Center Street
Boston, MA 02210
USA

Printed in the U nited States of America


Print N umber: 01 Print Year: 2015
Brief Contents
Preface . . . . . . . . . . . . . . . . . . . . . . xxi
CHAPTER 1 Creating Java Programs . . . . . . . . . . . . . . . . 1
CHAPTER 2 Using Data . . . . . . . . . . . . . . . . . . . . . 53
CHAPTER 3 Using Methods, Classes, and Objects . . . . . . . 119
CHAPTER 4 More Object Concepts . . . . . . . . . . . . . . . 183
CHAPTER 5 Making Decisions . . . . . . . . . . . . . . . . . 245
CHAPTER 6 Looping . . . . . . . . . . . . . . . . . . . . . 301
CHAPTER 7 Characters, Strings, and the StringBuilder . . . 353
CHAPTER 8 Arrays . . . . . . . . . . . . . . . . . . . . . . 393
CHAPTER 9 Advanced Array Concepts . . . . . . . . . . . . . 439
CHAPTER 10 Introduction to Inheritance . . . . . . . . . . . . . 491
CHAPTER 11 Advanced Inheritance Concepts . . . . . . . . . . 537
CHAPTER 12 Exception Handling . . . . . . . . . . . . . . . . 593
CHAPTER 13 File Input and Output . . . . . . . . . . . . . . . 665
CHAPTER 14 Introduction to Swing Components . . . . . . . . 729
CHAPTER 15 Advanced GUI Topics . . . . . . . . . . . . . . . 791
CHAPTER 16 Graphics . . . . . . . . . . . . . . . . . . . . . 861
APPENDIX A Working with the Java Platform . . . . . . . . . . . 919
APPENDIX B Data Representation . . . . . . . . . . . . . . . 925
APPENDIX C Formatting Output . . . . . . . . . . . . . . . . 931
APPENDIX D Generating Random Numbers . . . . . . . . . . . 941
APPENDIX E Javadoc . . . . . . . . . . . . . . . . . . . . . 949
Glossary . . . . . . . . . . . . . . . . . . . . 957
Index . . . . . . . . . . . . . . . . . . . . . . 979
Contents
Preface . . . . . . . . . . . . . . . . . . xxi

CHAPT ER 1 Creating Java Programs . . . . . . . . . . . 1


Learning Programming Terminology . . . . . . . . . . . . . . 2
Comparing Procedural and Object-Oriented
Programming Concepts . . . . . . . . . . . . . . . . . . 6
Procedural Programming . . . . . . . . . . . . . . . . . . 6
Object-Oriented Programming . . . . . . . . . . . . . . . . 6
Understanding Classes, Objects, and Encapsulation . . . . . . 7
Understanding Inheritance and Polymorphism . . . . . . . . . 9
Features of the Java Programming Language . . . . . . . . . . 11
Java Program Types . . . . . . . . . . . . . . . . . . . . 12
Analyzing a Java Application that Produces Console Output . . . . 13
Understanding the Statement that Produces the Output . . . . . 14
Understanding the First Class . . . . . . . . . . . . . . . 15
Indent Style . . . . . . . . . . . . . . . . . . . . . . . 18
Understanding the main() Method . . . . . . . . . . . . . 19
Saving a Java Class . . . . . . . . . . . . . . . . . . . . 21
Compiling a Java Class and Correcting Syntax Errors . . . . . . . 23
Compiling a Java Class . . . . . . . . . . . . . . . . . . . 23
Correcting Syntax Errors . . . . . . . . . . . . . . . . . . 24
Running a Java Application and Correcting Logic Errors . . . . . . 29
Running a Java Application . . . . . . . . . . . . . . . . . 29
Modifying a Compiled Java Class . . . . . . . . . . . . . . 30
Correcting Logic Errors . . . . . . . . . . . . . . . . . . 31
Adding Comments to a Java Class . . . . . . . . . . . . . . . 32
Creating a Java Application that Produces GUI Output . . . . . . 35
Finding Help . . . . . . . . . . . . . . . . . . . . . . . . 38
Don’t Do It . . . . . . . . . . . . . . . . . . . . . . . . . 39
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . 41
Chapter Summary . . . . . . . . . . . . . . . . . . . . . . 45
Review Questions . . . . . . . . . . . . . . . . . . . . . . 46
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . 48
Programming Exercises . . . . . . . . . . . . . . . . . . 48
Debugging Exercises . . . . . . . . . . . . . . . . . . . 50
Game Zone . . . . . . . . . . . . . . . . . . . . . . . . 50
Case Problems . . . . . . . . . . . . . . . . . . . . . . 51

CHAPT ER 2 Using Data . . . . . . . . . . . . . . . . . 53


Declaring and Using Constants and Variables . . . . . . . . . . 54
Declaring Variables . . . . . . . . . . . . . . . . . . . . 55
Declaring Named Constants . . . . . . . . . . . . . . . . 56
The Scope of Variables and Constants . . . . . . . . . . . . 58
Concatenating Strings to Variables and Constants . . . . . . . 58
Pitfall: Forgetting that a Variable Holds
One Value at a Time . . . . . . . . . . . . . . . . . . . 60
Learning About Integer Data Types . . . . . . . . . . . . . . 64
Using the boolean Data Type . . . . . . . . . . . . . . . . . 70
Learning About Floating-Point Data Types . . . . . . . . . . . . 71
Using the char Data Type . . . . . . . . . . . . . . . . . . 72
Using the Scanner Class to Accept Keyboard Input . . . . . . . 78
Pitfall: Using nextLine() Following One of the
Other Scanner Input Methods . . . . . . . . . . . . . . 81
Using the JOptionPane Class to Accept GUI Input . . . . . . . 87
Using Input Dialog Boxes . . . . . . . . . . . . . . . . . . 87
Using Confirm Dialog Boxes . . . . . . . . . . . . . . . . 91
Performing Arithmetic . . . . . . . . . . . . . . . . . . . . 93
Associativity and Precedence . . . . . . . . . . . . . . . . 95
Writing Arithmetic Statements Efficiently . . . . . . . . . . . 96
Pitfall: Not Understanding Imprecision
in Floating-Point Numbers . . . . . . . . . . . . . . . . 96
Understanding Type Conversion . . . . . . . . . . . . . . . 101
Automatic Type Conversion . . . . . . . . . . . . . . . . 101
Explicit Type Conversions . . . . . . . . . . . . . . . . 102
Don’t Do It . . . . . . . . . . . . . . . . . . . . . . . . 106
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . 107
Chapter Summary . . . . . . . . . . . . . . . . . . . . . 111
Review Questions . . . . . . . . . . . . . . . . . . . . . 111
Exercises . . . . . . . . . . . . . . . . . . . . . . . . 114
Programming Exercises . . . . . . . . . . . . . . . . . 114
Debugging Exercises . . . . . . . . . . . . . . . . . . 116
Game Zone . . . . . . . . . . . . . . . . . . . . . . . 117
Case Problems . . . . . . . . . . . . . . . . . . . . . 118

CHAPT ER 3 Using Methods, Classes, and Objects . . . . 119


Understanding Method Calls and Placement . . . . . . . . . . 120
Understanding Method Construction . . . . . . . . . . . . . 123
Access Specifiers . . . . . . . . . . . . . . . . . . . . 123
Return Type . . . . . . . . . . . . . . . . . . . . . . 124
Method Name . . . . . . . . . . . . . . . . . . . . . 125
Parentheses . . . . . . . . . . . . . . . . . . . . . . 125
Adding Parameters to Methods . . . . . . . . . . . . . . . 129
Creating a Method that Receives a Single Parameter . . . . . 130
Creating a Method that Requires Multiple Parameters . . . . . 133
Creating Methods that Return Values . . . . . . . . . . . . . 136
Chaining Method Calls . . . . . . . . . . . . . . . . . . 138
Learning About Classes and Objects . . . . . . . . . . . . . 142
Creating a Class . . . . . . . . . . . . . . . . . . . . . 145
Creating Instance Methods in a Class . . . . . . . . . . . . 147
Organizing Classes . . . . . . . . . . . . . . . . . . . 150
Declaring Objects and Using their Methods . . . . . . . . . . 154
Understanding Data Hiding . . . . . . . . . . . . . . . . 156
An Introduction to Using Constructors . . . . . . . . . . . . 159
Understanding that Classes Are Data Types . . . . . . . . . . 163
Don’t Do It . . . . . . . . . . . . . . . . . . . . . . . . 168
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . 168
Chapter Summary . . . . . . . . . . . . . . . . . . . . . 170
Review Questions . . . . . . . . . . . . . . . . . . . . . 171
Exercises . . . . . . . . . . . . . . . . . . . . . . . . 174
Programming Exercises . . . . . . . . . . . . . . . . . 174
Debugging Exercises . . . . . . . . . . . . . . . . . . 177
Game Zone . . . . . . . . . . . . . . . . . . . . . . . 178
Case Problems . . . . . . . . . . . . . . . . . . . . . 179
CHAPT ER 4 More Object Concepts . . . . . . . . . . . 183
Understanding Blocks and Scope . . . . . . . . . . . . . . 184
Overloading a Method . . . . . . . . . . . . . . . . . . . 192
Automatic Type Promotion in Method Calls . . . . . . . . . 194
Learning About Ambiguity . . . . . . . . . . . . . . . . . 199
Creating and Calling Constructors with Parameters . . . . . . . 200
Overloading Constructors . . . . . . . . . . . . . . . . 201
Learning About the this Reference . . . . . . . . . . . . . 205
Using the this Reference to Make Overloaded Constructors
More Efficient . . . . . . . . . . . . . . . . . . . . . 209
Using static Fields . . . . . . . . . . . . . . . . . . . 213
Using Constant Fields . . . . . . . . . . . . . . . . . . 215
Using Automatically Imported, Prewritten Constants
and Methods . . . . . . . . . . . . . . . . . . . . . . 220
The Math Class . . . . . . . . . . . . . . . . . . . . 221
Importing Classes that Are Not Imported Automatically . . . . 223
Using the LocalDate Class . . . . . . . . . . . . . . . 224
Understanding Composition and Nested Classes . . . . . . . . 230
Composition . . . . . . . . . . . . . . . . . . . . . . 230
Nested Classes . . . . . . . . . . . . . . . . . . . . . 232
Don’t Do It . . . . . . . . . . . . . . . . . . . . . . . . 234
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . 234
Chapter Summary . . . . . . . . . . . . . . . . . . . . . 236
Review Questions . . . . . . . . . . . . . . . . . . . . . 236
Exercises . . . . . . . . . . . . . . . . . . . . . . . . 239
Programming Exercises . . . . . . . . . . . . . . . . . 239
Debugging Exercises . . . . . . . . . . . . . . . . . . 242
Game Zone . . . . . . . . . . . . . . . . . . . . . . . 242
Case Problems . . . . . . . . . . . . . . . . . . . . . 243

CHAPT ER 5 Making Decisions . . . . . . . . . . . . . 245


Planning Decision-Making Logic . . . . . . . . . . . . . . . 246
The if and if…else Statements . . . . . . . . . . . . . . 248
The if Statement . . . . . . . . . . . . . . . . . . . . 248
Pitfall: Misplacing a Semicolon in an if Statement . . . . . . 249
Pitfall: Using the Assignment Operator Instead
of the Equivalency Operator . . . . . . . . . . . . . . 250
Pitfall: Attempting to Compare Objects
Using the Relational Operators . . . . . . . . . . . . . 251
The if…else Statement . . . . . . . . . . . . . . . . . 251
Using Multiple Statements in if and if…else Clauses . . . . 254
Nesting if and if…else Statements . . . . . . . . . . . . 260
Using Logical AND and OR Operators . . . . . . . . . . . . 263
The AND Operator . . . . . . . . . . . . . . . . . . . . 263
The OR Operator . . . . . . . . . . . . . . . . . . . . 265
Short-Circuit Evaluation . . . . . . . . . . . . . . . . . . 266
Making Accurate and Efficient Decisions . . . . . . . . . . . 269
Making Accurate Range Checks . . . . . . . . . . . . . . 270
Making Efficient Range Checks . . . . . . . . . . . . . . 272
Using && and || Appropriately . . . . . . . . . . . . . . 273
Using the switch Statement . . . . . . . . . . . . . . . . 274
Using the Conditional and NOT Operators . . . . . . . . . . . 280
Using the NOT Operator . . . . . . . . . . . . . . . . . 281
Understanding Operator Precedence . . . . . . . . . . . . . 282
Adding Decisions and Constructors
to Instance Methods . . . . . . . . . . . . . . . . . . . 285
Don’t Do It . . . . . . . . . . . . . . . . . . . . . . . . 289
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . 289
Chapter Summary . . . . . . . . . . . . . . . . . . . . . 291
Review Questions . . . . . . . . . . . . . . . . . . . . . 291
Exercises . . . . . . . . . . . . . . . . . . . . . . . . 294
Programming Exercises . . . . . . . . . . . . . . . . . 294
Debugging Exercises . . . . . . . . . . . . . . . . . . 297
Game Zone . . . . . . . . . . . . . . . . . . . . . . . 297
Case Problems . . . . . . . . . . . . . . . . . . . . . 299

CHAPT ER 6 Looping . . . . . . . . . . . . . . . . . 301


Learning About the Loop Structure . . . . . . . . . . . . . . 302
Creating while Loops . . . . . . . . . . . . . . . . . . 303
Writing a Definite while Loop . . . . . . . . . . . . . . 303
Pitfall: Failing to Alter the Loop Control Variable
Within the Loop Body . . . . . . . . . . . . . . . . . 305
Pitfall: Unintentionally Creating a Loop with
an Empty Body . . . . . . . . . . . . . . . . . . . . 306
Altering a Definite Loop’s Control Variable . . . . . . . . . . 307
Writing an Indefinite while Loop . . . . . . . . . . . . . 308
Validating Data . . . . . . . . . . . . . . . . . . . . . 310
Using Shortcut Arithmetic Operators . . . . . . . . . . . . . 314
Creating a for Loop . . . . . . . . . . . . . . . . . . . 319
Unconventional for Loops . . . . . . . . . . . . . . . . 320
Learning How and When to Use a do…while Loop . . . . . . 325
Learning About Nested Loops . . . . . . . . . . . . . . . . 328
Improving Loop Performance . . . . . . . . . . . . . . . . 333
Avoiding Unnecessary Operations . . . . . . . . . . . . . 333
Considering the Order of Evaluation of Short-Circuit
Operators . . . . . . . . . . . . . . . . . . . . . . 334
Comparing to Zero . . . . . . . . . . . . . . . . . . . 334
Employing Loop Fusion . . . . . . . . . . . . . . . . . . 336
Using Prefix Incrementing Rather than Postfix
Incrementing . . . . . . . . . . . . . . . . . . . . . 337
A Final Note on Improving Loop Performance . . . . . . . . 338
Don’t Do It . . . . . . . . . . . . . . . . . . . . . . . . 342
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . 342
Chapter Summary . . . . . . . . . . . . . . . . . . . . . 344
Review Questions . . . . . . . . . . . . . . . . . . . . . 344
Exercises . . . . . . . . . . . . . . . . . . . . . . . . 347
Programming Exercises . . . . . . . . . . . . . . . . . 347
Debugging Exercises . . . . . . . . . . . . . . . . . . 350
Game Zone . . . . . . . . . . . . . . . . . . . . . . . 350
Case Problems . . . . . . . . . . . . . . . . . . . . . 352

CHAPT ER 7 Characters, Strings, and


the StringBuilder . . . . . . . . . . . . 353
Understanding String Data Problems . . . . . . . . . . . . . 354
Using Character Class Methods . . . . . . . . . . . . . . 355
Declaring and Comparing String Objects . . . . . . . . . . 359
Comparing String Values . . . . . . . . . . . . . . . . 359
Empty and null Strings . . . . . . . . . . . . . . . . . 363
Using Other String Methods . . . . . . . . . . . . . . . 365
Converting String Objects to Numbers . . . . . . . . . . 369
Learning About the StringBuilder
and StringBuffer Classes . . . . . . . . . . . . . . 374
Don’t Do It . . . . . . . . . . . . . . . . . . . . . . . . 381
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . 382
Chapter Summary . . . . . . . . . . . . . . . . . . . . . 382
Review Questions . . . . . . . . . . . . . . . . . . . . . 383
Exercises . . . . . . . . . . . . . . . . . . . . . . . . 385
Programming Exercises . . . . . . . . . . . . . . . . . 385
Debugging Exercises . . . . . . . . . . . . . . . . . . 388
Game Zone . . . . . . . . . . . . . . . . . . . . . . . 388
Case Problems . . . . . . . . . . . . . . . . . . . . . 391

CHAPT ER 8 Arrays . . . . . . . . . . . . . . . . . . 393


Declaring Arrays . . . . . . . . . . . . . . . . . . . . . 394
Initializing an Array . . . . . . . . . . . . . . . . . . . . 399
Using Variable Subscripts with an Array . . . . . . . . . . . . 402
Using the Enhanced for Loop . . . . . . . . . . . . . . 403
Using Part of an Array . . . . . . . . . . . . . . . . . . 404
Declaring and Using Arrays of Objects . . . . . . . . . . . . 406
Using the Enhanced for Loop with Objects . . . . . . . . . 408
Manipulating Arrays of Strings . . . . . . . . . . . . . 408
Searching an Array and Using Parallel Arrays . . . . . . . . . 414
Using Parallel Arrays . . . . . . . . . . . . . . . . . . . 415
Searching an Array for a Range Match . . . . . . . . . . . 418
Passing Arrays to and Returning Arrays from Methods . . . . . 422
Returning an Array from a Method . . . . . . . . . . . . . 426
Don’t Do It . . . . . . . . . . . . . . . . . . . . . . . . 428
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . 428
Chapter Summary . . . . . . . . . . . . . . . . . . . . . 429
Review Questions . . . . . . . . . . . . . . . . . . . . . 430
Exercises . . . . . . . . . . . . . . . . . . . . . . . . 433
Programming Exercises . . . . . . . . . . . . . . . . . 433
Debugging Exercises . . . . . . . . . . . . . . . . . . 435
Game Zone . . . . . . . . . . . . . . . . . . . . . . . 435
Case Problems . . . . . . . . . . . . . . . . . . . . . 438
CHAPT ER 9 Advanced Array Concepts . . . . . . . . . 439
Sorting Array Elements Using the Bubble Sort Algorithm . . . . 440
Using the Bubble Sort Algorithm . . . . . . . . . . . . . . 440
Improving Bubble Sort Efficiency . . . . . . . . . . . . . 442
Sorting Arrays of Objects . . . . . . . . . . . . . . . . . 443
Sorting Array Elements Using the Insertion Sort Algorithm . . . . 448
Using Two-Dimensional and Other Multidimensional Arrays . . . . 452
Passing a Two-Dimensional Array to a Method . . . . . . . . 454
Using the length Field with a Two-Dimensional Array . . . . 455
Understanding Ragged Arrays . . . . . . . . . . . . . . . 456
Using Other Multidimensional Arrays . . . . . . . . . . . . 456
Using the Arrays Class . . . . . . . . . . . . . . . . . . 459
Using the ArrayList Class . . . . . . . . . . . . . . . . 467
Creating Enumerations . . . . . . . . . . . . . . . . . . . 472
Don’t Do It . . . . . . . . . . . . . . . . . . . . . . . . 479
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . 479
Chapter Summary . . . . . . . . . . . . . . . . . . . . . 480
Review Questions . . . . . . . . . . . . . . . . . . . . . 481
Exercises . . . . . . . . . . . . . . . . . . . . . . . . 484
Programming Exercises . . . . . . . . . . . . . . . . . 484
Debugging Exercises . . . . . . . . . . . . . . . . . . 486
Game Zone . . . . . . . . . . . . . . . . . . . . . . . 487
Case Problems . . . . . . . . . . . . . . . . . . . . . 490

CHAPT ER 10 Introduction to Inheritance . . . . . . . . . 491


Learning About the Concept of Inheritance . . . . . . . . . . 492
Diagramming Inheritance Using the UML . . . . . . . . . . 492
Inheritance Terminology . . . . . . . . . . . . . . . . . 495
Extending Classes . . . . . . . . . . . . . . . . . . . . . 496
Overriding Superclass Methods . . . . . . . . . . . . . . . 502
Using the @Override Tag . . . . . . . . . . . . . . . . 504
Calling Constructors During Inheritance . . . . . . . . . . . . 507
Using Superclass Constructors that
Require Arguments . . . . . . . . . . . . . . . . . . 508
Accessing Superclass Methods . . . . . . . . . . . . . . . 513
Comparing this and super . . . . . . . . . . . . . . . 515
Employing Information Hiding . . . . . . . . . . . . . . . . 516
Methods You Cannot Override . . . . . . . . . . . . . . . . 518
A Subclass Cannot Override static Methods in
Its Superclass . . . . . . . . . . . . . . . . . . . . 518
A Subclass Cannot Override final Methods in
Its Superclass . . . . . . . . . . . . . . . . . . . . 522
A Subclass Cannot Override Methods
in a final Superclass . . . . . . . . . . . . . . . . 523
Don’t Do It . . . . . . . . . . . . . . . . . . . . . . . . 525
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . 525
Chapter Summary . . . . . . . . . . . . . . . . . . . . . 526
Review Questions . . . . . . . . . . . . . . . . . . . . . 527
Exercises . . . . . . . . . . . . . . . . . . . . . . . . 530
Programming Exercises . . . . . . . . . . . . . . . . . 530
Debugging Exercises . . . . . . . . . . . . . . . . . . 533
Game Zone . . . . . . . . . . . . . . . . . . . . . . . 534
Case Problems . . . . . . . . . . . . . . . . . . . . . 535

CHAPT ER 11 Advanced Inheritance Concepts . . . . . . . 537


Creating and Using Abstract Classes . . . . . . . . . . . . . 538
Using Dynamic Method Binding . . . . . . . . . . . . . . . 547
Using a Superclass as a Method Parameter Type . . . . . . 549
Creating Arrays of Subclass Objects . . . . . . . . . . . . . 551
Using the Object Class and Its Methods . . . . . . . . . . . 554
Using the toString() Method . . . . . . . . . . . . . 556
Using the equals() Method . . . . . . . . . . . . . . . 559
Using Inheritance to Achieve Good Software Design . . . . . . 564
Creating and Using Interfaces . . . . . . . . . . . . . . . . 565
Creating Interfaces to Store Related Constants . . . . . . . 570
Creating and Using Packages . . . . . . . . . . . . . . . . 574
Don’t Do It . . . . . . . . . . . . . . . . . . . . . . . . 580
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . 580
Chapter Summary . . . . . . . . . . . . . . . . . . . . . 581
Review Questions . . . . . . . . . . . . . . . . . . . . . 582
Exercises . . . . . . . . . . . . . . . . . . . . . . . . 585
Programming Exercises . . . . . . . . . . . . . . . . . 585
Debugging Exercises . . . . . . . . . . . . . . . . . . 589
Game Zone . . . . . . . . . . . . . . . . . . . . . . . 590
Case Problems . . . . . . . . . . . . . . . . . . . . . 590
CHAPT ER 12 Exception Handling . . . . . . . . . . . . 593
Learning About Exceptions . . . . . . . . . . . . . . . . . 594
Trying Code and Catching Exceptions . . . . . . . . . . . . 599
Using a try Block to Make Programs “Foolproof” . . . . . . 604
Declaring and Initializing Variables in try…catch Blocks . . . 606
Throwing and Catching Multiple Exceptions . . . . . . . . . . 609
Using the finally Block . . . . . . . . . . . . . . . . . 615
Understanding the Advantages of Exception Handling . . . . . . 618
Specifying the Exceptions that a Method Can Throw . . . . . . 621
Tracing Exceptions Through the Call Stack . . . . . . . . . . 626
Creating Your Own Exception Classes . . . . . . . . . . . 630
Using Assertions . . . . . . . . . . . . . . . . . . . . . 634
Displaying the Virtual Keyboard . . . . . . . . . . . . . . . 650
Don’t Do It . . . . . . . . . . . . . . . . . . . . . . . . 653
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . 654
Chapter Summary . . . . . . . . . . . . . . . . . . . . . 655
Review Questions . . . . . . . . . . . . . . . . . . . . . 656
Exercises . . . . . . . . . . . . . . . . . . . . . . . . 659
Programming Exercises . . . . . . . . . . . . . . . . . 659
Debugging Exercises . . . . . . . . . . . . . . . . . . 662
Game Zone . . . . . . . . . . . . . . . . . . . . . . . 662
Case Problems . . . . . . . . . . . . . . . . . . . . . 663

CHAPT ER 13 File Input and Output . . . . . . . . . . . . 665


Understanding Computer Files . . . . . . . . . . . . . . . 666
Using the Path and Files Classes . . . . . . . . . . . . . 667
Creating a Path . . . . . . . . . . . . . . . . . . . . . 668
Retrieving Information About a Path . . . . . . . . . . . . 669
Converting a Relative Path to an Absolute One . . . . . . . . 670
Checking File Accessibility . . . . . . . . . . . . . . . . 671
Deleting a Path . . . . . . . . . . . . . . . . . . . . . 673
Determining File Attributes . . . . . . . . . . . . . . . . 674
File Organization, Streams, and Buffers . . . . . . . . . . . . 678
Using Java’s IO Classes . . . . . . . . . . . . . . . . . . 680
Writing to a File . . . . . . . . . . . . . . . . . . . . . 683
Reading from a File . . . . . . . . . . . . . . . . . . . 685
Creating and Using Sequential Data Files . . . . . . . . . . . 687
Learning About Random Access Files . . . . . . . . . . . . 693
Writing Records to a Random Access Data File . . . . . . . . 697
Reading Records from a Random Access Data File . . . . . . . 704
Accessing a Random Access File Sequentially . . . . . . . . 704
Accessing a Random Access File Randomly . . . . . . . . . 705
Don’t Do It . . . . . . . . . . . . . . . . . . . . . . . . 719
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . 719
Chapter Summary . . . . . . . . . . . . . . . . . . . . . 720
Review Questions . . . . . . . . . . . . . . . . . . . . . 721
Exercises . . . . . . . . . . . . . . . . . . . . . . . . 724
Programming Exercises . . . . . . . . . . . . . . . . . 724
Debugging Exercises . . . . . . . . . . . . . . . . . . 726
Game Zone . . . . . . . . . . . . . . . . . . . . . . . 727
Case Problems . . . . . . . . . . . . . . . . . . . . . 727

CHAPT ER 14 Introduction to Swing Components . . . . . 729


Understanding Swing Components . . . . . . . . . . . . . 730
Using the JFrame Class . . . . . . . . . . . . . . . . . . 731
Customizing a JFrame’s Appearance . . . . . . . . . . . 734
Using the JLabel Class . . . . . . . . . . . . . . . . . . 738
Changing a JLabel’s Font . . . . . . . . . . . . . . . . 740
Using a Layout Manager . . . . . . . . . . . . . . . . . . 743
Extending the JFrame Class . . . . . . . . . . . . . . . . 746
Adding JTextFields, JButtons, and Tool Tips to a
JFrame . . . . . . . . . . . . . . . . . . . . . . . . 748
Adding JTextFields . . . . . . . . . . . . . . . . . . 748
Adding JButtons . . . . . . . . . . . . . . . . . . . 750
Using Tool Tips . . . . . . . . . . . . . . . . . . . . . 752
Learning About Event-Driven Programming . . . . . . . . . . 755
Preparing Your Class to Accept Event Messages . . . . . . . 756
Telling Your Class to Expect Events to Happen . . . . . . . 757
Telling Your Class How to Respond to Events . . . . . . . . 757
An Event-Driven Program . . . . . . . . . . . . . . . . . 757
Using Multiple Event Sources . . . . . . . . . . . . . . . 759
Using the setEnabled() Method . . . . . . . . . . . . 761
Understanding Swing Event Listeners . . . . . . . . . . . . 764
Using the JCheckBox, ButtonGroup, and JComboBox
Classes . . . . . . . . . . . . . . . . . . . . . . . . 767
The JCheckBox Class . . . . . . . . . . . . . . . . . 767
The ButtonGroup Class . . . . . . . . . . . . . . . . 771
The JComboBox Class . . . . . . . . . . . . . . . . . 772
Don’t Do It . . . . . . . . . . . . . . . . . . . . . . . . 780
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . 780
Chapter Summary . . . . . . . . . . . . . . . . . . . . . 781
Review Questions . . . . . . . . . . . . . . . . . . . . . 783
Exercises . . . . . . . . . . . . . . . . . . . . . . . . 785
Programming Exercises . . . . . . . . . . . . . . . . . 785
Debugging Exercises . . . . . . . . . . . . . . . . . . 787
Game Zone . . . . . . . . . . . . . . . . . . . . . . . 787
Case Problems . . . . . . . . . . . . . . . . . . . . . 788

CHAPT ER 15 Advanced GUI Topics . . . . . . . . . . . 791


Understanding the Content Pane . . . . . . . . . . . . . . 792
Using Color . . . . . . . . . . . . . . . . . . . . . . . 795
Learning More About Layout Managers . . . . . . . . . . . . 797
Using BorderLayout . . . . . . . . . . . . . . . . . 798
Using FlowLayout . . . . . . . . . . . . . . . . . . . 800
Using GridLayout . . . . . . . . . . . . . . . . . . . 802
Using CardLayout . . . . . . . . . . . . . . . . . . . 803
Using Advanced Layout Managers . . . . . . . . . . . . . 805
Using the JPanel Class . . . . . . . . . . . . . . . . . . 813
Creating JScrollPanes . . . . . . . . . . . . . . . . . 821
A Closer Look at Events and Event Handling . . . . . . . . . . 824
An Event-Handling Example: KeyListener . . . . . . . . 827
Using AWTEvent Class Methods . . . . . . . . . . . . . . 830
Understanding x- and y-Coordinates . . . . . . . . . . . . 832
Handling Mouse Events . . . . . . . . . . . . . . . . . . 832
Using Menus . . . . . . . . . . . . . . . . . . . . . . . 837
Using Specialized Menu Items . . . . . . . . . . . . . . . 841
Using addSeparator() . . . . . . . . . . . . . . . . 843
Using setMnemonic() . . . . . . . . . . . . . . . . . 843
Don’t Do It . . . . . . . . . . . . . . . . . . . . . . . . 848
Key Terms . . . . . . . . . . . . . . . . . . . . . . . . 849
Random documents with unrelated
content Scribd suggests to you:
His Lordship wishes us to make another attempt before sending to
Rome M. de Sainte-Catherine, who will be an admirable agent. God
will help us, daughter, but we must keep lowly and patient and let
ourselves be trampled under foot. His Lordship hopes that this new
petition, supported by our Rules and the testimonials, will settle the
matter. If the Archbishop thinks well to write a new letter of
recommendation, from himself, to this gentleman who is acting for
him, it is quite as it should be, so long as this gentleman acts in
unison with the Father Procurator of the Barnabites. But to ask him
to send these attestations to the house of Lyons would, I think, be
loss of time, as they have already been sent here. The Prince, on his
side, has heard that the matter is being taken up warmly. Ah! well,
we have done what we can, and the success of it we must leave to
the Providence of God and ask Him to guide and fashion this work
according to His holy will. I hope we shall have some news in a few
weeks.
His Lordship left us yesterday, and he asked me to send you his
apologies for not having written to you, but he will write from
Grenoble. He is absolutely overwhelmed with business. We spoke of
our vow of obedience, and he believes it to be pleasing to God. He
asked me how you bore that sharp mortification; but alas! I could
not tell him.
Yes, my dear daughter, we read the Catechism to the Sisters four
times a week,[B] and if any one wants to know over and above what
is in the book I check her, saying that she and I must submit our
understandings to what we read without questioning beyond, and
this I find does much good, for such as we are very ignorant.
Thank you a thousand times for the beautiful wax candles. They are
most acceptable, but one lasts for a whole year. We have never seen
the blessed grains of incense.
Please forward the packet from Dôle at once, and securely. There is
one from his Lordship from Paris. My darling, I am wholly yours and
salute you all.
This St. Catherine's Day.

[A] Madame de Thorens, the Saint's daughter.


[B] St. Jane Frances' insistence on the simple Catechism
instructions was peculiarly applicable to the time in which she
lived, for the Jansenist heresy, added to the errors of
Protestantism, gave rise to a subtle and questioning attitude of
mind, and women, misled by their masters in error, set
themselves up as Doctors in the new heretical schools of learning.
XXVI.
To Madame de la Fléchère.[A]
Vive ✠ Jésus!
Annecy, 1617.
Oh! may our most good and sweet Saviour be the strength and life
of your soul, which is dear to me in very truth beyond all others,
with, as you know, one exception, which does not bear comparison.
Ah! my Sister, let us by faithful obedience press forward, enlarging
our love for this all lovable Saviour. No, we have it not in our power
to render Him a service, we are of too small account for that, but in
the name of His Goodness let us do all we can to please Him,
depending on Him, and on His Providence, so that it may be our sole
support. I have no time to write, but I must send you this line to
content my own heart and to salute yours. Adieu, and good
morning, my Sister all dear to me.

[A] In writing to a mutual friend, M. Philippe de Quoex, St.


Francis de Sales says of Madame de la Fléchère: "With the
exception of Madame de Chantal I do not think that I have ever
met in any woman a soul stronger, a mind more reasonable, a
humility more sincere." Madame de la Fléchère lived at Rumilly,
and was a lifelong friend of St. Jane Frances, to whom she gave
her château for a Visitation foundation, which Convent her
daughter Françoise de la Fléchère in later years governed.
Madame de la Fléchère was received into the Order on her
deathbed.
There are no less than sixty letters extant from St. Francis de
Sales to Madame de la Fléchère.
XXVII.
To Sister Paule Jéronyme de
Monthoux,[A] Mistress of Novices at
Annecy.
Vive ✠ Jésus!
Grenoble, 1618.
I have received all your letters, my poor dear daughter; they came
in two sets and you have had replies to the first five, but I still have
four by me with questions to answer.
There is no doubt whatever that the novices should have recourse to
their Mistress in every matter, which the Rule says they are to treat
with her, and it is but fitting that they should be as exact as possible
on this point. Sister Assistant should give her instructions through
you: for to act otherwise would be very prejudicial to them.
Yes, you do well to tell me the more important things, but you do
wrong to call me a Saint. Take it to confession, and never do it
again. My God! I am nothing but a sink of miseries.
You are right to devote yourself as much as possible to your duties
in the novitiate. The body is indeed a poor thing, yet be careful to do
nothing to injure your health. May God bless your remedies, though
I very much doubt their curing you: however, in all things we must
look solely for His good pleasure. You are quite wrong, my daughter,
in thinking that Sister Assistant is not altogether open with you. Do
not make such reflections and don't hesitate about taking your own
line. Has not good M. —— the Senator been right? Remember me
most affectionately and respectfully to him. Meantime I am very
much concerned about your illness. You ought to consult the doctor
and do whatever he tells you. Salute the good man cordially for me.
How is it the infirmarian never gives me one word of news? Well, my
dear, I am very fond of her all the same. I beg of her to gain the
mastery over that heart of hers so that she may train herself to
gentleness and simple observance; however, I will tell this dear
daughter, Marie Adrienne (Fichet), of this myself. I am glad that you
are employing little Sister Françoise Marguerite (Favrot). Test her
well so that she may advance in the virtues of religion.
If these dear novices hold fast to all that is marked down for them,
and I entreat them to do so, they will make great progress. Do not
be afraid to write quite candidly to me; letters are slow but sure in
coming. I wish you could be a little clearer and more detailed in
speaking of the causes which prevent the Superior from being quite
fitted for her office; I thought they were exterior rather than interior.
Ah! what a pity that our negligence should be of such prejudice to
the service of our good God. Write openly and walk faithfully in
uprightness, simplicity, and great gentleness, bearing with your
neighbour, and supporting her without stint. Seek God in all things
and be faithful to Him. He looks to the intention. Speak out boldly,
with entire confidence to our good M. Michel; he is a good and
sincere man. Adieu, my daughter. May the great Jesus make you all
His own. Amen.

[A] Sister Paule Jéronyme de Monthoux de Annemasse was the


first Superior of the foundation of Nevers, 1620, and in 1625 of
that of Blois. Her biographer, Mother de Chaugy, tells us that in
the houses she founded the virtues of simplicity, poverty, and
humility were so successfully implanted by her that it could truly
be said: "The workman is recognized in the perfection of his
work." She died at Blois in 1661, where her memory was held in
such veneration that a tombstone was erected in her honour, half
of which tombstone was in the Nun's choir and half in the secular
chapel, in order thus to satisfy the devotion of the people.
XXVIII.
To M. Michel Favre, Confessor to St.
Francis de Sales, and to the
Religious of the Visitation at
Annecy.
Vive ✠ Jésus!
Grenoble, 1618.
Most truly, good Father and dear son, do I long for leisure to write
as my heart dictates to you, but it is impossible. My feelings towards
you are those of a mother, and greatly have you consoled me by
your kindness in telling me how God has made known His will to
those two dear sisters who aspire to Him and find their rest in His
paternal bosom. It gives me ineffable consolation, seeing that I
myself have this same attraction, but I should like to know the very
words that were communicated to them so that I may feed my soul
upon them. This I say from my heart. Give me then this satisfaction,
and do you also nourish yourself with this sacred manna. Truly
having this, how can we seek elsewhere for other place of security
and rest?
Alas! dear Father, how pitiable are our infirmities and imperfections!
These two Sisters appear to me to be unduly observant of one
another. They have this defect by nature, and I think it better that I
should not tell them of it, lest they suffer from jealousy, both having
so much affection for me and such a desire to please me; but if you
put it before them and induce them to be more simple, cordial, and
open with one another that is all that is needed to set matters right,
for I plainly see that each fears to do wrong. Sister Assistant, who
seems to me the least in fault, ought to divert Sister N.'s mind, and
be trustful and more companionable, compassionately bearing with
her, and in this way draw her out of her melancholy. That is how I
should act, and by so doing I have often relieved and cured souls:
warming their hearts with confidence, talking over matters with
them quite openly, while consulting them as if I had need of their
advice, and trusting them; yet referring neither to their state of
melancholy, nor to the subjects on which they philosophize; neither
to their difficulties nor to the concerns of their neighbour. In a word,
let these sisters act as charity will teach them, if they but ask Our
Lord. For, as our very dear Lord[A] said to me yesterday, "It is to the
humble souls that the divine Goodness gives true wisdom."
Verily, if there is any lack of conformity to the teachings of our
Institute it is most improper that the sister novices should know of it.
This is a thing of importance, and is too serious to be dealt with
merely as we may feel inclined. The Mistress should lead the Novices
according to the ordinary exercises of the house, and if on some
occasion she differs in opinion as to these, she should communicate
with the Superior, and learn from her how to act. But for ordinary
things, when the sisters who are under the charge of the Mistress
come to speak to the Superior of their interior state and their
difficulties she should, before answering, ask them if they have
spoken to their Mistress and what she said on the subject. If their
Mistress has wisely instructed, let her confirm what the Mistress has
said, and encourage them to follow her direction; if, on the contrary,
the Mistress has led them astray she ought not to let the novice
know it, but put her imperceptibly on the right way, and then go
herself to the Mistress, talk the matter over with her, instructing her,
and instilling into her a desire to serve the Sisters affectionately. To
me it seems always better, when necessary, to nourish the esteem
and confidence of the novices for their Mistress. I should like the
Superior to speak to them as far as possible only through her, except
when the Rule ordains otherwise. But I have already written so
much about this that I hope it will be done; for I certainly see that
our Sister Assistant has an excellent heart. She must be encouraged
to get out of herself, and to seek the advancement and repose of the
Sisters with simplicity and integrity: only speaking to them for this
end, and to console them: for sometimes for our own satisfaction we
have an awkward way of teasing and worrying others by
inopportunely returning to a subject which we should never do if we
gave ourselves time to reflect.
I write to you as to a trusty friend. Manage it all, very dear Father, as
you think best. It seems to me that if you do it as coming from
yourself it will be better received than if they thought you had
complained to me, or than if I said it myself.
Certainly this life is full of mortifications, therefore it is necessary to
keep ourselves above it, looking for a better life in which you will
clearly see how sincerely I am,
Yours, etc.

[A] St. Francis de Sales.


XXIX.
To Sister Anne Marie Rosset,
Assistant at Annecy.
Vive ✠ Jésus!
Grenoble, 1618.
It will be a great comfort to you, my very dear Sister, to see His
Lordship,[A] and to hear that all the people here expect to become
more fervent in the service of Our Lord by means of this house. God
grant it may be so! What a consolation it is to hear that Sister Paule
Jéronyme is fulfilling so well her very important charge. I hope all
our dear Sisters will by a faithful and strict observance of our holy
Rules advance every day in the way of Our Lord. To this fidelity, in
the name of our sweetest Saviour, I exhort them, and I embrace
them all in spirit with true and most sincere love. They should
continue as the Rule teaches, and with earnestness, to pray for the
health and the growth in holiness of his Lordship. And let them
neither forget us, nor the other new and dear foundations that are
being planted here and there by the hand of Our Lord; for these
ought to be as dear to us as our own, since it is the divine Will that
we dwell in perfect union of heart, as by the grace of God we do.
Salute all our friends for me, especially dear Madame de la
Valbonne, not forgetting my poor old Sister Anne Jacqueline, nor my
friends the workmen, for whom I have a great liking.

[A] St. Francis de Sales left Grenoble to return to Annecy just at


this time.
XXX.
To Sister Paul Jéronyme de
Monthoux, Mistress of Novices at
Annecy.
Vive ✠ Jésus!

Grenoble,
26th April, 1618.
My poor Jéronyme,
I know all about your little difficulties with good Sister Assistant. You
were like two children, but I see by your last letter you are now
simple and frank as children ought to be with one another. What
pleasure this gives me! It is just how I desire to see the heart of my
dearest little Jéronyme. You must keep it up and make no reflections
whatever on the past. As it helps you so much to tell me about your
troubles, do so, my daughter, for I am very glad to know them. You
will have to be very very generous in bearing with yourself and with
others. Certainly, speak out fearlessly, in a spirit of charity and
cordial confidence, to Sister Assistant of all you think proper. God be
praised for the satisfactory way in which your dear novices are
getting on. You should be continually helping them to advance, but
do it gently, and bear with the little weaknesses which are in some.
Yes, the Mistress can speak to them when necessary at their
assembly and can send a young professed sister to fetch her work.
Their letters ought to be given to her, who can doubt it? She can
also speak to the novices during great silence but not without
necessity. Should the number in the novitiate be considerable you
must, in a spirit of charity, take what time you think necessary to
satisfy them. I have a great affection for you, child. No, no; you
must not say to the Sister Assistant, "Our Mother would not do that,"
unless it be in council, and then only if necessary and with great
respect.
XXXI.
To Madame de la Fléchère.
Vive ✠ Jésus!
Bourges,
2nd February, 1619.
Only one word, my dearest Sister, for it is not long since I wrote to
you, and I await good news of you. My own, thank God, is good.
Our little house goes on peaceably, its good odour increasing. As to
my children, I hope my daughter's marriage with M. de Foras will
soon be arranged, and that she will settle in Burgundy.[A]

My son[B] gives me as keen a sorrow as ever a mother could suffer—


the cause I will tell you when we meet. He is at court, brave and
gallant as he can be, and they tell me, that he is resolved to conduct
himself well and to make his fortune. My own wish is that he should
do so with our good Prince, but I know not what he will do. My dear
Father will help him. I am overwhelmed with letters that have to be
answered, so I must conclude. O, my very dear Sister, may the great
Jesus be our only love! Amen.

[A] This marriage never took place, for, though St. Jane Frances
desired it, Françoise could not make up her mind to accept the
gentleman.
[B] Celse Benigne, in whose character good and bad qualities
were so mingled that he was at once the joy and the anguish of
his mother, each time he risked the life of both his soul and body
by the unfortunate duels in which he was so often engaged,
nearly broke her heart. In order to avoid the seductions of Paris
and the dangerous influence of his friends, the Saint was anxious
to have him attached to the Court of Savoy, but her project did
not find favour with the young Baron.
XXXII.
To Mother Jeanne Charlotte de
Bréchard, Superior at Moulins.
Vive ✠ Jésus!
Paris,
July 9th, 1619.
My very dear Daughter,

This is only a line to announce the arrival of a good young lady[A]


whom his Lordship and I are sending to you. She needs a home to
retire to, and ardently desires to find it with us. Now, as we cannot
have her here, we hope you will welcome her and look after her
lovingly and charitably. She is a lady of quality and can give a good
pension. She will not come to you for a fortnight, so that you may
have time to get everything suitably ready for her. See that she has
a little room with a very neat and comfortable bed and all things as
we are accustomed to have them. Adieu, she will give you all our
news. Do not expect his Lordship for the clothing ceremony. Alas!
this good and dear Father feels far from well. Pray for him. I wrote
to you the other day.

[A] The lady so charitably recommended to Mother de Bréchard


was Mademoiselle de Morville (Madame du Tertre). Left a widow
at twenty-two, she had long before given herself up to a life of
vanity and worldly pleasure. Her parents, anxious to safeguard
her honour and the future of her children, procured for her an
introduction to St. Francis de Sales, who was then in Paris. The
result of this acquaintance was that Madame du Tertre quickly
renounced her unedifying life and asked to be admitted into a
Visitation Monastery, not as an aspirant to religious life but as a
secular benefactress.
Thinking it desirable to remove her to a distance from Paris,
where the temptations to return to her former life might prove
too strong for one so weak and so recently converted, St. Francis
arranged with her family and with Mother de Chantal to ask
Mother de Bréchard to give her a home in her convent. His
solicitude was ill repaid. This volatile and mischievous young
woman brought endless bitterness to his heart, and to that of St.
Jane Frances, while she was the source of misery and contention
in the community in which she lived. In due time, acting upon the
advice of their holy Founder, who was ever too hopeful in his
views about Madame du Tertre, she was allowed to make her
profession, but she soon relapsed into her former disedifying and
uncontrolled manner of living, thereby becoming the cause of
great suffering to the Institute. A letter of St. Jane Frances' shows
that her repentance at the end was genuine, and that she died
happily in peace with God.
XXXIII.
To Mother Péronne Marie de Châtel,
Superior at Grenoble.
Vive ✠ Jésus!

Paris, 1619.
You ask me, my dear daughter, if we are poor. Yes, indeed we are,
but I hardly ever give it a thought. Heaven and earth may pass
away, but the word of God remains eternally as the foundation of
our hope. He has said that if we seek His kingdom and His justice all
the rest shall be added unto us. I believe Him, and I trust in Him.
The extreme necessity in which we sometimes find ourselves gives
us opportunities of practising holy confidence in God and rare
perfection. Truly we already see how wise it is to adhere to Him and
to hope in Him against all human hope, for our foundation has been
a thousand times more successful than we dared to anticipate.
XXXIV.
To Mother Marie Jacqueline Favre,
Superior at Lyons.
Vive ✠ Jésus!
Paris,
September 29, 1619.
What a great consolation for you, my very dear daughter, to have
the joy of a little visit from our dearest Father! It is such a relief that
he is out of Paris, where the epidemic[A] is so bad that his departure
was a delight to me. Although it surrounds us do not fear for us,
daughter, only pray earnestly that we may accomplish the most holy
will of our good God. I have every confidence that nothing will
happen but what is His good pleasure, and what pleases Him
pleases us. So if it is His will I shall often write to you, and I will
address all my letters to his Lordship, who has desired me to keep
him well acquainted with our news. I wish you could find out the
best address for our letters and tell me also how you will send yours.
It would be well to take advantage of M. Rousselet when he returns
to this town, for he has a brother at Lyons.
I do not give you any news, dear daughter, for I have commissioned
my nephew de Boisy to do it; and besides, you know it is a thing
which is distasteful to me. One thing only is necessary—to possess
God, and for this I have a burning desire. This alone is happiness. All
the rest is mere smoke. Cling then with constancy to this holy aim.
Write to me of your interior state: you will be reviewing it now.[B] O
God, how I love that heart of my great and dear daughter! I long to
see it generous, pure, perfect, in a word united in a holy union with
the Heart of its amiable and adorable God. Adieu, my daughter, a
thousand good mornings to you and to your dear flock. I do not
know if his Grace of Lyons has returned: he will mayhap want to
delay the change of your congregation into a monastery.[C] It is,
however, expedient that it should be done before you are taken
away. His Lordship will speak to you of this. But it must be managed
very tactfully. One word in conclusion. Test your daughters well
before their profession.
Adieu, my daughter. I am always yours in Our Lord. You know this.
May He be blessed! St. Michael's Day.

[A] We read in the inedited "Foundations of the First Monastery of


Paris": "In the years 1619 and 1620 God permitted a terrible
plague to break out in Paris. Terror drove away not only the court
but almost the entire population, who sought safety in flight. So
deserted did this great city become that we are told the grass
grew in the streets. As might be expected in such circumstances,
the alms upon which our newly established Community subsisted
entirely ceased, and to add to our misfortunes we were
surrounded by infected houses. All day long we could hear the
tinkle of the little bell that announced the passing of the death
waggon in front of the house."
[B] The autumn has always been the season appointed for the
annual Retreats of the Sisters of the Visitation.
[C] The Archbishop of Lyons, Mgr. de Marquemont, although the
first to urge that the Visitation should have enclosure and solemn
vows, was the last to put in force the Bull erecting it into a
Religious Order. He held back in the hope of inducing the house
at Lyons to undertake the reciting of the great Canonical Office.
XXXV.
To Sister Marie-Avoye Humbert, at
Moulins.
Vive ✠ Jésus!
Paris, 1619.
I want you to know, my dear little daughter, what a great
consolation your letter has been to me. You have portrayed your
interior state with much simplicity, and believe me, little one, I
tenderly love that heart of yours and would willingly undergo much
for its perfection. May God hear my prayer, and give you the grace to
cut short these perpetual reflections on everything that you do. They
dissipate your spirit. May He enable you instead to use all your
powers and thoughts in the practice of such virtues as come in your
way. How happy would you then be, and I how consoled! Make a
fresh start in good earnest, my darling, I beg of you. For faults of
inadvertence and suchlike, humble yourself in spirit before God, and
after that do not give them another thought. You will do this, will
you not, my love? Ah, do! I ask it through the love you bear to your
poor mother. For the rest, say out boldly everything in your letters;
they always console me. Let nothing worry you. Always yours in
sincerity. Pray much for me. May the sweet Jesus accomplish in you
His holy will!
XXXVI.
To the Sisters of the Visitation of
Bourges.
Vive ✠ Jésus!

Paris,
October 3, 1619.
My beloved Daughters,
The affection I bear you is my only motive in striving to serve and
console you: I need no other spur, for that one is boundless. But
God does not intend that we should see each other for the present,
and we willingly submit our desires to His holy will. Meanwhile, let us
prepare ourselves by a greater fidelity to observance to profit by the
occasion should He arrange a meeting for us.
Above all things, dear daughters, dwell together, I beseech of you, in
a great and magnanimous love of His holy will, and a gentle mutual
support of one another, which will ravish the Heart of the sovereign
Goodness: for our good Saviour has said that it is by our love for
one another that we shall be recognized as His disciples.
No leisure for more—I recommend myself to your prayers. May God
dwell habitually in your midst and heap upon you His choicest
graces!
Yours always in Him. May He be blessed!
XXXVII.
To the Sisters of the Visitation of
Moulins.
Vive ✠ Jésus!
Paris,
December 14th, 1619.
My dearest Daughters,
We are now beginning a new year, and with my whole heart I come
to beg a favour of you. For the sake of the honour and privilege of
being daughters of Our Lady will you not grant it to me? for all the
affection of which I am capable is bound up in the asking. It is this,
to make a strong and effectual resolve to walk in the way of exact
observance, obeying simply, in all humility and meekness.
In the name of God, let not self-conceit be seen amongst you, nor
desire of offices, nor of high places; but rather, in the knowledge of
your own weaknesses and miseries, cultivate a great love of
humiliations, of self-abasement, and of all things lowly. Never use
sharp words one to another. Holy gentleness, cordiality, and union of
heart should reign instead among you, so that a gracious affability
may season all your words and actions, and no shadow of
repugnance ever show itself. Do not think about whether you are
loved more or less than another. Kill such little foxes, I pray you, for
they will steal away the peace of your hearts. We should never
desire to be loved, but believe that we get as much affection as God
sees good for us.
Never make questions as to whom the charges are given; never
desire them. The divine will ought to be the rule of our will and
enough for us. Now, my dear Sisters, give the Holy Virgin, our Lady,
the pleasure of seeing you serve our sweet Master, her dear Son, by
being faithful to these little counsels which I give on their part, and
in their presence. I ask this of you through the infinite goodness of
the Son and Mother, while I beseech them to grant you a
superabundance of graces and their eternal benediction. Amen.
XXXVIII.
To Mother Péronne-Marie de Châtel,
[A] Superior at Grenoble.

Vive ✠ Jésus!
Paris,
January 13th, 1620.
Ah! how is it, my darling, my dearest daughter, that you expect a
severe letter from me? I tell you candidly, and glory be to God for it,
your heart is too good to deserve scolding, and even if it were not, I
have no inclination to scold. In a letter which I received from his
Lordship speaking of the houses (of the Institute) that he has
visited, he says: "To speak quite openly, at Grenoble I have found
one who is a Superior altogether after my own heart." Now, you may
imagine, my daughter, what good it did my heart to hear this. Yes,
indeed I love you very dearly, but I can give you no better advice
than to walk straight on in your own path, which is a good one,
without turning to right or left. You are wonderful in the way you
complain of yourself. Remember, that if God permits you to be so
unfaithful, He allows these little negligences so that you may always
have wherewith to humble yourself. When God consoles you receive
His consolations quite simply, accepting alike good and ill. In a word,
my daughter, you must unite yourself to God in everything, and by
everything, and lead your daughters in the same way. As to a
spiritual Father, nothing more can be done. You must continue to
have patience for a little longer and God will provide you with one.
Meanwhile be all things to your daughters, and then all will go well.
It is a great consolation to hear that they are so good. Oh! Lord
Jesus, pour down Thy graces upon this chosen company. Pray much
for us. The choice of a house here depends upon his Lordship, and
we are at our wits' end to find a suitable one; however, we hope to
be settled this summer. Well, my daughter, God alone suffices; were
He our only consolation, and did we never wish for any other, how
happy we should be! Let us hold to this, for nothing else matters.
Adieu, my love. Pray, and get prayers for my children, I beseech you.
You are most truly, believe me, the very dear daughter of my heart.

[A] Such was the reputation for fervour of the Monastery of


Grenoble that many distinguished members of the Society of
Jesus, and of other Orders, spoke of it as a "Furnace of Prayer,"
and a "School of Virtues," but the humility of Mother de Châtel
hid from her the great work that God was accomplishing through
her means in her own community.
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