Java Programming 8th Edition Joyce Farrell Solutions Manual download
Java Programming 8th Edition Joyce Farrell Solutions Manual download
http://testbankbell.com/product/java-programming-8th-edition-joyce-
farrell-solutions-manual/
http://testbankbell.com/product/java-programming-9th-edition-joyce-
farrell-solutions-manual/
http://testbankbell.com/product/test-bank-for-java-programming-9th-
edition-joyce-farrell-isbn-10-1337397075-isbn-13-9781337397070/
http://testbankbell.com/product/solution-manual-for-programming-logic-
design-comprehensive-9th-edition-joyce-farrell/
http://testbankbell.com/product/test-bank-for-money-banking-financial-
markets-and-institutions-2nd-edition-michael-brandl/
http://testbankbell.com/product/solution-manual-for-managerial-
accounting-for-managers-5th-edition-eric-noreen-peter-brewer-ray-
garrison/
http://testbankbell.com/product/real-estate-principles-a-value-
approach-ling-4th-edition-test-bank/
International Economics, 14th Edition Test Bank – Robert
Carbaugh
http://testbankbell.com/product/international-economics-14th-edition-
test-bank-robert-carbaugh/
Java Programming, Eighth Edition 2-1
Chapter 2
Using Data
A Guide to this Instructor’s Manual:
We have designed this Instructor’s Manual to supplement and enhance your teaching
experience through classroom activities and a cohesive chapter summary.
This document is organized chronologically, using the same headings that you see in the
textbook. Under the headings you will find: lecture notes that summarize the section, Teaching
Tips, Class Discussion Topics, and Additional Projects and Resources. Pay special attention to
teaching tips and activities geared towards quizzing your students and enhancing their critical
thinking skills.
In addition to this Instructor’s Manual, our Instructor’s Resources also contain PowerPoint
Presentations, Test Banks, and other supplements to aid in your teaching experience.
At a Glance
• Objectives
• Teaching Tips
• Quick Quizzes
• Additional Projects
• Additional Resources
• Key Terms
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use.
Java Programming, Eighth Edition 2-2
Lecture Notes
Overview
Chapter 2 introduces the eight primitive data types in the Java language. Students will
learn to work with integer, floating-point, Boolean, and character values. Arithmetic
and comparison operators are introduced. Finally, students will learn to create input and
confirm dialog boxes using the JOptionPane class.
Objectives
• Declare and use constants and variables
• Use integer data types
• Use the boolean data type
• Use floating-point data types
• Use the char data type
• Use the Scanner class to accept keyboard input
• Use the JOptionPane class to accept GUI input
• Perform arithmetic
• Understand type conversion
Teaching Tips
Declaring and Using Constants and Variables
1. Define variables and constants. Explain the difference between variables and
constants. Using Table 2-1, explain the concept of data types and introduce the eight
primitive data types. Suggest uses for the primitive types.
3. If your students have worked with a database system or another programming language,
compare these data types with those found elsewhere. Emphasize the similarity between
concepts.
4. Define a reference type as a Java class. In Chapter 3, students will create classes out of
primitive types and other reference types.
Declaring Variables
Teaching
Discuss the importance of choosing meaningful names for variables.
Tip
5. Spend time discussing what Java does when it encounters an uninitialized variable.
Define the concept of a garbage value. If possible, demonstrate using your Java
compiler.
6. Point out the single line with multiple declarations on page 56. Emphasize that while
this is legal code, it should be avoided to ensure program readability.
1. Define a named constant. Explain how to create a named constant using the final
keyword. Note that it is common practice to use all uppercase letters with constants.
Rather than using camel casing to differentiate words in a constant, suggest using an
underscore between words.
2. Demonstrate how to create several constants. If possible, demonstrate this using your
compiler. Refer to the examples on page 57.
3. Define a blank final. Demonstrate how to create a blank final, and discuss when
this type of constant might be appropriate.
5. Define a magic number. Demonstrate the difficulty of working with magic numbers in
large programs. Page 57 lists several reasons to use constants instead of magic numbers.
1. Define scope as the area in which a data item is visible to a program and in which you
can refer to it using its simple identifier.
2. Explain that a variable or constant is in scope from the point it is declared until the end
of the block of code in which the declaration lies.
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use.
Java Programming, Eighth Edition 2-4
3. An excellent analogy is the classroom. Items written on your board are not visible in the
room next door. Also, students named Tim in your class are quite different from those
named Tim next door.
1. Define concatenation. Discuss the shaded code in Figure 2-1 on page 58.
1. Mention that each constant can hold only one value for the duration of a program.
2. Explain how to correctly swap the values of two variables. Refer to page 61 for the
sample code to swap variable contents.
You Do It
1. Students should follow the steps in the book on pages 62–64 to create a Java
application that declares and uses a variable.
2. Describe the int, byte, short, and long data types. Using Table 2-2, explain the
storage capacity of each type. Spend a little time discussing why programmers must
care about the storage capacity.
3. Demonstrate what happens if a math expression results in a number outside of the range
of a data type. For example, consider that the code byte dogAge = (byte) (42
* 7); results in the variable dogAge holding 38. The value comes from subtracting
256 from the “real” answer of 294.
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use.
Java Programming, Eighth Edition 2-5
Quick Quiz 1
1. A data item is constant when it cannot be changed while a program is running. A data
item is when it might change.
Answer: variable
2. An item’s describes the type of data that can be stored there, how much memory
the item occupies, and what types of operations can be performed on the data.
Answer: data type
You Do It
1. Students should follow the steps in the book on pages 66–69 to create a Java application
that declares and uses a variable.
1. Introduce the concept of a boolean variable, which can have one of two values:
true or false.
2. Using Table 2-3, describe the relational operators available in Java. Note that the
result of each comparison is a boolean value.
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use.
Java Programming, Eighth Edition 2-6
Teaching
The Boolean type is named after George Boole, an English mathematician.
Tip
2. Using Table 2-4, introduce the two floating-point data types: double and float.
Make sure that students understand the concept of significant digits. Reiterate the
concept of precision. Double variables are more precise than float variables.
3. Demonstrate how to create several floating-point types. As shown on page 72, discuss
why you need to type the letter F after the number in float declarations and
instantiations.
1. Explain the use of the char data type to hold a single character. A constant character
value is placed between single quotation marks.
2. Describe the Unicode system as holding all symbols for all languages on the planet.
Unicode helps Java be useful around the world. Some Unicode values are listed in
Table 2-5; the entire table can be found at Unicode.org.
3. Demonstrate how to store Unicode values in the char data type. For example, this line
will store the fraction ½ in the char variable half: char half = '\u00BD';.
5. Describe the purpose of an escape sequence. Using Table 2-6, describe common escape
sequences. Discuss the differences between Figures 2-14 and 2-15.
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use.
Java Programming, Eighth Edition 2-7
You Do It
1. Students should follow the steps in the book on page 77 to create a Java application that
declares and uses a char variable.
1. Define the Scanner class. Discuss why it is much better than traditional character-by-
character input.
2. Demonstrate how to use the Scanner class to capture keyboard input from the
standard input device (keyboard) represented by System.in. Reiterate the
importance of the prompt. Selected methods of the Scanner class are listed in Table
2-7 on page 79.
3. Review the GetUserInfo class in Figure 2-17 and the program output in Figure 2-18
on page 80. Discuss the importance of echoing the input.
4. Demonstrate what happens if the user types a string into a nextInt() prompt. If
desired, you can demonstrate how to correctly input data into Strings, and then
convert the Strings to the proper data type. This is covered a little later in the chapter.
Teaching Students can learn more about the Scanner class with following
Tip documentation: http://java.sun.com/javase/6/docs/api/java/util/Scanner.html.
Pitfall: Using nextLine() Following One of the Other Scanner Input Methods
1. Illustrate the problems that may occur when using the nextLine() method after one
of the other Scanner class input methods. Use the code samples in Figures 2-19 and
2-21 to aid the discussion. Make sure that students are familiar with the concept of the
keyboard buffer.
You Do It
1. Students should follow the steps in the book on pages 84–87 to create a Java application
that accepts keyboard input.
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use.
Java Programming, Eighth Edition 2-8
1. Remind students about using the JOptionPane class to create dialog boxes.
Introduce an input dialog box and a confirm dialog box.
2. Using the code above Figure 2-29, demonstrate how the input boxes can be modified
with different titles and icons.
3. Describe how to convert a String into a primitive class using the type-wrapper
classes: Integer, Float, and Double. Figure 2-30 illustrates how to convert a
String class into double and int variables.
Teaching Define the term parse. Its literal meaning is to break an object into component
Tip parts. It can be roughly defined as reading the contents of an object.
2. Using the code above Figure 2-35, demonstrate how confirm dialog boxes can be
modified with different titles and icons.
Performing Arithmetic
1. Using Table 2-8, show that Java provides all of the standard arithmetic operators.
Remind students that the rules of operator precedence apply in a program just as they do
in math.
2. Define operand and binary operators. Identify them in a simple math expression.
3. Differentiate between integer division and floating-point division. Use examples for
each. Make sure that students understand that in integer division, any fractional portion
of a division result will be lost when both operators are of an integer data type.
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use.
Java Programming, Eighth Edition 2-9
Teaching Students may not be as familiar with the modulus operator, %, as with other
Tip arithmetic operators.
1. Remind students about the traditional order of operations acronym, PEMDAS, which
they may have learned in grade school. Spell it out for them: “Please Excuse My Dear
Aunt Sally,” or “Parenthesis, Exponents, Multiplication or Division, and Addition or
Subtraction.” Remind students that math expressions are evaluated from left to right
both in Java and in pure math.
2. Define operator precedence and refer to Table 2-9. Point out that operator precedence
aligns nicely with PEMDAS. Using your Java environment, demonstrate how operator
precedence works using your Java environment.
1. Mention that integer values are exact, but floating-point numbers frequently are only
approximations.
Teaching Students may not be able to reproduce the output shown in Figure 2-37.
Tip
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use.
Java Programming, Eighth Edition 2-10
You Do It
1. Students should follow the steps in the book on pages 98–100 to create a Java
application that uses arithmetic operators.
Quick Quiz 2
1. A relational operator compares two items; an expression containing a comparison
operator has a(n) value.
Answer: boolean
2. A(n) data type can hold floating-point values of up to six or seven significant
digits of accuracy.
Answer: float
4. When you combine mathematical operations in a single statement, you must understand
, or the rules for the order in which parts of a mathematical expression are
evaluated.
Answer: operator precedence
1. Define a unifying type. Using Figure 2-41, explain how Java promotes variables to a
unifying type by selecting the largest data type in the expression.
Teaching Ask students to write a program that illustrates the use of unifying types and type
Tip casting.
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use.
Java Programming, Eighth Edition 2-11
1. Remind students of the F placed after numbers to convert a double into float.
2. Define type casting. Demonstrate how to create an explicit conversion using the cast
operator. Be sure to provide an example demonstrating why this is important. A good
example is dividing 1 and 2, expecting .5 but getting 0.
You Do It
1. Students should follow the steps in the book on pages 104–106 to create a Java
application that uses unifying types and casting.
Don’t Do It
1. Review this section, discussing each point with the class.
Quick Quiz 3
1. True or False: The cast type is the type to which all operands in an expression are
converted so that they are compatible with each other.
Answer: False
2. casting forces a value of one data type to be used as a value of another type.
Answer: Type
4. A(n) dialog box asks a question and provides a text field in which the user can
enter a response.
Answer: input
Additional Projects
1. Create a Java application that performs two arithmetic and two comparison operations
on the same set of variables. Print the results to the console.
2. Create a Java application that prompts the user for two values using input dialog boxes
and then displays the sum of the values using a message dialog box.
Additional Resources
1. Primitive Data Types:
http://download.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html
2. More on JOptionPane:
http://download.oracle.com/javase/tutorial/uiswing/components/dialog.html
3. Summary of Operators:
http://download.oracle.com/javase/tutorial/java/nutsandbolts/opsummary.html
4. Operators:
http://download.oracle.com/javase/tutorial/java/nutsandbolts/operators.html
Key Terms
Assignment: the act of providing a value for a variable.
Assignment operator: the equal sign (=). Any value to the right of the equal sign is
assigned to the variable on the left of the equal sign.
Associativity: refers to the order in which operands are used with operators.
Binary operators: require two operands.
Blank final: a final variable that has not yet been assigned a value.
Block of code: the code contained within a set of curly braces.
boolean variable: can hold only one of two values: true or false.
byte: a data type that holds very small integers, from –128 to 127.
Camel casing: a style in which an identifier begins with a lowercase letter and
subsequent words within the identifier are capitalized.
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use.
Java Programming, Eighth Edition 2-13
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use.
Java Programming, Eighth Edition 2-14
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use.
Java Programming, Eighth Edition 2-15
© 2016 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use.
Random documents with unrelated
content Scribd suggests to you:
They were still going on, all five of them.
The press section was full, but two boys and a girl of high-school
age obligingly made room for Sandra on the top tier of seats and
she tuned in on their whispered conversation. The jargon was
recognizably related to that which she'd gotten a dose of on the
floor, but gamier. Players did not sacrifice pawns, they sacked them.
No one was ever defeated, only busted. Pieces weren't lost but
blown. The Ruy Lopez was the Dirty Old Rooay—and incidentally a
certain set of opening moves named after a long-departed Spanish
churchman, she now discovered from Dave, Bill and Judy, whose
sympathetic help she won by frequent loans of her zoomer glasses.
The four-hour time control point—two hours and 30 moves for each
player—had been passed while she was sending in her article, she
learned, and they were well on their way toward the next control
point—an hour more and 15 moves for each player—after which
unfinished games would be adjourned and continued at a special
morning session. Sherevsky had had to make 15 moves in two
minutes after taking an hour earlier on just one move. But that was
nothing out of the ordinary, Dave had assured her in the same
breath, Sherevsky was always letting himself get into "fantastic time-
pressure" and then wriggling out of it brilliantly. He was apparently
headed for a win over Serek. Score one for the USA over the USSR,
Sandra thought proudly.
Votbinnik had Jandorf practically in Zugzwang (his pieces all tied up,
Bill explained) and the Argentinian would be busted shortly. Through
the glasses Sandra could see Jandorf's thick chest rise and fall as he
glared murderously at the board in front of him. By contrast
Votbinnik looked like a man lost in reverie.
Dr. Krakatower had lost a pawn to Lysmov but was hanging on
grimly. However, Dave would not give a plugged nickle for his
chances against the former world's champion, because "those old
ones always weaken in the sixth hour."
"You for-get the bio-logical mir-acle of Doc-tor Las-ker," Bill and Judy
chanted as one.
"Shut up," Dave warned them. An official glared angrily from the
floor and shook a finger. Much later Sandra discovered that Dr.
Emanuel Lasker was a philosopher-mathematician who, after holding
the world's championship for 26 years, had won a very strong
tournament (New York 1924) at the age of 56 and later almost won
another (Moscow 1935) at the age of 67.
It got very quiet. The four soft clicks of the move being fed into the
Machine were like the beat of a muffled drum.
There was a buzzing in Grabo's ears. He looked down at the board in
horror.
The Machine blinked, blinked once more and then, although barely
twenty seconds had elapsed, moved a rook.
On the glassy gray margin above the Machine's electric board, large
red words flamed on:
Up in the stands Dave squeezed Sandra's arm. "He's done it! He's let
himself be swindled."
"You mean the Machine has beaten Grabo?" Sandra asked.
"What else?"
"Can you be sure? Just like that?"
"Of cour.... Wait a second.... Yes, I'm sure."
"Mated in three like a potzer," Bill confirmed.
"The poor old boob," Judy sighed.
Down on the floor Bela Grabo sagged. The assistant director moved
toward him quickly. But then the Hungarian straightened himself a
little.
"I resign," he said softly.
The red words at the top of the board were wiped out and briefly
replaced, in white, by:
Bela Grabo clenched his fists and bit his teeth. Even the Machine
was being sorry for him!
He stiffly walked out of the hall. It was a long, long walk.
Sandra nodded. She was feeling virtuous. She had got her interview
with Jandorf and then this morning one with Grabo ("How it Feels to
Have a Machine Out-Think You"). The latter had made her think of
herself as a real vulture of the press, circling over the doomed. The
Hungarian had seemed in a positively suicidal depression.
One newspaper article made much of the Machine's "psychological
tactics," hinting that the blinking lights were designed to hypnotize
opponents. The general press coverage was somewhat startling. A
game that in America normally rated only a fine-print column in the
back sections of a very few Sunday papers was now getting boxes
on the front page. The defeat of a man by a machine seemed
everywhere to awaken nervous feelings of insecurity, like the
launching of the first sputnik.
Sandra had rather hesitantly sought out Dr. Krakatower during the
close of the morning session of play, still feeling a little guilty from
her interview with Grabo. But Doc had seemed happy to see her and
quite recovered from last night's defeat, though when she had
addressed him as "Master Krakatower" he had winced and said,
"Please, not that!" Another session of coffee and wine-and-seltzer
had resulted in her getting an introduction to her first Soviet
grandmaster, Serek, who had proved to be unexpectedly charming.
He had just managed to draw his game with Sherevsky (to the great
amazement of the kibitzers, Sandra learned) and was most obliging
about arranging for an interview.
Not to be outdone in gallantry, Doc had insisted on escorting Sandra
to her seat in the stands—at the price of once more losing a couple
of minutes on his clock. As a result her stock went up considerably
with Dave, Bill and Judy. Thereafter they treated anything she had to
say with almost annoying deference—Bill especially, probably in
penance for his thoughtless cracks at Doc. Sandra later came to
suspect that the kids had privately decided that she was Dr.
Krakatower's mistress—probably a new one because she was so
scandalously ignorant of chess. She did not disillusion them.
Doc lost again in the second round—to Jal.
"Lysmov was the first of us to realize fully that we are not playing
against a metal monster but against a certain kind of programming.
If there are any weaknesses we can spot in that programming, we
can win. Very much in the same way that we can again and again
defeat a flesh-and-blood player when we discover that he
consistently attacks without having an advantage in position or is
regularly overcautious about launching a counter-attack when he
himself is attacked without justification."
Sandra nodded eagerly. "So from now on your chances of beating
the Machine should keep improving, shouldn't they? I mean as you
find out more and more about the programming."
Doc smiled. "You forget," he said gently, "that Simon Great can
change the programming before each new game. Now I see why he
fought so hard for that point."
"Oh. Say, Doc, what's this about the Sherevsky end game?"
"You are picking up the language, aren't you?" he observed.
"Sherevsky got a little angry when he discovered that Great had the
Machine programmed to analyze steadily on the next move after an
adjournment until the game was resumed next morning. Sherevsky
questioned whether it was fair for the Machine to 'think' all night
while its opponent had to get some rest. Vanderhoef decided for the
Machine, though Sherevsky may carry the protest to FIDE.
"Bah—I think Great wants us to get heated up over such minor
matters, just as he is happy (and oh so obliging!) when we complain
about how the Machine blinks or hums or smells. It keeps our minds
off the main business of trying to outguess his programming.
Incidentally, that is one thing we decided last night—Sherevsky,
Willie Angler, Jandorf, Serek, and myself—that we are all going to
have to learn to play the Machine without letting it get on our nerves
and without asking to be protected from it. As Willie puts it, 'So
suppose it sounds like a boiler factory even—okay, you can think in a
boiler factory.' Myself, I am not so sure of that, but his spirit is right."
Sandra felt herself perking up as a new article began to shape itself
in her mind. She said, "And what about WBM replacing Simon
Great?"
Again Doc smiled. "I think, my dear, that you can safely dismiss that
as just a rumor. I think that Simon Great has just begun to fight."
VI
Round Four saw the Machine spring the first of its surprises.
It had finally forced a draw against Sherevsky in the morning
session, ending the long second-round game, and now was matched
against Votbinnik.
The Machine opened Pawn to King Four, Votbinnik replied Pawn to
King Three.
"The French Defense, Binny's favorite," Dave muttered and they
settled back for the Machine's customary four-minute wait.
Instead the Machine moved at once and punched its clock.
Sandra, studying Votbinnik through her glasses, decided that the
Russian grandmaster looked just a trifle startled. Then he made his
move.
Once again the Machine responded instantly.
There was a flurry of comment from the stands and a scurrying-
about of officials to shush it. Meanwhile the Machine continued to
make its moves at better than rapid-transit speed, although
Votbinnik soon began to take rather more time on his.
The upshot was that the Machine made eleven moves before it
started to take time to 'think' at all.
Sandra clamored so excitedly to Dave for an explanation that she
had two officials waving at her angrily.
As soon as he dared, Dave whispered, "Great must have banked on
Votbinnik playing the French—almost always does—and fed all the
variations of the French into the Machine's 'memory' from MCO and
maybe some other books. So long as Votbinnik stuck to a known
variation of the French, why, the Machine could play from memory
without analyzing at all. Then when a strange move came along—
one that wasn't in its memory—only on the twelfth move yet!—the
Machine went back to analyzing, only now it's taking longer and
going deeper because it's got more time—six minutes a move,
about. The only thing I wonder is why Great didn't have the Machine
do it in the first three games. It seems so obvious."
Sandra ticketed that in her mind as a question for Doc. She slipped
off to her room to write her "Don't Let a Robot Get Your Goat" article
(drawing heavily on Doc's observations) and got back to the stands
twenty minutes before the second time-control point. It was
becoming a regular routine.
Votbinnik was a knight down—almost certainly busted, Dave
explained.
"It got terrifically complicated while you were gone," he said. "A real
Votbinnik position."
"Only the Machine out-binniked him," Bill finished.
Judy hummed Beethoven's "Funeral March for the Death of a Hero."
Nevertheless Votbinnik did not resign. The Machine sealed a move.
Its board blacked out and Vanderhoef, with one of his assistants
standing beside him to witness, privately read the move off a small
indicator on the console. Tomorrow he would feed the move back
into the Machine when play was resumed at the morning session.
Doc sealed a move too although he was two pawns down in his
game against Grabo and looked tired to death.
"They don't give up easily, do they?" Sandra observed to Dave.
"They must really love the game. Or do they hate it?"
"When you get to psychology it's all beyond me," Dave replied. "Ask
me something else."
Sandra smiled. "Thank you, Dave," she said. "I will."
VII
Krakatower had lost two pawns when the first time-control point
arrived and was intending to resign on his 31st move when the
Machine broke down. Three of its pieces moved on the electric board
at once, then the board went dark and all the lights on the console
went out except five which started winking like angry red eyes. The
gray-smocked men around Simon Great sprang silently into action,
filing around back of the console. It was the first work anyone had
seen them do except move screens around and fetch each other
coffee. Vanderhoef hovered anxiously. Some flash bulbs went off.
Vanderhoef shook his fist at the photographers. Simon Great did
nothing. The Machine's clock ticked on. Doc watched for a while and
then fell asleep.
When Vanderhoef jogged him awake, the Machine had just made its
next move, but the repair-job had taken 50 minutes. As a result the
Machine had to make 15 moves in 10 minutes. At 40 seconds a
move it played like a dub whose general lack of skill was complicated
by a touch of insanity. On his 43rd move Doc shrugged his shoulders
apologetically and announced mate in four. There were more flashes.
Vanderhoef shook his fist again. The machine flashed:
YOU PLAYED BRILLIANTLY. CONGRATULATIONS!
Afterwards Doc said sourly to Sandra. "And that was one big lie—a
child could have beat the Machine with that time advantage. Oh,
what an ironic glory the gods reserved for Krakatower's dotage—to
vanquish a broken-down computer! Only one good thing about it—
that it didn't happen while it was playing one of the Russians, or
someone would surely have whispered sabotage. And that is
something of which they do not accuse Dirty Old Krakatower,
because they are sure he has not got the brains even to think to
sprinkle a little magnetic oxide powder in the Machine's memory
box. Bah!"
Just the same he seemed considerably more cheerful.
Sandra said guilelessly, "Winning a game means nothing to you
chess players, does it, unless you really do it by your own brilliancy?"
Doc looked solemn for a moment, then he started to chuckle. "You
are getting altogether too smart, Miss Sandra Lea Grayling," he said.
"Yes, yes—a chess player is happy to win in any barely legitimate
way he can, by an earthquake if necessary, or his opponent
sickening before he does from the bubonic plague. So—I confess it
to you—I was very happy to chalk up my utterly undeserved win
over the luckless Machine."
"Which incidentally makes it anybody's tournament again, doesn't it,
Doc?"
"Not exactly." Doc gave a wry little headshake. "We can't expect
another fluke. After all, the Machine has functioned perfectly seven
games out of eight, and you can bet the WBM men will be checking
it all night, especially since it has no adjourned games to work on.
Tomorrow it plays Willie Angler, but judging from the way it beat
Votbinnik and Jal, it should have a definite edge on Willie. If it beats
him, then only Votbinnik has a chance for a tie and to do that he
must defeat Lysmov. Which will be most difficult."
"Well," Sandra said, "don't you think that Lysmov might just kind of
let himself be beaten, to make sure a Russian gets first place or at
least ties for it?"
Doc shook his head emphatically. "There are many things a man,
even a chess master, will do to serve his state, but party loyalty
doesn't go that deep. Look, here is the standing of the players after
eight rounds." He handed Sandra a penciled list.
ONE ROUND TO GO
After studying the list for a while, Sandra said, "Hey, even Angler
could come out first, couldn't he, if he beat the Machine and
Votbinnik lost to Lysmov?"
"Could, could—yes. But I'm afraid that's hoping for too much,
barring another breakdown. To tell the truth, dear, the Machine is
simply too good for all of us. If it were only a little faster (and these
technological improvements always come) it would out-class us
completely. We are at that fleeting moment of balance when genius
is almost good enough to equal mechanism. It makes me feel sad,
but proud too in a morbid fashion, to think that I am in at the death
of grandmaster chess. Oh, I suppose the game will always be
played, but it won't ever be quite the same." He blew out a breath
and shrugged his shoulders.
"As for Willie, he's a good one and he'll give the Machine a long hard
fight, you can depend on it. He might conceivably even draw."
He touched Sandra's arm. "Cheer up, my dear," he said. "You should
remind yourself that a victory for the Machine is still a victory for the
USA."
Doc's prediction about a long hard fight was decidedly not fulfilled.
Having White, the Machine opened Pawn to King Four and Angler
went into the Sicilian Defense. For the first twelve moves on each
side both adversaries pushed their pieces and tapped their clocks at
such lightning speed (Vanderhoef feeding in Angler's moves swiftly)
that up in the stands Bill and Judy were still flipping pages madly in
their hunt for the right column in MCO.
The Machine made its thirteenth move, still at blitz tempo.
"Bishop takes Pawn, check, and mate in three!" Willie announced
very loudly, made the move, banged his clock and sat back.
There was a collective gasp-and-gabble from the stands.
Dave squeezed Sandra's arm hard. Then for once forgetting that he
was Dr. Caution, he demanded loudly of Bill and Judy, "Have you two
idiots found that column yet? The Machine's thirteenth move is a
boner!"
Pinning down the reference with a fingernail, Judy cried, "Yes! Here
it is on page 161 in footnote (e) (2) (B). Dave, that same thirteenth
move for White is in the book! But Black replies Knight to Queen
Two, not Bishop takes Pawn, check. And three moves later the book
gives White a plus value."
"What the heck, it can't be," Bill asserted.
"But it is. Check for yourself. That boner is in the book."
"Shut up, everybody!" Dave ordered, clapping his hands to his face.
When he dropped them a moment later his eyes gleamed. "I got it
now! Angler figured they were using the latest edition of MCO to
program the Machine on openings, he found an editorial error and
then he deliberately played the Machine into that variation!"
Dave practically shouted his last words, but that attracted no
attention as at that moment the whole hall was the noisiest it had
been throughout the tournament. It simmered down somewhat as
the Machine flashed a move.
Angler replied instantly.
The Machine replied almost as soon as Angler's move was fed into it.
Angler moved again, his move was fed into the Machine and the
Machine flashed:
I AM CHECKMATED. CONGRATULATIONS!
VIII
testbankbell.com