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

Java Programming 8th Edition Joyce Farrell Solutions Manual download

The document provides information on the Java Programming 8th Edition Solutions Manual by Joyce Farrell, including download links for various educational resources such as test banks and instructor manuals. It outlines the structure of the instructor's manual, which includes lecture notes, teaching tips, and class discussion topics aimed at enhancing the teaching experience. Additionally, it covers key concepts from Chapter 2 of the textbook, focusing on data types, variable declaration, and input handling in Java.

Uploaded by

ramonigeboes
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
13 views

Java Programming 8th Edition Joyce Farrell Solutions Manual download

The document provides information on the Java Programming 8th Edition Solutions Manual by Joyce Farrell, including download links for various educational resources such as test banks and instructor manuals. It outlines the structure of the instructor's manual, which includes lecture notes, teaching tips, and class discussion topics aimed at enhancing the teaching experience. Additionally, it covers key concepts from Chapter 2 of the textbook, focusing on data types, variable declaration, and input handling in Java.

Uploaded by

ramonigeboes
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 47

Java Programming 8th Edition Joyce Farrell Solutions

Manual download pdf

http://testbankbell.com/product/java-programming-8th-edition-joyce-
farrell-solutions-manual/

Visit testbankbell.com today to download the complete set of


test banks or solution manuals!
Here are some recommended products for you. Click the link to
download, or explore more at testbankbell.com

Java Programming 9th Edition Joyce Farrell Solutions


Manual

http://testbankbell.com/product/java-programming-9th-edition-joyce-
farrell-solutions-manual/

Test Bank for Java Programming, 9th Edition, Joyce


Farrell, ISBN-10: 1337397075, ISBN-13: 9781337397070

http://testbankbell.com/product/test-bank-for-java-programming-9th-
edition-joyce-farrell-isbn-10-1337397075-isbn-13-9781337397070/

Solution Manual for Programming Logic & Design,


Comprehensive, 9th Edition Joyce Farrell

http://testbankbell.com/product/solution-manual-for-programming-logic-
design-comprehensive-9th-edition-joyce-farrell/

Solution Manual for Strategic Management: Text and Cases,


10th Edition, Gregory Dess, Gerry McNamara, Alan Eisner,
Seung-Hyun Lee
http://testbankbell.com/product/solution-manual-for-strategic-
management-text-and-cases-10th-edition-gregory-dess-gerry-mcnamara-
alan-eisner-seung-hyun-lee/
Test Bank for Money Banking Financial Markets and
Institutions, 2nd Edition Michael Brandl

http://testbankbell.com/product/test-bank-for-money-banking-financial-
markets-and-institutions-2nd-edition-michael-brandl/

Instructor Manual For Accounting Information Systems: A


Business Process Approach Edition: 2nd by Frederick Jones
(Author), Dasaratha Rama (Author)
http://testbankbell.com/product/instructor-manual-for-accounting-
information-systems-a-business-process-approach-edition-2nd-by-
frederick-jones-author-dasaratha-rama-author/

Solution Manual for Managerial Accounting for Managers,


5th Edition, Eric Noreen, Peter Brewer, Ray Garrison

http://testbankbell.com/product/solution-manual-for-managerial-
accounting-for-managers-5th-edition-eric-noreen-peter-brewer-ray-
garrison/

Test Bank for Transnational Management Text and Cases in


Cross-Border Management, 8th Edition Christopher A.
Bartlett Paul W. Beamish
http://testbankbell.com/product/test-bank-for-transnational-
management-text-and-cases-in-cross-border-management-8th-edition-
christopher-a-bartlett-paul-w-beamish/

Real Estate Principles A Value Approach Ling 4th Edition


Test Bank

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

Java Programming 8th Edition Joyce


Farrell Solutions Manual
Full download chapter at: https://testbankbell.com/product/java-programming-8th-
edition-joyce-farrell-solutions-manual/

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

Instructor’s Manual Table of Contents


• Overview

• Objectives

• Teaching Tips

• Quick Quizzes

• Class Discussion Topics

• 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.

2. Define a primitive type and what it means in Java.

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

1. Describe the components of a variable declaration. Note that it is common practice to


use camel casing, which is when variable names begin with a lowercase letter and any
subsequent words within the variable name 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-3

2. Demonstrate how to create several different variables of differing types. If possible,


demonstrate using your Java compiler.

Teaching
Discuss the importance of choosing meaningful names for variables.
Tip

3. Define the initialization of variables. Provide several examples of variable


initializations. Emphasize that the variable must be on the left side of the assignment
operator. Briefly discuss the associativity of operators.

