Professional Documents
Culture Documents
Textbook Building Java Programs A Back To Basics Approach Stuart Reges Ebook All Chapter PDF
Textbook Building Java Programs A Back To Basics Approach Stuart Reges Ebook All Chapter PDF
https://textbookfull.com/product/building-java-programs-a-back-
to-basics-approach-stuart-reges-2/
https://textbookfull.com/product/building-java-programs-a-back-
to-basics-approach-5th-edition-stuart-reges/
https://textbookfull.com/product/building-python-programs-1st-
edition-stuart-reges/
https://textbookfull.com/product/simpler-living-back-to-basics-
guides-2nd-edition-jeff-davidson/
College physics : a strategic approach 4th Edition
Stuart Field
https://textbookfull.com/product/college-physics-a-strategic-
approach-4th-edition-stuart-field/
https://textbookfull.com/product/artificial-intelligence-a-
modern-approach-4th-edition-stuart-russell/
https://textbookfull.com/product/restful-java-web-services-a-
pragmatic-guide-to-designing-and-building-restful-apis-using-
java-3rd-edition-balachandar/
https://textbookfull.com/product/a-functional-approach-to-java-
augmenting-object-oriented-java-code-with-functional-
principles-1st-edition-ben-weidig/
https://textbookfull.com/product/back-trouble-a-new-approach-to-
prevention-and-recovery-based-on-the-alexander-technique-deborah-
caplan/
Building Java Programs
A Back to Basics Approach
Fourth Edition
Stuart Reges
University of Washington
Marty Stepp
Stanford University
The authors and publisher of this book have used their best efforts in
preparing this book. These efforts include the development, research, and
testing of the theories and programs to determine their effectiveness. The
authors and publisher make no warranty of any kind, expressed or implied,
with regard to these programs or to the documentation contained in this book.
The authors and publisher shall not be liable in any event for incidental or
consequential damages in connection with, or arising out of, the furnishing,
performance, or use of these programs.
Copyright © 2017, 2014 and 2011 Pearson Education, Inc. or its affiliates.
All rights reserved. Printed in the United States of America. This publication
is protected by copyright, and permission should be obtained from the
publisher prior to any prohibited reproduction, storage in a retrieval system,
or transmission in any form or by any means, electronic, mechanical,
photocopying, recording, or otherwise. For information regarding
permissions, request forms and the appropriate contacts within the Pearson
Education Global Rights & Permissions department, please visit
www.pearsonhighed.com/permissions/.
10 9 8 7 6 5 4 3 2 1
Introductory computer science courses are often seen as “killer” courses with
high failure rates. But as Douglas Adams says in The Hitchhiker's Guide to
the Galaxy, “Don't panic.” Students can master this material if they can learn
it gradually. Our textbook uses a layered approach to introduce new syntax
and concepts over multiple chapters.
Here are some of the changes that we have made in the fourth edition:
Since the publication of our third edition, Java 8 has been released. This new
version supports a style of programming known as functional programming
that is gaining in popularity because of its ability to simply express complex
algorithms that are more easily executed in parallel on machines with
multiple processors. ACM and IEEE have released new guidelines for
undergraduate computer science curricula, including a strong
recommendation to cover functional programming concepts.
We have added a new Chapter 19 that covers most of the functional concepts
from the new curriculum guidelines. The focus is on concepts, not on
language features. As a result, it provides an introduction to several new Java
8 constructs but not a comprehensive coverage of all new language features.
This provides flexibility to instructors since functional programming features
can be covered as an advanced independent topic, incorporated along the
way, or skipped entirely. Instructors can choose to start covering functional
constructs along with traditional constructs as early as Chapter 6. See the
dependency chart at the end of this section.
Case studies. We end most chapters with a significant case study that
shows students how to develop a complex program in stages and how to
test it as it is being developed. This structure allows us to demonstrate
each new programming construct in a rich context that can't be achieved
with short code examples. Several of the case studies were expanded
and improved in the second edition.
The following table shows how the layered approach works in the first six
chapters:
Control Programming
Chapter Data Input/Output
Flow Techniques
procedural
1 methods String literals println, print
decomposition
definite variables, local variables, class
2 loops expressions, constants,
(for) int, double pseudocode
console input, 2D
return
3 using objects parameters graphics
values
(optional)
conditional char pre/post conditions, printf
4
(if/else) throwing exceptions
indefinite
assertions, robust
5 loops boolean
programs
(while)
token/line-based file
6 Scanner file I/O
processing
Answers to all self-check problems appear on our web site and are accessible
to anyone. Our web site has the following additional resources for students:
Source code and data files for all case studies and other complete
program examples
Our web site has the following additional resources for teachers:
Closed lab creation tools to produce lab handouts with the instructor's
choice of problems integrated with the textbook
MyProgrammingLab
MyProgrammingLab is an online practice and assessment tool that helps
students fully grasp the logic, semantics, and syntax of programming.
Through practice exercises and immediate, personalized feedback,
MyProgrammingLab improves the programming competence of beginning
students who often struggle with basic concepts and paradigms of popular
high-level programming languages. A self-study and homework tool, the
MyProgrammingLab course consists of hundreds of small practice exercises
organized around the structure of this textbook. For students, the system
automatically detects errors in the logic and syntax of code submissions and
offers targeted hints that enable students to figure out what went wrong, and
why. For instructors, a comprehensive grade book tracks correct and
incorrect answers and stores the code inputted by students for review.
VideoNotes
Roughly 3–4 videos are posted for each chapter. An icon in the margin of the
page indicates when a VideoNote is available for a given topic. In each video,
we spend 5–15 minutes walking through a particular concept or problem,
talking about the challenges and methods necessary to solve it. These videos
make a good supplement to the instruction given in lecture classes and in the
textbook. Your new copy of the textbook has an access code that will allow
you to view the videos.
Acknowledgments
First, we would like to thank the many colleagues, students, and teaching
assistants who have used and commented on early drafts of this text. We
could not have written this book without their input. Special thanks go to
Hélène Martin, who pored over early versions of our first edition chapters to
find errors and to identify rough patches that needed work. We would also
like to thank instructor Benson Limketkai for spending many hours
performing a technical proofread of the second edition.
Second, we would like to thank the talented pool of reviewers who guided us
in the process of creating this textbook:
Finally, we would like to thank the great staff at Pearson who helped produce
the book. Michelle Brown, Jeff Holcomb, Maurene Goo, Patty Mahtani,
Nancy Kotary, and Kathleen Kenny did great work preparing the first edition.
Our copy editors and the staff of Aptara Corp, including Heather Sisan, Brian
Baker, Brendan Short, and Rachel Head, caught many errors and improved
the quality of the writing. Marilyn Lloyd and Chelsea Bell served well as
project manager and editorial assistant respectively on prior editions. For
their help with the third edition we would like to thank Kayla Smith-Tarbox,
Production Project Manager, and Jenah Blitz-Stoehr, Computer Science
Editorial Assistant. Mohinder Singh and the staff at Aptara, Inc., were also
very helpful in the final production of the third edition. For their great work
on production of the fourth edition, we thank Louise Capulli and the staff of
Lakeside Editorial Services, along with Carole Snyder at Pearson. Special
thanks go to our lead editor at Pearson, Matt Goldstein, who has believed in
the concept of our book from day one. We couldn't have finished this job
without all of their hard work and support.
Stuart Reges
Marty Stepp
Break through
To Improving results
MyProgammingLab™
Through the power of practice and immediate personalized feedback,
MyProgrammingLab helps improve your students' performance.
Programming Practice
With MyProgrammingLab, your students will gain firs-hand programming
experience in an interactive online environment.
Graduated Complexity
MyProgrammingLab breaks down programming concepts into short,
understandable sequences of exercises. Within each sequence the level and
sophistication of the exercises increase gradually but steadily.
Dynamic Roster
Students' submissions are stored in a roster that indicates whether the
submission is correct, how many attempts were made, and the actual code
submissions from each attempt.
Pearson eText
The Pearson eText gives students access to their textbook anytime, anywhere
www.pearsonhighered.com/cs-resources
1. Why Programming? 2
5. Why Java? 7
2. System.out.println 15
3. Escape Sequences 15
1. Syntax Errors 24
2. Logic Errors (Bugs) 28
1. Static Methods 31
2. Flow of Control 34
1. Structured Version 41
1. Primitive Types 64
2. Expressions 65
3. Literals 67
4. Arithmetic Operators 68
5. Precedence 70
2. 2.2 Variables 74
1. Assignment/Declaration Variations 79
2. String Concatenation 82
3. Increment/Decrement Operators 84
1. Scope 99
2. Pseudocode 105
1. DrawingPanel 197
3. Colors 203
4. System.out.printf 269
3. Simulations 324
When the attacks occur in alarming frequency, as they sometimes do, the condition is known as the
status epilepticus. Leuret had a patient who had eighty in two hours, and Delasiauve reports the case of
a young man fifteen years old who had twenty-five hundred in one month. They may be so numerous as
to be apparently continuous. The patient remains in a state of coma (the status epilepticus), with very
high temperature. If he be not restored, he sinks into a deeper coma, and all the signs of collapse
manifest themselves. Bed-sores form, œdema of the lungs ensues, and the patient dies. Happily, this
condition of affairs is rare.
Delasiauve calls attention to the fact that the first two or three attacks that usher in this state do not
usually attract much attention, but the succeeding ones are so violent as to immediately suggest violent
consequences. In one of my cases the attacks, when they had once become numerous, were readily
excited by the least jarring, noise, or handling, just as we find in strychnine-poisoning or tetanus.
Irregular Forms.—There are occasional cases of psychical or masked epilepsy, the study of which is
intensely interesting. Such forms are characterized by perverted consciousness and a low degree of
volitional direction which may vary from automatism to the undoubted exercise of complex functions of
the mind, though badly co-ordinated. Mesnet's soldier, when subject to a paroxysm and apparently
unconscious, would perform a number of suggested acts in a rhythmical manner and with no
subsequent knowledge of the previous event: when started off by the word of command to march, he
would blindly go on, marking time when he met with an obstruction until stopped, or when a paper and
tobacco were placed in his hands he would proceed to roll an unlimited number of cigarettes.
Two cases of a more complex exercise of certain intellectual powers, while others were dormant, came
under my observation some time ago. One of them was a young man of twenty-three, who had had
irregular epileptic seizures for some years. He went to bed one evening as usual, arose, and
breakfasted with his family without creating any suspicion that he was at all unwell. He then went down
to his place of business, and after his arrival was sent to a distant part of the city for some tool. On his
return down town he stopped at a tobacconist's and became involved in a quarrel with one of the
persons in the shop. A policeman was called, who, more intelligent than many of his class, immediately
detected something queer about the man, arrested him, and afterward took him to Bellevue Hospital.
There he remained three days, and suddenly returned to consciousness and a knowledge of his
surroundings, but was entirely ignorant of his unfortunate experience. It is unnecessary to say his habits
were perfectly good and he was not drunk at the time of the quarrel or arrest. His last recollection was
that of going to bed the night before the day of his arrest.
Another case of unusual interest which came under my care, illustrating a phase of sensory epilepsy, is
worthy of reproduction:
C. O——, aged twenty-two, is a reporter attached to one of the New York afternoon papers, who
received a severe injury of the head when but three years old. He fell from the second story of an
unfinished building to the cellar, striking the upper and back part of his head upon a beam. He was
rendered unconscious, and remained so for a day or more. He recovered from the immediate bad effect,
but has suffered from severe general headaches, which recur every week or so, with an increase in the
amount of urine excreted. About six months ago he began to have epileptic convulsions of a violent
character almost every day, and sometimes more often. These were precipitated by excitement, and he
had a great many when worried about his wife at the time of her delivery. Upon one occasion he fell
down stairs and injured himself quite severely. The attacks were, as a rule, preceded by an epigastric
aura of long duration, and occasionally by a visual aura, and, according to the testimony of his
associates, he became strange and queer. When in such a dazed condition he would restlessly wander
about his office, and suddenly, without any cry, become convulsed. After the attack he slept soundly.
The bromides of sodium and ammonium and digitalis did little or no good, but the bromide of nickel
appeared to have some influence. During the past month he has had only two or three attacks, but
these have been of a quite irregular character. He told me that there were times when he felt like doing
himself an injury, and that he had impulses to kill some one else. His companions said he was irritable,
pugnacious, and easily thwarted, and his brother-in-law stated that upon several occasions he had
queer turns, when he would raise his hand to strike some member of the family—that he subsequently
knew nothing of his conduct, and when it was detailed to him he appeared greatly astonished.
Mr. O—— came to my office in company with a friend at ten o'clock in the morning of December 27,
1883. He had had one of his attacks at the newspaper office, of rather more severe character than
usual, at eight o'clock, with a psychical aura, during the existence of which he was very morose and
sullen. Upon recovery he was speechless, though he could communicate by signs. Upon his arrival at
my office his manner was composed and he appeared somewhat dazed. His pupils were dilated, but
contracted readily to light. I asked him one or more questions regarding his inability to speak, which he
perfectly understood, and when I gave him a pencil and a piece of paper he replied without difficulty in
writing. When told to make a great effort to speak he did so, and I thought I detected the word ‘To day,’
but he could not repeat it, though he tried and expressed great annoyance. He was unable to utter any
sound except a sort of groan, which could not in any way be taken as an element of speech. I examined
his larynx, but found nothing which could explain his impaired phonation, and I sent him to Dr. Asch,
who found absolutely no abnormal appearances to account for the speech difficulty. The patient could
not phonate, and though he made attempts to enunciate the vowel-sounds, and the vocal cords were
approximated, he made no orderly sound. Asch found a slight laryngitis of no importance.
The patient went home, and remained speechless all day, and was seen by my associate, G. de Forrest
Smith, in the evening. What occurred during and after that gentleman's visit is contained in his notes: “I
was called to see patient about 8.15 P.M. He was lying upon the bed, but had not slept; recognized me
and motioned that he could not speak, and I found that he could only say one or two words, and this
with the greatest effort, and so all my questions were put so that he could answer them by nodding or
shaking his head. He knew that he had had an attack in the morning, that he had seen Hamilton and
Asch, and recalled various incidents of the day, answering intelligently my questions in regard to them.
He indicated by motions that his inability to speak was due to a lump in his throat. When asked if he had
any trouble to think of the word he wanted, he shook his head, but shortly afterward hesitated in an
answer, and when asked if this was due to his inability to think of the word, said ‘Yes.’ Was asked if he
had any loss of power in either side, and he motioned to his right arm and leg, and said that he felt a
numbness and pricking on that side. On his grasping my hands with his, the right was perceptibly
weaker.
“At one time he seemed confused as to which was his right or left side, and put up both hands, and after
looking at first one and then the other in a puzzled manner, at last decided correctly, then smiled
apparently at his confusion.
“All this time he had been half lying on the bed. He now intimated that he was tired, put his head down
on the pillow and began to belch up wind, and as he appeared about to vomit I called for a basin; but
this was only the beginning of an attack; the muscles of the neck and right side assumed a state of tonic
spasm, the extensors predominating, so that the head was turned a little to the left and forcibly thrust
back into the pillow, and the right arm and leg were firmly extended. He remained in this position about
one minute; then, taking two or three full inspirations, put his hand to his throat and said plainly,
‘Something has fallen from there.’ On being asked ‘What?’ he replied, ‘A bone has fallen from my
throat.’ I told him it was well that the bone had fallen, as now he could speak. ‘Why,’ said he, ‘I have had
no difficulty in talking.’ On being asked why he had seen Asch, he said ‘Who is Dr. Asch? I never saw
any such person.’ Further questioning showed that all the occurrences of the day (except those which
had taken place immediately before the first attack) were an absolute blank, and he thought it still
morning. He asked the time, and I told him half-past eight o'clock in the evening. At this he seemed
much surprised and said, ‘Why, I went to work this morning; how did I come here?’ I then explained to
him that he had been ill. After further conversation he said he felt sleepy, and, after resting a few
minutes, he arose, put on his slippers, and came out into the room. He walked with difficulty, because of
the loss of power in the right side, which he said felt numb and sore, as if it had been pounded, also a
sensation of pins and needles. After the attack his mind was perfectly clear, and he could talk as well as
ever, and all that had happened before the attack in the morning he could remember perfectly well, but
the interval between the two was a complete blank. His inability to speak seemed due, not to lack of
knowledge of what he wanted to say, but rather to want of power to form the words, although there was
no paralysis of the vocal muscles. When he did manage to say a word, it was invariably the correct one,
but it was always done with the greatest effort. The day after the attacks he remained at home; the next
day he went to work, but his head felt heavy and confused. Two days after he complained of a pressure
on the left side and back part of the head; otherwise he was all right. At this visit he said that after I had
left him on the night of the attacks he intently thought, striving to recall the incidents of the day, and after
a time concluded he could remember being at Thirty-third street, but did not know how he got there. He
thought he could recall going to see Asch, but would not know him if he should see him. I then asked
him how questions were answered by him on that day; he answered he did not know, as he had not
thought of that; then, after a few moments' reflection, said he must have written the answers. He was
then shown some of the answers he had written, which he recognized, and by an effort of memory could
recall some of the incidents of writing them. He was still unable to remember anything that occurred
after his arrival home previous to the last convulsion.”
January 27, 1885: This patient subsequently suffered from several attacks in which the psychical
element predominated. His head presented a remarkable deformity, there being a prominence
posteriorly which might be compared to a caput succedaneum, only it was entirely osseous. The upper
margin was separated from the anterior parts by a deep sulcus.
Under such circumstances we find very often that acts of great violence are committed by such
epileptics for which they are entirely irresponsible. Two or three cases of the kind occur to me now. One
of them was a boy who always bit every one and everything—his family, the domestic animals, and
inanimate objects; another, a most dignified and lady-like woman, who violently struck different
members of her family; and within the past week a woman was brought to me who hurled a kerosene
lamp at a perfect stranger with whom she was quietly talking before the seizure was precipitated.
Numerous instances are related where individuals while in the masked epileptic state have wandered
for long distances and committed a variety of purposeless acts, and undoubtedly many of the
mysterious disappearances are of this order.
SENSORY EPILEPSY.—Some years ago Hammond referred to certain peculiar epileptic attacks in which
sensory manifestations were very pronounced. To this condition he gave the name thalamic epilepsy,
believing the condition to be one of the optic thalamus. Among the large number of unclassified and
irregular cases reported by various authors there are many so much resembling each other that I think
they should be relegated to a special place.32 The notable examples of Sommers, Bergmann, Tagges,
Guislain, and others belong to this category.
32 I shortly afterward, believing the term a misnomer, invented that in use: “On Cortical Sensory Discharging Lesions or Sensory
Epilepsy,” New York Med. Journal and Obstetrical Review, June, 1882; also see “A Contribution to the Study of Several Unusual
Forms of Sensory Epilepsy which are probably Dependent upon Lesions of the Occipital Cortex,” New York Med. Record, April 4,
1885.
The features of this form of epilepsy are (1) the expression of some hallucination (prodromal stage), or
hemiopia; (2) supraorbital neuralgia; (3) aphasia, formication; (4) slight loss of consciousness, and little
if any motor disturbance.
A few months ago I was consulted by a medical gentleman in regard to a patient who had for years
presented a curious train of nervous symptoms, which afterward assumed a form leading me to think
she might have sensory epilepsy. She would, in the presence of the gentleman who consulted me, who
was a personal friend of the patient and a medical man, stop short in the midst of an animated
conversation, look fixedly ahead, appearing momentarily lost, remaining abstracted for a short period,
possibly a minute, and on recovering herself go on, finishing the sentence she had commenced before
the seizure. At this time she constantly had hallucinations of a visual character, when she saw animals,
birds, figures of men and women, who approached her, as well as a variety of other objects. A common
hallucination, which had been repeated quite frequently, consisted in visions in which green leaves and
white rabbits and other objects familiar to her in childhood figured extensively. Upon one occasion, while
sitting in the drawing-room, opposite a door which communicated with the hall, she suddenly called her
companion's attention to the hand of a man which she saw clasping the baluster rail. The hand was
seemingly disconnected from the arm. She was somewhat agitated, and it was nearly half a minute
before the vision was dismissed. Sometimes she would call attention to the hallucinations before the
attack, but more often she became transfixed, apparently lost, and then recovering she described her
visions minutely. She has apparently been able to foresee the attacks and ward them off by a strong
voluntary effort. So far as can be learned, there is no hysterical element in the case, but her seizures are
more frequent at the time of menstruation. In a private note it is stated that “the family history of the
patient is very good, and she has always seemed remarkably healthy and robust, and has shown more
than usual intellectual ability. She has appeared to persons generally to be of a contented, happy
disposition.... At night, when she closed her eyes, she suffered from these hallucinations, especially
after a day of fatigue. Her pupils are usually dilated, but her color undergoes no change during the
seizure.”
J. B——, a bright boy aged sixteen, was sent to me by F. H. Bosworth in April, 1883. He comes of
nervous stock, his mother being subject to epilepsy, and his father is an eccentric man who manifests
his mental peculiarities chiefly in a morbid restlessness and irascibility. There is a brother who is healthy.
The attention of the parents was first called to the boy's condition by his recital of a sudden attack which
occurred during the summer of 1882. While rowing upon a river he suddenly and completely lost the
visual use of the right eye, so that in looking at a number of ducks swimming near his boat he failed to
perceive those upon one side of the flock. This condition lasted for twenty minutes, and after a brief and
severe pain over the right eye he became unconscious, the unconsciousness being preceded by a
tingling and numbness of the hand, forearm, arm, and left side of the tongue. He has subsequently had
eight or ten of these attacks, of which the following is an example: Usually without any bad feelings,
physical or mental, he, while engaged in any duty or at any time, suffers a sudden unilateral blindness.
This is never gradual, and not like the form of amblyopia in which the visual field is gradually reduced.
There is some hemichromatopsia. It would seem as if the retinal anæsthesia was unequal, for while
usually the loss is complete and universal, it sometimes happens that there is only a limited loss. Upon
one occasion, while reading, he suddenly lost the printed matter of the right lower half of the page below
a diagonal line extending from the right upper corner to the left lower corner. There is never diplopia.
This deprivation lasts anywhere from ten to twenty minutes; meanwhile, a distal anæsthesia, coming
very gradually, involves at first the fingers of the opposite hand, and successively extends to the
forearm, arm, and other parts, as I have already mentioned. There seems to be analgesia as well as
anæsthesia, for a pin may be run into the muscles without producing pain, and upon one occasion the
gum was freely pricked without any discomfort to the patient. It invariably happened that the cutaneous
sensory trouble occurred upon the side opposite to the hemianopsia and neuralgia, and in the greater
number of instances the left side was that affected. The third stage of the attack consists in migrainous
headache of a very severe kind, and which sometimes lasts for an hour or more. There is a subjective
feeling as if the eye was pushed forward. This disappears with nausea and relaxation. More often he
loses consciousness when the anæsthesia reaches its limit, which seems to be the extension of the
anæsthesia to the gums. Occasionally there are slight convulsive movements upon the anæsthetic side.
While the attacks involve the left side of the body as a rule, it happens that when there is primary left
hemianopsia and right-sided anæsthesia the boy becomes very much confused in speech, and
sometimes is paraphasic, the trouble being but transitory. He is sometimes unable to speak at all,
though perfectly conscious and in possession of his faculties. No pupillary disturbance has been noticed
at any time. Upon two occasions there was a swelling of gums and tongue, which was not only
subjective, but perceived by the mother. Occasionally he sees prismatic colors and rays before the
blindness, but this has been only once or twice. During his early life he had attacks of slight numbness
of the hands and feet which were not thought much of, and he had headache as well. He has been a
somnambulist.
MORBID ANATOMY AND PATHOLOGY.—The literature of the experimental physiology of epilepsy is enriched
by the observations of a variety of careful students, among them Sir Astley Cooper, Kussmaul and
Tenner, Brown-Séquard, Nothnagel, Schroeder Van der Kolk, Pitres, Hughlings-Jackson, and the
followers of the localization school, as well as many others more or less distinguished.
The experiments of many of the early writers were directed for the purpose of ascertaining the relations
of circulatory variations to convulsive seizures, and the most notable were those of Burrows and
Kussmaul and Tenner. These latter produced compression of the carotid arteries, and instituted cerebral
anæmia by free and exhausting hemorrhages. As a consequence, the emptying of the cerebral vessels
was followed by a loss of consciousness and by epileptiform convulsions, and it was necessary to
produce the same result to compress all the great afferent vessels of the brain. The experience of
surgeons generally is, that ligation of the common carotid upon one side of the neck is sometimes very
apt to produce an alarming anæmia, with occasional convulsions, and sometimes fatal consequences.
The experiments of Hall, Landois, Hermann, and others, as well as those of the writers just mentioned,
show that carotid compression results in capilliary anæmia and venous hyperæmia, and that with
cessation of this pressure there is a sudden congestion of all vessels. The susceptibility of the brain is
greatest at its posterior part and between the optic thalami and the cord. When the bulb was subjected
to sudden changes in its nutrition—such, for instance, as followed the experiments of Hermann, who
ligated simultaneously the superior and inferior venæ cavæ of a rabbit—there were not only
convulsions, but various cardiac and other disturbances which were undoubtedly due to central
impairment of function. Kussmaul and Tenner conducted their experiments with watch-glasses luted into
the cranium—a procedure which, however, at best, is unreliable.
Brown-Séquard some years ago in part established an important pathological truth, the theory of
epileptic zones, and demonstrated in certain animals that bruising and injury of the great nerve-trunks,
especially the great sciatic, would give rise to epilepsy, and that irritation of certain tracts would
precipitate the paroxysms. He further announced that the progeny of animals in whom epilepsy had
been thus induced very frequently inherited the epilepsy of the parent. By some it was held that such
epilepsies were purely peripheral, and Brown-Séquard even believed in spinal epilepsy. His spinal
epilepsic theory has, for the most part, been explained by the anatomical researches of Hitzig and the
doctrine of interrupted spinal inhibition. In fact, many of the spinal epilepsies are examples of
exaggerated reflexes.
The epileptiginous zone theory, which, while it induced many to believe that the disease might have its
origin outside of the brain, gave rise to the false assumption that attacks with distal auræ were primarily
non-cerebral, has been discarded, and most observers have arrived at the conclusion that even in these
cases the first explosion is due to some cerebral cell-discharge.
Hughlings-Jackson's grand work has revolutionized the views held prior to his first published writings,
about twelve years ago. He believes that any part of the gray matter may, through over-excitability, give
rise to convulsive attacks.
The experiment of Pitres and Frank33 bears upon the sensorial function of the cortex in showing that,
when the cortex is irritated, epileptiform convulsions follow, but if the exposed surface be subjected to
the ether spray the same irritation will only produce definite movements, but no convulsions.
33 Gazette des Hôpitaux, No. 38, 1883.
The investigations of Van der Kolk especially, and his followers, certainly give the medulla an important
place as the locus morbi of the malady; and it must be assumed, bearing in mind the existence of the
vaso-motor centres of Dieters and the presentation of symptoms indicative of disturbance at the floor of
the fourth ventricle, that the most important pathological changes must be looked for in this part of the
brain.
Jackson's cortical explanation is, however, fully in consonance with the medullary theory. If we study the
different stages of the attack, we shall find that there is probably a suspension of cortical inhibition—that
a derangement of the cortical cells or discharge may cause a resulting disturbance in the bulb. On the
other hand, a reflex irritation through the pneumogastric or from some distal part brings about the same
disturbance of equilibrium. There is anæmia due to irritation of the vaso-motor centre, an inhibition of the
great ganglion-cells, and a disturbance of function of the important cranial nerves. The primary anæmia
and unconsciousness are accounted for by this primary irritation of sympathetic filaments and vascular
constriction; the secondary hyperæmia is explained by the experiments of Kussmaul, which
demonstrated the succeeding congestion; or by irritation of the spinal accessory and contraction of the
muscles of the neck and compression of the large veins. The pupillary, ocular, respiratory, and other
symptoms indicate the disturbance of the nerve-nuclei in the bulb. The respiratory difficulty and the
interrupted decarbonization of the blood undoubtedly account for the secondary unconsciousness.
Van der Kolk34 in localizing the lesion in the medulla found capillary dilatations in the neighborhood of
the hypoglossal nuclei in tongue-biters. In epileptic patients who were in the habit of biting their tongues
during the fit the vessels were wider than in those who did not bite the tongue, on an average in the
course of the hypoglossus by 0.096; in the corpus olivare, which certainly here plays an important part,
by 0.098 mm.; and in the raphé by 0.055. In those who did not bite the tongue, on the contrary, the
vessels in the path of the vagus were 0.111 wider than in those in the first, Table A.35
34 “On the Minute Structure and Functions of the Spinal Cord,” by J. L. C. Schroeder Van der Kolk, New Syd. Soc. Trans.
35 TABLE.
Different Epileptics. Hypoglossus. Corpus olivare. Raphé. Vagus.
Table A—tongue biters 0.306 0.315 0.315 0.237
Table B—non biters 0.210 0.217 0.217 0.348
Difference +0.096 A. +0.098 A. +0.055 A. +0.111 B.
Nothnagel36 is of the opinion that the anæmia of the brain is not the cause of the convulsions, but that
the “excitation of the vaso-motor centre and that of the centre for the muscles are co-ordinate—that both
go on side by side, and are independent of each other.”
36 Ziemssen's Encyclopædia, vol. xiv. p. 268.
He by this theory explains the occurrence of those forms of petit mal in which there is loss of
consciousness without convulsions, and, on the other hand, twitchings before the coma.
The best argument in favor of this hypothesis is in Jacksonian epilepsy, when monospasms exist
oftentimes with a succeeding extension.
In those cases which are the outgrowth of migraine the pathological condition is probably an
exaggerated tendency to angio-spasm, the original impaired vascular tonus in the beginning giving rise
simply to pain and lesser troubles, while after repeated changes of calibre not only nutritive alterations
ensue, but hyperexcitability of the bulbar convulsion centres as well.
The labors of those who have endeavored to connect epilepsy with cerebral-tissue alterations have
been attended by nothing very definite or positive, so far as pathological explanation is concerned. The
post-mortem appearances have varied widely, and the only conclusion to be reached is that which
shows that almost any morbid gross alteration of the cerebral mass may be symptomatized by
convulsions, but such a production of paroxysmal trouble is much more likely to be the case, and in a
more definite manner, when the cortical motor-centres are subject to destructive disease or irritative
pressure. This is even not always the case, for numerous cases of injury of the paracentral lobe have
been recorded with no showing of resulting convulsions. The long list of autopsies which I will not here
consider show that an epilepsy may owe its origin to the pressure of a spicula of bone, or to the
pressure exercised by depressed fragments of the same—to tumors or adventitious products,
meningitis, cortical encephalitis, vascular degeneration, ventricular œdema, contusio-cerebri, and many
other morbid processes which result in rapid or tardy degeneration. Of course, in such cases the
genesis of the disease depends not so much upon the nature of the lesion as the location. The fruitful
collections of cases of Ogle and Jackson are full of examples of limited growth or disease involving the
cerebral cortex, while numerous cases collated by other writers show disease of the bulb or various
peripheral parts which have been closely connected with the growth and behavior of the affection.
Several able pathologists have independently and repeatedly found that sclerotic degeneration of the
hippocampal folds often existed. Delasiauve and Lébert first observed this lesion, but many modern
authorities—among them Meynert, Nothnagel, and Charcot—who have also found this appearance,
regard the change as of purely secondary, and consequently unimportant, character.
Tamburini37 reports a case of hemiplegic epilepsy with induration of the left optic thalamus and the left
cornu ammonis, in which aphasia existed. Pfleger38 and Henkes have also found the sole lesion to be
induration of the cornu ammonis. Of Pfleger's39 43 autopsies, atrophy and sclerosis of the cornu
ammonis were found twenty-five times, and it was noted that the extent of the morbid change bore
relation to the violence and frequency of the seizures.
37 Sallanzani, Modena, 1879, viii. 550-557.
In many examples, especially where the disease has been found to be unilateral and associated with
more or less hemiatrophy, the autopsy disclosed a corresponding hemiatrophy of the brain. Many such
cases are reported. I have frequently found epilepsy in association with cerebral hypertrophy, and as a
symptom of cerebral tuberculosis it has long been recognized, and numerous cases are reported in
which for a long time the paroxysms were the only manifestations of the condition. In one of these
cases, reported by Luys,40 the bulb was found involved by tuberculous matter.
40 Archives gén. de Méd., 1869, ii. 641 et seq.
Convulsions have very frequently been noted in association with imperfect cerebral development, and
Echeverria laid great stress upon the hyperplastic increase in volume of certain parts of the brain.
Marie Bra41 has thus summed up her conclusions relating to the morbid anatomy of epilepsy:
“1. The mean weight of the brains of epileptics is less than the physiological mean.
“3. There frequently exists an asymmetry between the lobes (not peculiar to epilepsy). The increase
of weight is sometimes found on the right and sometimes on the left side. Equality is the exception.
“4. In no form of mental disease (excepting perhaps general paresis, which is accompanied also by
epileptiform crises) have we met with so marked and constant a variation between the weights of
the hemispheres as exists in epilepsy.”
41 Referred to by Axenfeld.
Drasche, Green, Greenhow, Löbel, and others have detailed cases in which tuberculous deposits were
undoubtedly the causes of the disease.
Kussmaul and Tenner, Hoffman, and others have held that a stenosis of the superior part of the
vertebral canal may explain, through pressure upon the cord, the genesis of the attack, and Kroon found
asymmetry of the medulla oblongata.
The microscopical changes that have been found in brains where no gross lesion was apparent are by
no means distinctive. I have myself examined the brains of many epileptics with discouraging results.
The varying granular cell-degeneration, capillary dilatation, and exudative changes are common
enough. In several cases of cortical epilepsy I found more or less advanced degeneration of the great
cells in limited regions.
By far the most important and exact changes are those observed in the cases of sensory epilepsy. I
have elsewhere collected some continental cases. In brief, areas of occipital softening or degeneration
have been discovered in those cases with hallucination, sensory expressions, and hemiopia. In one
case attended by hallucination of smell the autopsy disclosed the following:
M. M——, was a stout Irish woman about forty years of age. She had suffered from a light form of
epilepsy dating from the tenth year, and resulting, as she stated, from a fall, when she struck her head
and was unconscious thereafter for some hours. No scar was visible, however. No satisfactory history
could be obtained regarding her early life and the first paroxysms. In the beginning these were rather
frequent, and she had as many as four or five a month. They afterward diminished in number and
severity, and for many years she had but three or four in the course of the year. They were not very
severe, and she was enabled to pursue her work as a housemaid, but did not keep her places for any
great length of time. She rarely bit her tongue, but usually frothed at the mouth and became livid and
convulsed for a short time. There was no history of one-sided spasms. As I have stated, I could gain no
accurate account of the previous attacks, except that she nearly always had an aura of a peculiar
character, which was a prominent feature of the seizure and very pronounced. She suddenly perceived
a disagreeable odor, sometimes of smoke, sometimes of a fetid character, and quite uncomplicated by
other sensory warnings; and afterward became unconscious, and remained so for two or three minutes.
She was invariably able to describe her sensations when she recovered, which she always did when I
asked her, comparing her warning to the smell of burning rags, to the smell from a match, and, as she
expressed it, it sometimes rose up in her head and choked her. She was under my observation for one
or two years, but eventually developed phthisis, and died, her attacks occurring from time to time until
her death.
Besides well-marked tuberculous lesions in the lungs, there was little of interest so far as the visceral
examination was concerned. The brain was removed and its peculiarities were carefully observed. A
great quantity of fluid was found, especially at the dependent portions of the membranes and in the
ventricles, while the dura was thickened and pearly in spots. There was a condition that might be
likened to a low grade of hemorrhagic pachymeningitis, and at the base of the brain old plastic changes
were found, there being adhesions, especially in the region of the middle lobes, but more particularly on
the right side and near the median line. The brain as a whole was small, and weighed forty-one ounces
and a fraction. The sulci were deep and gaping, and the convolutions were distinct. There was no
atrophy of the fore-brain convolutions, and no other pathological appearance was presented except that
found in the meninges, but at the lower part of the temporo-sphenoidal lobe of the right side an
appearance was found of an exceedingly interesting nature. At this point a decided shrinkage of tissue
was discovered, with depression and adhesion of the pia, the induration involving the uncinate gyrus
and parts of the adjacent convolutions, as represented in the drawing. No induration or softening of the
great motor tracts was observed, and the optic thalamus and parts adjacent were uninvolved, as was
the cord. An attempted microscopic examination, undertaken some months subsequently, was
unsatisfactory, because of the bad condition of the brain, the preserving fluid having been improperly
made. The olfactory nerves were not involved. The third frontal convolution was examined, but no
disease was found there. Consequently, it is to be inferred that no lesion of the external root of the
olfactory nerve existed.
FIG. 27.
EPILEPSY. SYNCOPE.
Loss of consciousness Loss of consciousness follows
sudden. feeling of faintness.
Period of complete Unconscious throughout, no
unconsciousness usually convulsions.
short.
The existence of auræ of a The existence of preliminary vague
well-defined type. prostration, nausea, and irregular
heart action.
Often involuntary discharge Quite rare or never.
from bowels and bladder.
Patient usually falls into heavy After slight weakness patient is
sleep or is indifferent after anxious and worried, and quickly
convulsion. seeks relief.
There are cases, however, which are puzzling, and come under the
head of auditory epilepsy rather than auditory vertigo; and in these
there is a multiplicity of expressions, the auditory symptoms
predominating.
———Cases.——— ———Percentage.———
Unimproved. Arrested. Unimproved. Arrested.
Under 10 14 29 32.5(+2.5) 67.5
From 10-19 23 45 34 (+4) 66
20 and over 6 26 19 81 (+11)
43 100 30 70
He also finds, from an analysis of the same cases, the fact noted by
others, that the prognosis is favorable in inverse proportion to the
duration of the disease.
Attacks which chiefly occur in the daytime are much more amenable
to treatment than the nocturnal seizures, and especially is this the
case in the tongue-biting form. Sudden blows upon the head or falls
have been known in isolated cases to effect an amelioration in the
patient's disease, but these examples are rare.
Death from the attack itself is rare, yet in the large pauper institution
with which I was connected for many years I have known of several
cases. More often the death results from asphyxia resulting from a
bolus of food which chokes the patient or from a fall in some
dangerous place—into the fire or elsewhere. Accidental death from
drowning is more common than any other form.
The status epileptica into which patients sometimes pass who have
had many convulsions is occasionally a fatal termination of the
malady, and is always a serious feature.
This treatment should be kept up for at least two or three years after
the attacks have disappeared, and it may be even necessary to
continue a bromide course in a small way for an unlimited period.