Just Enough Programming Logic and Design 2nd Edition Joyce Farrell pdf download
Just Enough Programming Logic and Design 2nd Edition Joyce Farrell pdf download
https://ebookfinal.com/download/just-enough-programming-logic-
and-design-2nd-edition-joyce-farrell/
https://ebookfinal.com/download/just-enough-autocad-2006-just-
enough-1st-edition-george-omura/
https://ebookfinal.com/download/just-enough-research-1st-edition-
erika-hall/
https://ebookfinal.com/download/just-enough-spanish-grammar-
illustrated-1st-edition-gabriele-stobbe/
https://ebookfinal.com/download/just-enough-english-grammar-
illustrated-1st-edition-gabrielle-stobbe/
Zero to Maker Learn Just Enough to Make Just About
Anything 1st Edition Lang David
https://ebookfinal.com/download/zero-to-maker-learn-just-enough-to-
make-just-about-anything-1st-edition-lang-david/
https://ebookfinal.com/download/computer-sound-design-synthesis-
techniques-and-programming-2nd-edition-eduardo-miranda/
https://ebookfinal.com/download/logic-and-computer-design-
fundamentals-m-morris-mano/
https://ebookfinal.com/download/fundamentals-of-logic-design-6th-
edition-charles-roth/
https://ebookfinal.com/download/mechanical-circulatory-support-
principles-and-applications-2nd-edition-david-l-joyce-lyle-d-joyce/
Just Enough Programming Logic and Design 2nd Edition
Joyce Farrell Digital Instant Download
Author(s): Joyce Farrell
ISBN(s): 9781111825959, 1111825955
Edition: 2nd
File Details: PDF, 17.77 MB
Year: 2013
Language: english
)
SECOND EDITION
JUST ENOUGH PROGRAMMING
LOGIC AND DESIGN
< )
JOYCE FARRELL
;· COURSE TECHNOLOGY
I CENGAGE Learning
Aunralia • 8r111I • Japan • K«u • Mexico · Singapore • S~in • United Klngdom • Un1ttd Stales
:IDU~.._ .ua.--M<t•
C°"l'.t....
...Wiit',,_._ . . . . . . . _, 4$ .......- . • •- ·~
, _ . . . . . WWl)lftlc'tftir....Ut.:....,n, · - ................
------ ~-"90"'~ ...............
- - - - - - . . .,c.W- .. --~··
.... ZCIQllB'L
This is an electronic version of the print teXtbook. Due to electronic rights restrictions,
some third pany content may be suppressed. Ed.ilorial review bas deemed that any suppressed
content does not materially affect the overall learning experience. The publisher reserves the right
to remove content from this title at any time if subsequent rights restrictions require iL For
valuable information on pricing. previous editions, changes to current editions. and alternate
formats. please visit www ccngage.comlhigbcred to search by JSBC'\#, author. title, or keyword for
materials m your areas of interest
C°"l'.t
~ :IDU~.._ .ua.--M<t•
....
............... ....... - . • •- ·~
, _ . . . . . WWl)lftlc'tftir....Ut.:....,n,
_, 4$ · - ................
------ ...............
- - - - - - . . .,c.W- .. --~··
~-"90"'~ .... ZCIQllB'L
,.. COURSE TECHNOLOGY
I CENGAGE Learning·
Just Enough Programming C 2013 Course Technology, Cengage Leaming
Logic and Desig n,
ALL RIGHTS RESERVED. No part of this work covered by the copyright herein
Second Edition
may be reproduced, transmitted, stored or used in any form or by any means--
Joyce Fa rrell graphic, electronic:. or mechanic.at, Including but not limited to photocopying,
recording. scanning. digitizing, taping, Web distribution, information networks,
Executive Editor: Marie lee
or information storage and retriev;1I systems, except as permitted under Section
Acquisitions Editor: Brandi Shailer 107 or 108 of the 1976 united States Copyright Act- without the prior written
permission of the publisher.
Senior Produa Manager: Alyssa Pratt
Developmental Editor: Dan Seiter
-,
For product Information and technology assistance, contact us at
Associate Produa Manager: Cengage Learning Customer & Sales Support. www.ce ngage.com/support.
Stephanie Lorenz
For permission to use material from this text or product.
Associate Marketing Manager: su'bmit all requesu onllne at cengage.com/permlsslons.
Shanna Shelton Further permissions questions can be e-mailed to
permlsslonreques10cengag e.com.
Senior Content Project Manager:
tatherine DiMa»a
Associate Art Director: Faith Brosnan ISBN·13: 97B· l · l11-82595·9
< Compositor: lntegra Cengage learning is a leading provider of customized learning solutions with
office loc.ation:s around the globe, induding Singapore, the United Kingdom,
)
Australia, Meicico, Brazil, and Japan. locate your local office at:
international.c:engage.com/region
Some of the product names and company names used In this book have been
used for identification purposes only and may be trademarks or registered
trademarks of their respective manufacturers and sellers.
Course Technology, a part of Cengage learning, reserves the right to revise this
publication an.d make changes from time to time in iu content without notice.
Preface . . . . . . . . . . . . . . . . . . ix
CHAPTER 1 An Overview of Computers and Logi c .1
CHAPTER 2 Understanding Structure 31
CHAPTER 3 Making Decisions 65
CHAPTER 4 Looping . . . . • • • • . . 109
CHAPTER 5 Arrays 143
CHAPTER 6 Using Method s 173
CHAPTER 7 Object-Oriented Programming 205
< APPENDIX A Understanding Numbering Systems and >
Computer Codes . . . . . . . . . . 225
APPENDIX B Two Special Structures-case and
do - while . . . . . . . . . . • • . 231
Index . . . . . . . . . . . . . . 237
Prefac e . . . . . . . . . . . . . ix
CHAPTER 1 An Overview of Computers and Logic .1
Understanding Computer Components and Operations .2
Understanding the Programming Process . .5
Understanding the Problem .6
Planning the Logic . . . . . . . . . . .7
Coding the Program . . . . . . . . . .8
Using Software to Translate the Program into Machine Language .8
Tes ting the Program . . . . . . . .9
Putting the Program into Production . . . . . . . 10
Maintaining the Program . . . . . . . . . . . . 10
Using Pseudocode Statements and Flowchart Symbols 11
The Advantages of Repetition . . . . . 13
< Using and Naming Variables and Constants 15
>
Assigning Values to Va!l'iables . . . . . 17
Performing Arithmetic Operations . . . 18
Understanding Data Types and Declaring Variables . 19
Ending a Program by Using Sentinel Values . . . . 21
Understanding the Evolution of Programming Techniques 23
Review Questions 24
Find the Bugs . 26
Exercises . . . 27
<'Ol')'rifl< 311:1.c..r.&.e-.. All Rli!lb' ltco<rwd • ...,.... l><copod.-·~ .. · -..... _ oo.. ..- - . ~--I"") __,"'. . . . . . 111c.-d~1 <Cb;liort•~
lil1kll:o1il :"<\"""9 -~:hlf.a;t' J u:c:d ~dOa auc ~,. d!«I dlocrt-cr&ll ~' 'J.'l"""'«r Cai.,...: ~ffbl2'n&d$k~tl9nC>-Mo-n"<'<:llblttl! _,.ttmtil 111.1~._..u,:tblUll1ttilliaWµ1«.d.
Recognizing Structure and Structuring Unstructured Logic 50
Structuring the Dog-Washing Process 54
Review Questions 58
Find the Bugs . 60
Exercises . . . 60
v
CHAPTER 3 Making Decisions . 65
Evaluating Boolean Expressions to Make Comparisons 66
Using the Relational Comparison Operators . 70
Understanding AND Logic . . . . . . . . . 73
Nesting AND Decisions for Efficiency . . . . 75
Combining Decisions Using the AND Operator 78
Avoiding Common Errors in an AND Selection 80
Understanding OR Logic . . . . . . . . 82
Writing OR Decisions for Efficiency . . . . . 84
Combining Decisions in an OR Selection . . 85
Avoiding Common Errors in an OR Selection 87
Making Selections Within Ranges . . . . . . 91
Avoiding Common Errors When Using Range Checks 93
Understanding Precedence When Combining AND and OR Operators 97
Using the NOT Operator 99
Review Questions .100
Find the Bugs . . 103
Exercises . . . . .103
,CONTENT:S
CHAPTER 5 Arrays . . . . . 1 ~
:IDU~.._ .ua.--M<t•
C°"l'.t....
...Wiit',,_._ . . . . . . . _, 4$ .......- . • •- ·~
, _ . . . . . WWl)lftlc'tftir....Ut.:....,n, · - ................
------ ..............
- - - - - - . . .,c.W- .. --~··
~-"90"'~ .... ZCIQllB'L
CHAPTER 7 Object-Oriented Programming . . . . . . . 205
An Overview of Some Principles of Object-Oriented Programming . .206
Defining a Class . . . . . . . . . . . .208
Instantiating an Object . . . . . . . . .209
Understanding Public and Private Access .211 vii
Understanding Inheritance . .21 4
Understanding Polymorphism . . . . . .215
Understanding Encapsulation . . . . . .217
Advantages of Obiect-Oriented Programming .219
Review Questions .220
Find the Bugs . . . . . . . . . . . . . . 222
Exercises . . . . . . . . . . . . . . . .222
Index . . . . . . . . • • . . . . . 237
< >
Ea~ft"t'10i'-., ~ . ..., :;:; <'Clelllc* doa.o:ic mccr~ 6:1.tbeCl"a:.0 loaSqupai : ~ Lcwq 1.-no fllc n;tit •.-..c t'r·-"«WDI a'-181f'C-tl dlD ........ ~ &.
< )
:IDU~.._ .ua.--M<t•
C°"l'.t....
...Wiit',,_._ . . . . . . . _, 4$ .......- . • •- ·~
, _ . . . . . WWl)lftlc'tftir....Ut.:....,n, · - ................
------ ...............
- - - - - - . . .,c.W- .. --~··
~-"90"'~ .... ZCIQllB'L
Preface
ix
Just Enough Programming Logic and Design, Second Edition, is a guide to developing
structured program logic for the beginning ptrogrammer. This book contains only seven
chapters and two appendices- just enough to make the student comfortable with
programming logic before tackling the syntax of a programming language. This book is
intended to provide a complete, sound, yet compact start in logic- just enough for a short
logic course, just enough as an accompaniment to a programming language book. or just
enough as a supplement to a computer literacy course.
This textbook assumes no programming language experience. The writing is nontechnical
and emphasizes good programming practices. The examples are business examples; they do
not assume a mathematical background beyond high school business math. All the examples
illustrate one or two major points; they do not contain so many features that students become
lost following irrelevant and extraneous details. This book does not cover advanced logical
concepts such as file handling, multidimensio,naJ arrays, or overloading methods. This book
provides just enough material for a solid background in logic. no matter what programming
< languages students eventually use to write programs. >
COl')'rif!< 311:1.c..r.&.e-.. All Rli!lb' ltco<rwd • ...,..,. l><copod.-«~ la •11otc or·.o- oo.. ..- - . ~--I"") -•1 II< Wl>'"""-dlc<80nlt d~1 <Cb;liort•~
lil1kll:o1il :"<\"""9 -~:hlf.a;t' J u:c:d ~dOa auc ~,. d!«I dlocrt-cr&ll ~' 'J.'l"""'«r Cai.,...: ~ffbl2'n&d$k~tl9nC>-Mo-n"<'<:llblttl! _,.ttmtil 111.1~._..u,:tblUll1ttilliaWµ1«.d.
Features
This text focuses on helping students become better programmers and
understand the big picture in program development through a variety of
key features. In addition to chapter Objectives, Summaries, and Key Terms,
x these useful features will help students regardless of thelr learning style.
___
.....,.
--
..... U'-"f
if ,_., ' "" • •, • tMft
....°"'"''
• f ...
......
tJ: ,,..,_._
~o~•<OWtl• .,.,,,~.·
If •tt . . ., ,,.....
4'¥\'&Nitt •o.1\4, ..... l
-··
. , . , , , ,..
_,, "
< )
(illnl-U . . . _ _ ..... • · - - -
...............................
•~c.-.rf•c.uc...._ .......
.,,. ........
~ ..
..., ..........CICl1.
O..ln
:IDU~.._ .ua.--M<t•
C°"l'.t....
...Wiit',,_._ . . . . . . . _, 4$ .......- . • •- ·~
, _ . . . . . WWl)lftlc'tftir....Ut.:....,n, · - ................
------ - - - - - - . . .,c.W- .. --~··
~-"90"'~ .... ZCIQllB'L ...............
xi
........,.,
f f se:ord ,_ Klh SCXlll NIJ s.c:ort1' ,... KlN: SCOtC 4NO KontJ -
cl~~r~ ••,.,,•
''""""" - "hil"
t(UI SCOU •h*"
()n '"" "'"" Jund, d 1"!' . -"' - oal)· .... al t t - ...... "' ,.... ......... lhm tt. lopc
.... 1o11.... ~
....
If tc:o.re.J ,.. Hitt.SCc.£ OJt tcord ,.. Ml' SCOtE OI
c1a.J.•Cr~ • • ,.&$, .
c1a.s.s.Cr.ade • ·r~~i·
s~l ,.. Kiii\ SCOlE ttwt.
....Theo•
" b«aono """' alfnl'IJ&at.<d - !"" <mtlbW ""°and Ol _....... •llhln th<
,,..,. """"""'- Wlwn )"" combln. AVJ and 011. -•Wl1<
tht - °"""'"'' .....
< # .. ..~
_....._,,_. . . . . --.'*Y---· --.. ----
prec~. mf"-'""'11 lhr-.&S Buolt"An , .•~ .r~ <"·•hutf'CS linii.
""'"
rw Nl''l'i•· ·--th.ti • ,,,.,..,. pat,.., ,, 10 '~""old.
!"'111'0 "'1wld Ml t~T • dl-..nt (Cl< b< llk,..('IJ CtJ '''" I
cht I f U>l<m<ni. t.ht pan o4 th> r.,.......,,. mAJ - " " " ' 1ht N4l
J.'11 r • <'"V ~ -C"l.,. t'Y.>ltMl<d lint. F<>t a 11).)..,. old •nd an R·
.---
..........
.·-
I( •••
- -
J ,..,._ti f!I IN...,....• ... •.., .,_ _. aa.1 ti ....-w...,,
...............................
&
.~
Nut. . . . . . . . . ti'ifilUI
....... .................
.. "'*" ..... ,,.. ,...,.. ........,.
.-
,, , ... ....,._....,.""'................. titt\.now-.
• ••I H
.. •••O'I•·
• •
.....
•• ,,,up
,
.... "Ot". ' ......,
• • . . . . . . . . . . . . . . offY " " "
'..
" ... I~~ 8'11S
....., ....
. . Fllld
·-
..... ,... "-- .,.. Mnlllrn J D:lln • ~...,
................
... ,_,.,""...
... 11. . . . . .
·-~"..........
-1o1oo.--...i
----
-- ·--·--·-·
.. .....
...
.,...,..,._ ~
'- ..
. ""'...... .
• ..... f9all ......... _ ,
.........................,
1t.......-1 .........~
l ~ .. .......,....,
__.,
~.~.,
'-'
...............,
EXERCISES provide opportunities to
practice concepts. These exercises
increase in difficulty and allow students
to explore logical programming
concepts. Each exercise can
be completed using flowcharts,
pseudocode, or both. In addition,
instructors can assign the exercises as
programming problems to be coded and
executed in a particular •g
language.
:IDU~.._ .ua.--
C.,..t....
...Wiit',,_._ M<t•
. . . . . . . _, 4$
, _ .. . . .......- . • • -~
. WWl)lftlc'tftir....Ut.:....,n, ··-
................ - - - - - - - . . .,c.W- .. --~··
- - - - -~-"90"'~ .... ZCIQllB'L ...............
Instructor Resources
Supplementary Material
Just Enough Programming Logic and Design. 2e can be enhanced by the following materials:
• Video . The author has created and narrated 25 short videos that explain and clarify
key chapter topics. These videos are available for complimentary download at
www.cengagebrain.com. xiii
• £..book Companions. Just Enough Visual Basic and Just Enough Java are e--book
companions to Just Enough Programming Logic and Design. Each book introduces
students to the basics of the respective programming language-just enough to get started
writing programs that help demonstrate the logical concepts of programming. Each
book's chapters parallel those in Just Enough Programming Logic and Design. These
books provide complete, sound, yet compact foundations to using modern programming
languages.
• Debugging Exercises. Because examining programs critically and closely is a crucial
programming skill, each chapter includes a Find the Bugs section in which programming
examples contain syntax errors and logical errors for students to find and correct.
Debugging Exercises are available for students to download at www.cengagebrain.com.
These 6Jes are also available to instructors through the Lnstructor Resources CD and
login.cengage.com.
• Visual Logic•, version 2.0. Visual Logic is a simple but powerful tool for teaching
< programming logic and design without traditional high-level programming language )
syntax. Visual Logic uses flowcharts to explain the essential programming concepts
discussed in this book, including variables, input, assignment, output, conditions. loops.
procedures, graphics, arrays. and files. Visual Logic also interprets and executes
flowcharts, providing students with immediate and accurate feedback. Visual Logic
combines the power of a high-level language with the ease and simplicity of flowcharts.
Visual Logic is available for purchase along with your text. Contact your instructor or
your Cengage Learning sales representative for more information.
Instructor Resources
The following teaching tools are available to the instructor on a single CD-ROM. Many are
also available for download at our Instructor Companion Site. Simply search for this text at
login.cengage.com. An instructor login is required.
• Electronic Instructor's Manual. The Instructor's Manual follows the text chapter by
chapter to assist in planning and organizing an effective, engaging course. The manual
includes Overviews, Chapter Objectives, Teaching Tips, Quick Quizzes, Class Discussion
Topics, Additional Projects, Additional Resources, and Key Terms. A sample syllabus is
also available.
• PowerPolnt Presentations. This text provides PowerPoint slides to accompany each
chapter. Slides may be used to guide classroom presentations. to make available to
students for chapter review, or to print as classroom handouts. Files are provided for every
:IDU~.._ .ua.--M<t•
C°"l'.t....
...Wiit',,_._ . . . . . . . _, 4$ .......- . • •- ·~
, _ . . . . . WWl)lftlc'tftir....Ut.:....,n, · - ................
------ ...............
- - - - - - . . .,c.W- .. --~··
~-"90"'~ .... ZCIQllB'L
Acknowledgments
figure in the text instructors may use the files to customize PowerPoint slides, illustrate
quizzes, or create handouts.
• Solutions. Suggested solutions to r eview questions and exercises are available.
• ExamView. This textbook is accompanied by Exam View, a powerful testing software
xiv package that allows instructors to create and administer printed, LAN-based, and Internet
exams. Exam View includes hundreds of questions that correspond to the text, enabling
students to generate detailed study guides that include page references for further review.
The computer-based and Internet testing components allow students to take exams at
their computers, and save the instructor ti.me by grading each exam automatically. These
test banks are also available in Blackboard, Web CT, and Angel compatible formats.
Acknowledgments
I would like to thank all of the people who contributed to the production of this book. Dan
Seiter served as Development Editor, making suggestions and corrections that make this book
a superior product T hanks also to Alyssa Pratt, Senior Product Manager; Brandi Shailer,
Acquisitions Editor; and Green Pen QA. Technical Editors.
l thank the reviewers who provided helpful and insightful comments during the development
of this book, including Tom Johnson, California State University Long Beach; and Charlene
Seymour-Lane, Brown Mackie College. As always, thanks to my husband, Geoff, for his
< constant support. FinaJJy, this book is dedicated to Xander Nakos. )
- Joyce Fan-ell
°""""')(>''°"""'" 1.r-iw All . . . . - •i.t ......_.. ..-..1.• . , . , ... ..- ...- °""· -~ - - - _....,ti. '"h .. - ... - -~··
An Overview of
Computers and Logic
----11111., _. . . . ~- . .--....
C-:lllUC.S.U.W. ~kll!D-- ....,_...,...,...__ -•-lfl!OL----_,..,. .,_. . . . .
•-•la....
"-~-·-·---
q; , _ . , _ _ _, 4
=-lL
•l
An Overview of Computers and Logic
-
C...,.,.lOI:~.._., ....... _ , . . . . _ " " ..... - - ... ·
......... ~-. . . , 41
.
·----~--- " - " ' "
·-··-0..•_.,...____..... 41 _ _ ..
ec.,...,'-_ _ ,,. _ _ _ _ .. e i _ l f
_ . _ _.oq...,
.... _ ...
Understanding Computer Components and Operations
nearly as smart as most people; with a compllter, you might as well have asked, "Xpu mxv
ot dodnm cad.I B?" Unless the syntax is perfect, the computer cannot interpret the
programming language instruction at all.
Every computer operates on circuitry that consists of millions of on/off switches. Each
programming language uses a piece of software to translate programming language 3
statements into object code, which is the computer's on/off circuitry language, or machine
language. Machine language is represented as a series of Os and ls, also called binary form.
The language translation software that converts a programmer's statements to binary
form is called a compiler or interpreter, and it issues a message if you have made a syntax
error- that is, if you have misspelled a programming language word or used incorrect
punctuation. Therefore, syntax errors are relatively easy to locate and cor.r ect because
your compiler or interpreter highlights them. and your program will not run until all
such errors are corrected.
Although compilers and lnterp<eters work in slightly different ways. their basic function ls the same-to
translate your programming statements into code the computer can use. The use of a compiler or an
interpreter depends on which programming language is used. However, there are some languages for
which both compilers and interpreters are available.
When a program's instructions are carried out, the program runs or executes. A program
that Is free of syntax errors can be executed, but it might not produce correct results.
for a program to work properly, you must give the instructions to the computer in a
< specific sequence, you must not leave any instructions out, and you must not add >
extraneous instructions. By doing this, you are developing the logic of the computer
program.
Suppose you instruct someone to make a cake as follows:
• Stir
• Add two eggs
Don'tDo It
• Add a gallon of gasoline - 4 - - - - Oorl't bake a cake
lite this!
• Bake at 350 degrees for 45 minutes
• Add three cups of flour
The dangerous cake-baking instructions are shown with a warning icon. You will see this
icon when a table or figure contains a piogramming practice thal is being used as an ex.ample
of what not to do.
Even though the cake-baking instructions use correct English spelling and grammar, the
instructions are out of sequence, some are missing. and some instructions belong to
procedures other than baking a cake. (Some programmers make a distinction between syntax
errors, which stem from incorrect spelling and punctuation, and semantic errors, which
occur when the grammar is correct but the statement makes no sense in the current context.}
If you follow these instructions, you will not make an edible cake, and you may end up with
a disaster. Such logical errors are much more difficult to locate than syntax errors. The cake
recipe is an extreme example, but suppose the error was more subtle. For ex.ample, the
correct recipe might require three eggs instead of two, or might require a teaspoon of
vanilla. It is easy to determine whether eggs is spelled incorrectly in a recipe, but perhaps
impossible for you to know if there are too few eggs until after the cake is baked and you
taste it. Similarly, it is easy for a compiler or interpreter to locate syntax errors. but often
impossible for it to locate logical errors until the program executes.
4
Just as baking directions can be provided in French, German, or Spanish, the logic of a
program can be expressed in any number of programming languages. This book focuses
almost exclusively on logic development. Because this book is not concerned with a specific
language, the programming examples could have been written in Japanese, C++, or Java.
The logic is the same in any language. For convenience, the book uses English!
Once instructions have been input to the computer and translated into machine language,
a program can execute. You can write a program that takes a number (an input step), doubles
it (processing), and tells you the answer (output) in a programming language such as Java
or C++, but if you wrote it using English-like statements, it would look like this:
Input ori gi na1Number.
Compute calculatedAnswer = originalNumber times 2.
Output calculatedAnswer.
The instruction to Input ori gi nal Number is an example of an input operation. When the
computer interprets this instruction, it knows to look to an input device to obtain a number
and store it at a memory location named ori gi na l Number. Computers often have several
< input devices, including a keyboard, mouse, USB port, and CD drive. When you learn a
specific programming language, you learn how to tell the computer which input device to
>
access for input for the current program. Usually, without special instructions to the contrary,
the default input device is the keyboard. Logically, however, it doesn't matter which hardware
device is used, as long as the computer knows to look for a number. The logic of the input
operation-that the computer must obtain a number for input, and must do so before
multiplying the number by 2-remains the same regardless of the input hardware device.
The same is true in your daily life. If your boss says, ~Get Joe Parker's phone number for me,"
it does not matter how you find the number. For example, you might look it up in a phone
book. on your cell phone, on the internet, or call a friend who knows the number.
The step that occurs when the arithmetic is performed to double original Number is an
example of a processing step. Mathematical operations are not the only kind of processing,
but they are very typical. After you write a program, it can be used on computers of different
brand names, sizes, and speeds. When you make a phone call, your message gets through
whether you use a land line or a cell phone, and it doesn't matter which company made your
cell phone. Similarly, whether you use an IBM, Macintosh, Linux, or UNIX operating system,
and whether you use a laptop computer or an expensive mainframe at your university,
multiplying by 2 is the same process. The hardware is not important; the logical process is.
ln the number-doubling program, the Output calculatedAnswer statement represents an
output operation. Within a particular program, this statement could cause the output to
appear on the monitor (which might be a flat panel screen or a cathode-ray tube), or the
output could go to a printer (which could be laser or ink-jet), or the output could be written
Copyrlp l012 C..pa< l.<ftll;a. All R1;lll> R.,.!\'Od. M.1) - b< cqilcd. -cr~ri bo • - Ot bo ...... Due: IO~ npy..-. ddo! Pl"f-- ""1 b< :;op;catd -II>< -'<><
dlool: ~·~
EditoNI "''~ bd 4c!cmtd am uy !i»ppm6Cd ccrJcN doa QOC. tlllltaialty 11&\.1. ax. O\cnJl kwciq o.p:ric:ia.. Cc~ lamtq, mct\n 0c rigJIC 10 tCllO\t- .mibooll<mccat at ...1 t1mr. if~~ ~ l'«f..IR lL
Discovering Diverse Content Through
Random Scribd Documents
11
Thus rudely awakened to the paramount necessity of embracing a
faith, bowing to a principle, obeying a gentle force which should
sustain and control the soul, I flung myself for a time with ardour
into theological reading, my end not erudition, but to drink at the
source of life. Is it arrogant to say that I passed through a painful
period of disillusionment? all round the pure well I found traces of
strife and bitterness. I cast no doubt on the sincerity and zeal of
those who had preceded me; but not content with drinking, and
finding their eyes enlightened, they had stamped the margin of the
pool into the mire, and the waters rose turbid and strife-stained to
the lip. Some, like cattle on a summer evening, seemed to stand and
brood within the pool itself, careless if they fouled the waters; others
had built themselves booths on the margin, and sold the precious
draughts in vessels of their own, enraged that any should desire the
authentic stream. There was, it seemed, but little room for the
wayfarer; and the very standing ground was encumbered with
impotent folk.
Discerning the Not to strain a metaphor, I found that the
Faith commentators obscured rather than assisted. What
I desired was to realise the character, to divine the
inner thoughts of Jesus, to be fired by the impetuous eloquence of
Paul, to be strengthened by the ardent simplicity of John. These
critics, men of incredible diligence and patience, seemed to me to
make a fence about the law, and to wrap the form I wished to see in
innumerable vestments of curious design. Readers of the Protagoras
of Plato will remember how the great sophist spoke from the centre
of a mass of rugs and coverlets, among which, for his delectation,
he lay, while the humming of his voice filled the arches of the
cloister with a heavy burden of sound. I found myself in the same
position as the disciples of Protagoras; the voice that I longed to
hear, spoke, but it had to penetrate through the wrappings and veils
which these men, in their zeal for service, had in mistaken reverence
flung about the lively oracle.
A wise man said to me not long ago that the fault of teaching
nowadays was that knowledge was all coined into counters; and that
the desire of learners seemed to be not to possess themselves of the
ore, not to strengthen and toughen the mind by the pursuit, but to
possess themselves of as many of these tokens as possible, and to
hand them on unchanged and unchangeable to those who came to
learn of themselves.
This was my difficulty; the shelves teemed with books, the
lecturers cried aloud in every College court, like the jackdaws that
cawed and clanged about the venerable towers; and for a period I
flew with notebook and pen from lecture to lecture, entering
admirable maxims, acute verbal distinctions, ingenious parallels in
my poor pages. At home I turned through book after book, and
imbued myself in the learning of the schools, dreaming that, though
the rind was tough, the precious morsels lay succulent within.
In this conceit of knowledge I was led to leave my College and to
plunge into practical life; what my work was shall presently be
related, but I will own that it was a relief. I had begun to feel that
though I had learnt the use of the tools, I was no nearer finding the
precious metal of which I was in search.
The further development of my faith after this cannot be told in
detail, but it may be briefly sketched, after a life of some intellectual
activity, not without practical employment, which has now extended
over many years.
The Father I began, I think, very far from Christ. The only
vital faith that I had at first was an intense
instinctive belief in the absolute power, the infinite energies, of the
Father; to me he was not only Almighty, as our weak word phrases
it, a Being who could, if he would, exert His power, but
παντοκρατῶρ—all-conquering, all-subduing. I was led, by a process
of mathematical certainty, to see that if the Father was anywhere,
He was everywhere; that if He made us and bade us be, He was
responsible for the smallest and most sordid details of our life and
thought, as well as for the noblest and highest. It cannot indeed be
otherwise; every thought and action springs from some cause, in
many cases referable to events which took place in lives outside of
and anterior to our own. In any case in which a man seems to enjoy
the faculty of choice, his choice is in reality determined by a number
of previous causes; given all the data, his action could be inevitably
predicted. Thus I gradually realised that sin in the moral world, and
disease in the physical, are each of them some manifestation of the
Eternal Will. If He gives to me the joy of life, the energy of action,
did He not give it to the subtle fungus, to the venomous bacteria
which, once established in our bodies, are known by the names of
cancer and fever? Why all life should be this uneasy battle I know
not; but if we can predicate consciousness of any kind to these
strange rudiments, the living slime of the pit, is it irreverent to say
that faith may play a part in their work as well? When the health-
giving medicine pours along our veins, what does it mean but that
everywhere it leaves destruction behind it, and that the organisms of
disease which have, with delighted zest, been triumphing in their
chosen dwelling and rioting in the instinctive joy of life, sadly and
mutely resign the energy that animates them, or sink into sleep. It is
all a balance, a strife, a battle. Why such striving and fighting, such
uneasy victory and deep unrest should be the Father’s will for all His
creatures, I know not; but that it is a condition, a law of His own
mind, I can reverently believe. When we sing the Benedicite, which I
for one do with all my heart, we must be conscious that it is only a
selection, after all, of phenomena that are impressive, delightful, or
useful to ourselves. Nothing that we call, God forgive us, noxious,
finds a place there. St. Francis, indeed, went further, and praised
God for “our sister the Death of the Body,” but in the larger
Benedicite of the universe, which is heard by the ear of God, the
fever and the pestilence, the cobra and the graveyard worm utter
their voices too; and who shall say that the Father hears them not?
The Joy of the If one believes that happiness is inch by inch
World diminishing, that it is all a losing fight, then it must
be granted that we have no refuge but in a Stoic
hardening of the heart; but when we look at life and see the huge
preponderance of joy over pain—such tracts of healthy energy,
sweet duty, quiet movement—indeed when we see, as we often do,
the touching spectacle of hope and joy again and again triumphant
over weakness and weariness; when we see such unselfishness
abroad, such ardent desire to lighten the loads of others and to bear
their burdens; then it is faithless indeed if we allow ourselves to
believe that the Father has any end in view but the ultimate
happiness of all the innumerable units, which He endows with
independent energies, and which, one by one, after their short taste
of this beautiful and exquisite world, resign their powers again, often
so gladly, into His hand.
Our Insignificance But the fault, if I may so phrase it, of this faith,
is the vastness of the conception to which it opens
the mind. When I contemplate this earth with its continents and
islands, its mountains and plains, all stored with histories of life and
death, the bones of dead monsters, the shattered hulks of time; the
vast briny ocean with all the mysterious life that stirs beneath the
heaving crests; when I realise that even this world, with all its
infinite records of life, is but a speck in the heavens, and that every
one of the suns of space may be surrounded with the same train of
satellites, in which some tumultuous drama of life may be, nay, must
be enacting itself—that even on the fiery orbs themselves some
appalling Titan forms may be putting forth their prodigious energies,
suffering and dying—the mind of man reels before the thought;—
and yet all is in the mind of God. The consciousness of the
microscopic minuteness of my own life and energies, which yet are
all in all to me, becomes crushing and paralysing in the light of such
a thought. It seems impossible to believe, in the presence of such a
spectacle, that the single life can have any definite importance, and
the temptation comes to resign all effort, to swim on the stream,
just planning life to be as easy and as pleasant as possible, before
one sinks into the abyss.
12
From such a paralysis of thought and life two beliefs have saved
me.
The Master First, it may be confessed, came the belief in the
Spirit of God, the thought of inner holiness, not
born from any contemplation of the world around, which seems
indeed to point to far different ideals. Yet as true and truer than the
bewildering example of nature is the inner voice which speaks, after
the wind and storm, in the silent solitudes of the soul. That this
voice exists and is heard can admit of no tangible demonstration;
each must speak for himself; but experience forbids me to doubt
that there is something which contradicts the seduction of appetite,
something which calls, as it were, a flush to the face of the soul at
the thought of triumphs of sense, a voice that without being derisive
or harsh, yet has a terrible and instantaneous severity; and wields a
mental scourge, the blows of which are no less fearful to receive
because they are accompanied with no physical disaster. To
recognise this voice as the very voice and word of the Father to
sentient souls, is the inevitable result of experience and thought.
Then came the triumphant belief, weak at first, but taking slow
shape, that the attitude of the soul to its Maker can be something
more than a distant reverence, an overpowering awe, a humble
worship; the belief, the certainty that it can be, as it were, a
personal link—that we can indeed hold converse with God, speak
with Him, call upon Him, put to use a human phrase, our hand in
His, only desiring to be led according to His will.
Then came the further step; after some study of the systems of
other teachers of humanity, after a desire to find in the great
redeemers of mankind, in Buddha, Socrates, Mahomet, Confucius,
Shakespeare, the secret of self-conquest, of reconciliation, the
knowledge slowly dawns upon the mind that in Jesus of Galilee
alone we are in the presence of something which enlightens man not
from within but from without. The other great teachers of humanity
seem to have looked upon the world and into their own hearts, and
deduced from thence, by flashes of indescribable genius, some order
out of the chaos, some wise and temperate scheme, but with Jesus
—though I long resisted the conviction—it is different. He comes,
not as a man speaking by observation and thought, but as a visitant
from some secret place, who knows the truth rather than guesses at
it. I need not say that his reporters, the Gospel writers, had but an
imperfect conception of His majesty. His ineffable greatness—it could
not well be otherwise; the mystery rather is that with such simple
views of life, such elementary conceptions of the scheme of things,
they yet gave so much of the stupendous truth, and revealed Jesus
in his words and acts as the Divine Man, who spoke to man not by
spiritual influences but by the very authentic utterance of God. Such
teaching as the parables, such scenes as the raising of Lazarus, or
the midday talk by the wayside well of Sychar, emerge from all art
and history with a dignity that lays no claim to the majesty that they
win; and as the tragedy darkens and thickens to its close, such
scenes as the trial, recorded by St. John, and the sacred death,
bring home to the mind the fact that no mere humanity could bear
itself with such gentle and tranquil dignity, such intense and yet such
unselfish suffering as were manifested in the Son of Man.
The Return And so, as the traveller goes out and wanders
through the cities of men, among stately palaces,
among the glories of art, or climbs among the aching solitudes of
lonely mountains, or feasts his eyes upon green isles floating in
sapphire seas, and returns to find that the old strait dwelling-place,
the simple duties of life, the familiar friends, homely though they be,
are the true anchors of the spirit; so, after a weary pilgrimage, the
soul comes back, with glad relief, with wistful tenderness, to the old
beliefs of childhood, which, in its pride and stubbornness, it cast
aside, and rejected as weak and inadequate and faded; finds after
infinite trouble and weariness that it has but learnt afresh what it
knew; and that though the wanderer has ransacked the world,
digged and drunk strange waters, trafficked for foreign merchandise,
yet the Pearl of Price, the White Stone is hidden after all in his own
garden-ground, and inscribed with his own new name.
13
I need not enter very closely into the period of my life which
followed the university. After a good deal of hesitation and
uncertainty I decided to enter for the Home Civil Service, and
obtained a post in a subordinate office. The work I found not wholly
uninteresting, but it needs no special record here. I acquired the
knowledge of how to conduct business, a certain practical power of
foreseeing contingencies, a certain acquaintance with legal
procedure, and some knowledge of human nature in its official
aspect.
Intellectually and morally this period of my life was rather
stagnant. I had been through a good deal of excitement, of mental
and moral malady, of general bouleversement. Nature exacted a
certain amount of quiescence, melancholy quiescence for the most
part, because I felt myself singularly without energy to carry out my
hopes and schemes, and at the same time it seemed that time was
ebbing away purposelessly, and that I was not driving, so to speak,
any piles in the fluid and oozy substratum of ideas on which my life
seemed built. To revel in metaphors, I was like a snake which has
with a great strain bolted a quadruped, and needs a long space of
uneasy and difficult digestion. But at the time I did not see this; I
only thought I was losing time: I felt with Milton—
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.
ebookfinal.com