4. Explain lvalue and rvalue.

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.

Declaring Named Constants

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.

4. Identify the benefits of using named constants over literal values.

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.

The Scope of Variables and Constants

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.

Concatenating Strings to Variables and Constants

1. Define concatenation. Discuss the shaded code in Figure 2-1 on page 58.

2. Explain concatenation as an operation. Compare it to a math operation. This is


probably the first time your students have encountered operations outside of a math or
science context.

3. Figure 2-3 shows concatenation used in the JOptionPane.showMessageDialog


method. Point out the null String as a simple way to display numeric output
anywhere string elements are expected.

Pitfall: Forgetting That a Variable Holds One Value at a Time

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.

Two Truths and a Lie


1. Discuss the two truths and a lie on page 61.

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.

Learning About Integer Data Types


1. Mathematically define integers and whole numbers. It is likely that your students have
forgotten what numbers these represent.

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

3. True or False: A variable declaration is a statement that reserves a named memory


location.
Answer: True

4. The types are all variations of the integer type.


Answer: byte, short, and long

5. The + sign in the following expression refers to the operation.


System.out.println("My age: " + ageVar);
Answer: concatenation

Two Truths and a Lie


1. Discuss the two truths and a lie on page 66.

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.

Using the boolean Data Type

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.

3. Discuss that these concepts will be very important in later chapters.

Two Truths and a Lie


1. Discuss the two truths and a lie on page 71.

© 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

Learning About Floating-Point Data Types


1. Define floating-point numbers. Describe the type of numbers that floating-point values
represent.

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.

Two Truths and a Lie


1. Discuss the two truths and a lie on page 72.

Using the char Data Type

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';.

4. Introduce the built-in Java type String.

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.

Two Truths and a Lie


1. Discuss the two truths and a lie on page 76.

© 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.

Using the Scanner Class to Accept Keyboard Input

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.

Two Truths and a Lie


1. Discuss the two truths and a lie on page 84.

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

Using the JOptionPane Class to Accept GUI Input

1. Remind students about using the JOptionPane class to create dialog boxes.
Introduce an input dialog box and a confirm dialog box.

Using Input Dialog Boxes

1. Show how to use the showInputDialog() method of JOptionPane. Review the


code in Figure 2-26, which produces the output shown in Figures 2-27 and 2-28.

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.

Using Confirm Dialog Boxes

1. Explain how to use the showConfirmDialog() method of JOptionPane.


Review the AirlineDialog class in Figure 2-32.

2. Using the code above Figure 2-35, demonstrate how confirm dialog boxes can be
modified with different titles and icons.

Two Truths and a Lie


1. Discuss the two truths and a lie on page 93.

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

4. Define the modulus or remainder operator. Provide numerous examples of this


operator’s uses. Students often have a difficult time grasping the concept of modulus.
You will need to discuss this operator often in class.

Teaching Students may not be as familiar with the modulus operator, %, as with other
Tip arithmetic operators.

Associativity and Precedence

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.

Writing Arithmetic Statements Efficiently

1. Use examples to explain how to avoid unnecessary repetition of arithmetic statements.


Point out the examples on page 96. Have students identify the grossPay variable.

Pitfall: Not Understanding Imprecision in Floating-Point Numbers

1. Mention that integer values are exact, but floating-point numbers frequently are only
approximations.

2. Explain that imprecision leads to several problems, including:


a. Floating-point output might not look like what you expect or want.
b. Comparisons with floating-point numbers might not be what you expect or want.

3. Using your Java environment, provide examples of the imprecision in floating-point


numbers.

Teaching To get precise floating-point values, you need to use


Tip java.math.BigDecimal.

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

Two Truths and a Lie


1. Discuss the two truths and a lie on page 98.

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

3. You use arithmetic to perform calculations with values in your programs.


Answer: operators

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

5. The operator returns the remainder of integer division.


Answer: modulus or %

Understanding Type Conversion


1. Describe the concept of type conversion. Discuss why this is an important concept.

Automatic Type Conversion

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

Explicit Type Conversions

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.

Two Truths and a Lie


1. Discuss the two truths and a lie on page 104.

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

3. True or False: A character that is a digit is represented in computer memory differently


from a numeric value represented by the same digit.
Answer: True

4. A(n) dialog box asks a question and provides a text field in which the user can
enter a response.
Answer: input

Class Discussion Topics


1. Why do you think it is important to have a variety of different data types for integers
and floating-point numbers?

2. Why might it be necessary to perform type 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-12

3. How could the JOptionPane be used for a video game?

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.

3. Find out how Android handles the JOptionPane.

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

5. Conversions and Promotions:


http://docs.oracle.com/javase/specs/jls/se5.0/html/conversions.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

Cast operator: performs an explicit-type conversion. It is created by placing the


desired result type in parentheses before the expression to be converted.
char: a data type used to hold any single character.
Comparison operator: another name for a relational operator.
Concatenated: combine a value with another value.
Confirm dialog box: displays the options Yes, No, and Cancel.
Constant: a data item that cannot be changed during the execution of an application.
Consumed: retrieve and discard an entry without using it.
Data type: 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.
double: a data type that can hold a floating-point value of up to 14 or 15 significant
digits of accuracy.
Double-precision floating-point number: stored in a double.
Echoing the input: repeat the user’s entry as output so that the user can visually
confirm the entry’s accuracy.
Escape sequence: begins with a backslash followed by a character; the pair represents a
single character.
Explicit conversion: the data-type transformation caused by using a cast operator.
final: the keyword that precedes named constants.
float: a data type that can hold a floating-point value of up to six or seven significant
digits of accuracy.
Floating-point: a number that contains decimal positions.
Floating-point division: the operation in which two values are divided and either or
both are floating-point values.
Garbage value: the unknown value stored in an uninitialized variable.
Implicit conversion: the automatic transformation of one data type to another.
Initialization: an assignment made when you declare a variable.
Input dialog box: asks a question and provides a text field in which the user can enter a
response.
int: the data type used to store integers.
Integer: a whole number without decimal places.
Integer division: the operation in which one integer value is divided by another; the
result contains no fractional part.
Keyboard buffer: a small area of memory where keystrokes are stored before they are
retrieved into a program.
Literal constant: a value that is taken literally at each use.
long: a data type that holds very large integers, from –9,223,372,036,854,775,808 to
9,223,372,036,854,775,807.
Lvalue: an expression that can appear on the left side of an assignment statement.
Magic number: a value that does not have immediate, intuitive meaning, or a number
that cannot be explained without additional knowledge. Unnamed constants are magic
numbers.
Modulus operator: the remainder operator; also called mod.
Named constant: a memory location whose declaration is preceded by the keyword
final and whose value cannot change during program execution.
Null String: an empty String created by typing a set of quotation marks with
nothing between them.

© 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

Numeric constant: a number whose value is taken literally at each use.


Operand: a value used in an arithmetic statement.
Operator precedence: the rules for the order in which parts of a mathematical
expression are evaluated.
Parse: to break into component parts.
Primitive type: a simple data type. Java’s primitive types are byte, short, int,
long, float, double, char, and boolean.
Promotions: implicit conversions.
Prompt: a message that requests and describes user input.
Reference types: complex data types that are constructed from primitive types.
Relational operator: compares two items. An expression that contains a relational
operator has a Boolean value.
Remainder operator: the percent sign. When it is used with two integers, the result is
an integer with the value of the remainder after division takes place.
Rvalue: an expression that can appear only on the right side of an assignment
statement.
Scientific notation: a display format that more conveniently expresses large or small
numeric values. A multidigit number is converted to a single-digit number and
multiplied by 10 to a power.
Scope: the area in which a variable is visible to a program.
short: a data type that holds small integers, from –32,768 to 32,767.
showConfirmDialog() method: in the JOptionPane class; used to create a
confirm dialog box.
showInputDialog() method: used to create an input dialog box.
Significant digits: refers to the mathematical accuracy of a value.
Single-precision floating-point number: stored in a float.
Standard arithmetic operators: used to perform calculations with values in your
applications.
Standard input device: normally is the keyboard.
String: a built-in Java class that provides you with the means for storing and
manipulating character strings.
Strongly typed language: a language in which all variables must be declared before
they can be used.
Symbolic constant: a named constant.
Token: a unit of data. The Scanner class separates input into tokens.
Type casting: forces a value of one data type to be used as a value of another type.
Type conversion: the process of converting one data type to another.
Type-ahead buffer: the keyboard buffer.
Type-wrapper classes: classes contained in the java.lang package; include
methods that can process primitive-type values.
Unary cast operator: a more complete name for the cast operator that performs
explicit conversions.
Unary operator: uses only one operand.
Unicode: A character encoding scheme that encompasses all symbols in all languages
on Earth.
Unifying type: a single data type to which all operands in an expression are converted.
Uninitialized variable: a variable that has not been assigned a 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-15

Unnamed constant: a number or string that is not held in a variable.


Variable: a named memory location that you can use to store a value.
Variable declaration: a statement that reserves a named memory location.

© 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.

Sandra studied Doc's face carefully through her glasses. He looked


terribly tired now, almost a death's head. Something tightened in her
chest and she looked away quickly.
The Angler-Jal and Grabo-Machine games were still ding-dong
contests, Dave told her. If anything, Grabo had a slight advantage.
The Machine was "on the move," meaning that Grabo had just made
a move and was waiting the automaton's reply.
The Hungarian was about the most restless "waiter" Sandra could
imagine. He twisted his long legs constantly and writhed his
shoulders and about every five seconds he ran his hands back
through his unkempt tassle of hair.
Once he yawned selfconsciously, straightened himself and sat very
compactly. But almost immediately he was writhing again.
The Machine had its own mannerisms, if you could call them that.
Its dim, unobtrusive telltale lights were winking on and off in a fairly
rapid, random pattern. Sandra got the impression that from time to
time Grabo's eyes were trying to follow their blinking, like a man
watching fireflies.
Simon Great sat impassively behind a bare table next to the
Machine, his five gray-smocked technicians grouped around him.
A flushed-faced, tall, distinguished-looking elderly gentleman was
standing by the Machine's console. Dave told Sandra it was Dr.
Vanderhoef, the Tournament Director, one-time champion of the
world.
"Another old potzer like Krakatower, but with sense enough to know
when he's licked," Bill characterized harshly.
"Youth, ah, un-van-quish-able youth," Judy chanted happily by
herself. "Flashing like a meteor across the chess fir-ma-ment.
Morphy, Angler, Judy Kaplan...."
"Shut up! They really will throw us out," Dave warned her and then
explained in whispers to Sandra that Vanderhoef and his assistants
had the nervous-making job of feeding into the Machine the moves
made by its opponent, "so everyone will know it's on the level, I
guess." He added, "It means the Machine loses a few seconds every
move, between the time Grabo punches the clock and the time
Vanderhoef gets the move fed into the Machine."
Sandra nodded. The players were making it as hard on the Machine
as possible, she decided with a small rush of sympathy.

Suddenly there was a tiny movement of the gadget attached from


the Machine to the clocks on Grabo's table and a faint click. But
Grabo almost leapt out of his skin.
Simultaneously a red castle-topped piece (one of the Machine's
rooks, Sandra was informed) moved four squares sideways on the
big electric board above the Machine. An official beside Dr.
Vanderhoef went over to Grabo's board and carefully moved the
corresponding piece. Grabo seemed about to make some complaint,
then apparently thought better of it and plunged into brooding
cogitation over the board, elbows on the table, both hands holding
his head and fiercely massaging his scalp.
The Machine let loose with an unusually rapid flurry of blinking.
Grabo straightened up, seemed again about to make a complaint,
then once more to repress the impulse. Finally he moved a piece
and punched his clock. Dr. Vanderhoef immediately flipped four
levers on the Machine's console and Grabo's move appeared on the
electric board.
Grabo sprang up, went over to the red velvet cord and motioned
agitatedly to Vanderhoef.
There was a short conference, inaudible at the distance, during
which Grabo waved his arms and Vanderhoef grew more flushed.
Finally the latter went over to Simon Great and said something,
apparently with some hesitancy. But Great smiled obligingly, sprang
to his feet, and in turn spoke to his technicians, who immediately
fetched and unfolded several large screens and set them in front of
the Machine, masking the blinking lights. Blindfolding it, Sandra
found herself thinking.
Dave chuckled. "That's already happened once while you were out,"
he told Sandra. "I guess seeing the lights blinking makes Grabo
nervous. But then not seeing them makes him nervous. Just watch."
"The Machine has its own mysterious pow-wow-wers," Judy chanted.
"That's what you think," Bill told her. "Did you know that Willie
Angler has hired Evil Eye Bixel out of Brooklyn to put the whammy
on the Machine? S'fact."
"... pow-wow-wers unknown to mere mortals of flesh and blood—"
"Shut up!" Dave hissed. "Now you've done it. Here comes old Eagle
Eye. Look, I don't know you two. I'm with this lady here."

Bela Grabo was suffering acute tortures. He had a winning attack, he


knew it. The Machine was counter-attacking, but unstrategically,
desperately, in the style of a Frank Marshall complicating the issue
and hoping for a swindle. All Grabo had to do, he knew, was keep
his head and not blunder—not throw away a queen, say, as he had
to old Vanderhoef at Brussels, or overlook a mate in two, as he had
against Sherevsky at Tel Aviv. The memory of those unutterably
black moments and a dozen more like them returned to haunt him.
Never if he lived a thousand years would he be free of them.
For the tenth time in the last two minutes he glanced at his clock.
He had fifteen minutes in which to make five moves. He wasn't in
time-pressure, he must remember that. He mustn't make a move on
impulse, he mustn't let his treacherous hand leap out without
waiting for instructions from its guiding brain.
First prize in this tournament meant incredible wealth—
transportation money and hotel bills for more than a score of future
tournaments. But more than that, it was one more chance to blazon
before the world his true superiority rather than the fading
reputation of it. "... Bela Grabo, brilliant but erratic...." Perhaps his
last chance.
When, in the name of Heaven, was the Machine going to make its
next move? Surely it had already taken more than four minutes! But
a glance at its clock showed him that hardly half that time had gone
by. He decided he had made a mistake in asking again for the
screens. It was easier to watch those damned lights blink than have
them blink in his imagination.
Oh, if chess could only be played in intergalactic space, in the black
privacy of one's thoughts. But there had to be the physical presence
of the opponent with his (possibly deliberate) unnerving mannerisms
—Lasker and his cigar, Capablanca and his red neck-tie, Nimzowitsch
and his nervous contortions (very like Bela Grabo's, though the latter
did not see it that way). And now this ghastly flashing, humming,
stinking, button-banging metal monster!
Actually, he told himself, he was being asked to play two opponents,
the Machine and Simon Great, a sort of consultation team. It wasn't
fair!
The Machine hammered its button and rammed its queen across the
electric board. In Grabo's imagination it was like an explosion.
Grabo held onto his nerves with an effort and plunged into a maze
of calculations.
Once he came to, like a man who has been asleep, to realize that he
was wondering whether the lights were still blinking behind the
screens while he was making his move. Did the Machine really
analyze at such times or were the lights just an empty trick? He
forced his mind back to the problems of the game, decided on his
move, checked the board twice for any violent move he might have
missed, noted on his clock that he'd taken five minutes, checked the
board again very rapidly and then put out his hand and made his
move—with the fiercely suspicious air of a boss compelled to send
an extremely unreliable underling on an all-important errand.
Then he punched his clock, sprang to his feet, and once more waved
for Vanderhoef.
Thirty seconds later the Tournament Director, very red-faced now,
was saying in a low voice, almost pleadingly, "But Bela, I cannot
keep asking them to change the screens. Already they have been up
twice and down once to please you. Moving them disturbs the other
players and surely isn't good for your own peace of mind. Oh, Bela,
my dear Bela—"
Vanderhoef broke off. Grabo knew he had been going to say
something improper but from the heart, such as, "For God's sake
don't blow this game out of nervousness now that you have a win in
sight"—and this sympathy somehow made the Hungarian furious.
"I have other complaints which I will make formally after the game,"
he said harshly, quivering with rage. "It is a disgrace the way that
mechanism punches the time-clock button. It will crack the case!
The Machine never stops humming! And it stinks of ozone and hot
metal, as if it were about to explode!"
"It cannot explode, Bela. Please!"
"No, but it threatens to! And you know a threat is always more
effective than an actual attack! As for the screens, they must be
taken down at once, I demand it!"
"Very well, Bela, very well, it will be done. Compose yourself."
Grabo did not at once return to his table—he could not have
endured to sit still for the moment—but paced along the line of
tables, snatching looks at the other games in progress. When he
looked back at the big electric board, he saw that the Machine had
made a move although he hadn't heard it punch the clock. He
rushed back and studied the board without sitting down. Why, the
Machine had made a stupid move, he saw with a rush of exaltation.
At that moment the last screen being folded started to fall over, but
one of the gray-smocked men caught it deftly. Grabo flinched and
his hand darted out and moved a piece.
He heard someone gasp. Vanderhoef.

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:

CHECK! AND MATE IN THREE

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:

THANK YOU FOR A GOOD GAME

And then a third statement, also in white, flashed on for a few


seconds:
YOU HAD BAD LUCK

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.

Adjournment time neared. Serek, the exchange down but with


considerable time on his clock, sealed his forty-sixth move against
Sherevsky and handed the envelope to Vanderhoef. It would be
opened when the game was resumed at the morning session. Dr.
Krakatower studied the position on his board and then quietly tipped
over his king. He sat there for a moment as if he hadn't the strength
to rise. Then he shook himself a little, smiled, got up, clasped hands
briefly with Lysmov and wandered over to watch the Angler-Jal
game.
Jandorf had resigned his game to Votbinnik some minutes ago,
rather more surlily.
After a while Angler sealed a move, handing it to Vanderhoef with a
grin just as the little red flag dropped on his clock, indicating he'd
used every second of his time.
Up in the stands Sandra worked her shoulders to get a kink out of
her back. She'd noticed several newsmen hurrying off to report in
the Machine's first win. She was thankful that her job was limited to
special articles.
"Chess is a pretty intense game," she remarked to Dave.
He nodded. "It's a killer. I don't expect to live beyond forty myself."
"Thirty," Bill said.
"Twenty-five is enough time to be a meteor," said Judy.
Sandra thought to herself: the Unbeat Generation.

Next day Sherevsky played the Machine to a dead-level ending.


Simon Great offered a draw for the Machine (over an unsuccessful
interfering protest from Jandorf that this constituted making a move
for the Machine) but Sherevsky refused and sealed his move.
"He wants to have it proved to him that the Machine can play end
games," Dave commented to Sandra up in the stands. "I don't blame
him."
At the beginning of today's session Sandra had noticed that Bill and
Judy were following each game in a very new-looking book they
shared jealously between them. Won't look new for long, Sandra had
thought.
"That's the 'Bible' they got there," Dave had explained. "MCO-
Modern Chess Openings. It lists all the best open-moves in chess,
thousands and thousands of variations. That is, what masters think
are the best moves. The moves that have won in the past, really. We
chipped in together to buy the latest edition—the 13th—just hot off
the press," he had finished proudly.
Now with the Machine-Sherevsky ending the center of interest, the
kids were consulting another book, one with grimy, dog-eared
pages. "That's the 'New Testament'—Basic Chess Endings," Dave
said when he noticed her looking. "There's so much you must know
in endings that it's amazing the Machine can play them at all. I
guess as the pieces get fewer it starts to look deeper."

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.

In the third round Lysmov defeated the Machine in 27 moves. There


was a flaring of flashbulbs, a rush of newsmen to the phones,
jabbering in the stands and much comment and analysis that was
way over Sandra's head—except she got the impression that Lysmov
had done something tricky.
The general emotional reaction in America, as reflected by the
newspapers, was not too happy. One read between the lines that for
the Machine to beat a man was bad, but for a Russian to beat an
American machine was worse. A widely-read sports columnist, two
football coaches, and several rural politicians announced that chess
was a morbid game played only by weirdies. Despite these thick-
chested he-man statements, the elusive mood of insecurity
deepened.
Besides the excitement of the Lysmov win, a squabble had arisen in
connection with the Machine's still-unfinished end game with
Sherevsky, which had been continued through one morning session
and was now headed for another.
Finally there were rumors that World Business Machines was
planning to replace Simon Great with a nationally famous physicist.
Sandra begged Doc to try to explain it all to her in kindergarten
language. She was feeling uncertain of herself again and quite
subdued after being completely rebuffed in her efforts to get an
interview with Lysmov, who had fled her as if she were a threat to
his Soviet virtue.
Doc on the other hand was quite vivacious, cheered by his third-
round draw with Jandorf.
"Most willingly, my dear," he said. "Have you ever noticed that
kindergarten language can be far honester than the adult tongues?
Fewer fictions. Well, several of us hashed over the Lysmov game
until three o'clock this morning. Lysmov wouldn't, though. Neither
would Votbinnik or Jal. You see, I have my communication problems
with the Russians too.
"We finally decided that Lysmov had managed to guess with
complete accuracy both the depth at which the Machine is analyzing
in the opening and middle game (ten moves ahead instead of eight,
we think—a prodigious achievement!) and also the main value scale
in terms of which the Machine selects its move.
"Having that information, Lysmov managed to play into a
combination which would give the Machine a maximum plus value in
its value scale (win of Lysmov's queen, it was) after ten moves but a
checkmate for Lysmov on his second move after the first ten. A
human chess master would have seen a trap like that, but the
Machine could not, because Lysmov was maneuvering in an area
that did not exist for the Machine's perfect but limited mind. Of
course the Machine changed its tactics after the first three moves of
the ten had been played—it could see the checkmate then—but by
that time it was too late for it to avert a disastrous loss of material.
It was tricky of Lysmov, but completely fair. After this we'll all be
watching for the opportunity to play the same sort of trick on the
Machine.

"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."

Come the morning session, Votbinnik played on for a dozen moves


then resigned.
A little later Doc managed to draw his game with Grabo by perpetual
check. He caught sight of Sandra coming down from the stands and
waved to her, then made the motions of drinking.
Now he looks almost like a boy, Sandra thought as she joined him.
"Say, Doc," she asked when they had secured a table, "why is a rook
worth more than a bishop?"
He darted a suspicious glance at her. "That is not your kind of
question," he said sternly. "Exactly what have you been up to?"
Sandra confessed that she had asked Dave to teach her how to play
chess.
"I knew those children would corrupt you," Doc said somberly.
"Look, my dear, if you learn to play chess you won't be able to write
your clever little articles about it. Besides, as I warned you the first
day, chess is a madness. Women are ordinarily immune, but that
doesn't justify you taking chances with your sanity."
"But I've kind of gotten interested, watching the tournament,"
Sandra objected. "At least I'd like to know how the pieces move."
"Stop!" Doc commanded. "You're already in danger. Direct your mind
somewhere else. Ask me a sensible, down-to-earth journalist's
question—something completely irrational!"
"Okay, why didn't Simon Great have the Machine set to play the
openings fast in the first three games?"
"Hah! I think Great plays Lasker-chess in his programming. He hides
his strength and tries to win no more easily than he has to, so he
will have resources in reserve. The Machine loses to Lysmov and
immediately starts playing more strongly—the psychological
impression made on the other players by such tactics is formidable."
"But the Machine isn't ahead yet?"
"No, of course not. After four rounds Lysmov is leading the
tournament with 3-1/2—1/2, meaning 3-1/2 in the win column and
1/2 in the loss column...."
"How do you half win a game of chess? Or half lose one?" Sandra
interrupted.
"By drawing a game—playing to a tie. Lysmov's 3-1/2—1/2 is
notational shorthand for three wins and a draw. Understand? My
dear, I don't usually have to explain things to you in such detail."
"I just didn't want you to think I was learning too much about
chess."
"Ho! Well, to get on with the score after four rounds, Angler and
Votbinnik both have 3—1, while the Machine is bracketed at 2-1/2—
1-1/2 with Jal. But the Machine has created an impression of
strength, as if it were all set to come from behind with a rush." He
shook his head. "At the moment, my dear," he said, "I feel very
pessimistic about the chances of neurons against relays in this
tournament. Relays don't panic and fag. But the oddest thing...."
"Yes?" Sandra prompted.
"Well, the oddest thing is that the Machine doesn't play 'like a
machine' at all. It uses dynamic strategy, the kind we sometimes call
'Russian', complicating each position as much as possible and
creating maximum tension. But that too is a matter of the
programming...."

Doc's foreboding was fulfilled as round followed hard-fought round.


In the next five days (there was a weekend recess) the Machine
successively smashed Jandorf, Serek and Jal and after seven rounds
was out in front by a full point.
Jandorf, evidently impressed by the Machine's flawless opening play
against Votbinnik, chose an inferior line in the Ruy Lopez to get the
Machine "out of the books." Perhaps he hoped that the Machine
would go on blindly making book moves, but the Machine did not
oblige. It immediately slowed its play, "thought hard" and annihilated
the Argentinian in 25 moves.
Doc commented, "The Wild Bull of the Pampas tried to use the living
force of his human personality to pull a fast one and swindle the
Machine. Only the Machine didn't swindle."
Against Jal, the Machine used a new wrinkle. It used a variable
amount of time on moves, apparently according to how difficult it
"judged" the position to be.
When Serek got a poor pawn-position the Machine simplified the
game relentlessly, suddenly discarding its hitherto "Russian"
strategy. "It plays like anything but a machine," Doc commented.
"We know the reason all too well—Simon Great—but doing
something about it is something else again. Great is hitting at our
individual weaknesses wonderfully well. Though I think I could play
brilliant psychological chess myself if I had a machine to do the
detail work." Doc sounded a bit wistful.
The audiences grew in size and in expensiveness of wardrobe,
though most of the cafe society types made their visits fleeting ones.
Additional stands were erected. A hard-liquor bar was put in and
then taken out. The problem of keeping reasonable order and quiet
became an unending one for Vanderhoef, who had to ask for more
"hushers." The number of scientists and computer men, Navy, Army
and Space Force uniforms were more in evidence. Dave and Bill
turned up one morning with a three-dimensional chess set of
transparent plastic and staggered Sandra by assuring her that most
bright young space scientists were moderately adept at this 512-
square game.
Sandra heard that WBM had snagged a big order from the War
Department. She also heard that a Syndicate man had turned up
with a book on the tournament, taking bets from the more heavily
heeled types and that a detective was circulating about, trying to
spot him.
The newspapers kept up their front-page reporting, most of the
writers personalizing the Machine heavily and rather too cutely.
Several of the papers started regular chess columns and "How to
Play Chess" features. There was a flurry of pictures of movie starlets
and such sitting at chess boards. Hollywood revealed plans for two
chess movies: "They Made Her a Black Pawn" and "The Monster
From King Rook Square". Chess novelties and costume jewelry
appeared. The United States Chess Federation proudly reported a
phenomenal rise in membership.

Sandra learned enough chess to be able to blunder through a game


with Dave without attempting more than one illegal move in five, to
avoid the Scholar's Mate most of the time and to be able to
checkmate with two rooks though not with one. Judy had asked her,
"Is he pleased that you're learning chess?"
Sandra had replied, "No, he thinks it is a madness." The kids had all
whooped at that and Dave had said, "How right he is!"
Sandra was scraping the bottom of the barrel for topics for her
articles, but then it occured to her to write about the kids, which
worked out nicely, and that led to a humorous article "Chess Is for
Brains" about her own efforts to learn the game, and for the nth
time in her career she thought of herself as practically a columnist
and was accordingly elated.
After his two draws, Doc lost three games in a row and still had the
Machine to face and then Sherevsky. His 1—6 score gave him
undisputed possession of last place. He grew very depressed. He still
made a point of squiring her about before the playing sessions, but
she had to make most of the conversation. His rare flashes of humor
were rather macabre.
"They have Dirty Old Krakatower locked in the cellar," he muttered
just before the start of the next to the last round, "and now they
send the robot down to destroy him."
"Just the same, Doc," Sandra told him, "good luck."
Doc shook his head. "Against a man luck might help. But against a
Machine?"
"It's not the Machine you're playing, but the programming.
Remember?"
"Yes, but it's the Machine that doesn't make the mistake. And a
mistake is what I need most of all today. Somebody else's."
Doc must have looked very dispirited and tired when he left Sandra
in the stands, for Judy (Dave and Bill not having arrived yet) asked
in a confidential, womanly sort of voice, "What do you do for him
when he's so unhappy?"
"Oh, I'm especially passionate," Sandra heard herself answer.
"Is that good for him?" Judy demanded doubtfully.
"Sh!" Sandra said, somewhat aghast at her irresponsibility and
wondering if she were getting tournament-nerves. "Sh, they're
starting the clocks."

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

Player Wins Losses


Machine 5-1/2 2-1/2
Votbinnik 5-1/2 2-1/2
Angler 5 3
Jal 4-1/2 3-1/2
Lysmov 4-1/2 3-1/2
Serek 4-1/2 3-1/2
Sherevsky 4 4
Jandorf 2-1/2 5-1/2
Grabo 2 6
Krakatower 2 6

LAST ROUND PAIRINGS


Machine vs. Angler
Votbinnik vs. Lysmov
Jal vs. Serek
Sherevsky vs. Krakatower
Jandorf vs. Grabo

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

Next morning Sandra heard Dave's guess confirmed by both Angler


and Great. Doc had spotted them having coffee and a malt together
and he and Sandra joined them.
Doc was acting jubilant, having just drawn his adjourned game with
Sherevsky, which meant, since Jandorf had beaten Grabo, that he
was in undisputed possession of Ninth Place. They were all waiting
for the finish of the Votbinnik-Lysmov game, which would decide the
final standing of the leaders. Willie Angler was complacent and
Simon Great was serene and at last a little more talkative.
"You know, Willie," the psychologist said, "I was afraid that one of
you boys would figure out something like that. That was the chief
reason I didn't have the Machine use the programmed openings until
Lysmov's win forced me to. I couldn't check every opening line in
MCO and the Archives and Shakhmaty. There wasn't time. As it was,
we had a dozen typists and proofreaders busy for weeks preparing
that part of the programming and making sure it was accurate as far
Welcome to our website – the perfect destination for book lovers and
knowledge seekers. We believe that every book holds a new world,
offering opportunities for learning, discovery, and personal growth.
That’s why we are dedicated to bringing you a diverse collection of
books, ranging from classic literature and specialized publications to
self-development guides and children's books.

More than just a book-buying platform, we strive to be a bridge


connecting you with timeless cultural and intellectual values. With an
elegant, user-friendly interface and a smart search system, you can
quickly find the books that best suit your interests. Additionally,
our special promotions and home delivery services help you save time
and fully enjoy the joy of reading.

Join us on a journey of knowledge exploration, passion nurturing, and


personal growth every day!

testbankbell.com

You might also like