Page 848 - Introduction to Programming with Java: A Problem Solving Approach
P. 848
814 Index Round-off errors, 436–37
row variables, 66
Rows (GridLayout), 704, 705–7 Run commands, 12
Run dialog box, 18–19
Runtime errors
analyzing, 576–80
defined, 89, 118, 556 Russell 3000 Index, 415
S
Salaried class, 529
Salaried3 class, 543 SalariedAndCommissioned class, 537 SalariedAndCommissioned2 class,
JRadioButton, 726 JTextArea, 720 JTextField, 653
Set statements, print command in, 32–33 setBackground method, 674, 676, 720 SetBorder method, 731–33
setColor method, 185, 550 setDefaultCloseOperation method,
649, 651 setEditable method
JButton, 663 JComboBox, 727, 728 JTextArea, 720 JTextField, 653, 654
setEnabled method, 722–23, 726 setFileSelectionMode method, 629,
631
setForeground method, 674 setLayout method
to assign BorderLayout to contain- ers,699
to assign GridLayout to containers, 704
for dynamic layout adjustments, 698 for layout manager assignments, 650,
696
setLineWrap method, 720
setPaint method calls, 550
setSelected method, 722, 726
setSelectedIndex method, 728
setSelectedItem method, 727, 728
Slashes. See also Division
in compound assignment operator, 80 as division operator, 11, 28
to set off comments, 58–59
sleep method, 455, 797
Sliders, 736–38
Software development tools, 46, 214–15 Software engineering, 296
Sort class, 394, 395
Sorting arrays, 390, 393–96
Sorting characters, 438
Source code, 10–12
Space program example, 325
Spaces, 27, 764–65
Spaghetti code, 30
Specifications, 322
SpeedDialList program, 374 SpeedDialList2 program, 378
Spherical coordinate systems, 544 Splitting string literals, 63 Squarebrackets
in array declarations, 373
in arrays with two or more dimensions,
396–97, 402 purpose, 61, 174
Square class, 315, 316, 319–20 SquareDriver class, 314
Standard coding conventions, 60 Standard Edition applications, 15 Standard windows. See Windows (GUI) Start tags, 613
541
Sale class, 499, 500
SalesClerks program, 404–9 SalesPerson class, 477 SalesPerson2 class, 492
Save Asdialogbox,16–18 Saving files, 16, 64
Scalability, 402, 591
Scanner class, 91–94, 153, 603 Scanner constructor calls, 609 Scanner methods, 610–11 Scientific notation, 437
Scope, 216–17, 348
Screen resolution, 650
Screen shots, 9
Scroll panes, 736
Scrollable containers, 735–36 Searching in arrays, 388–92 Section delimiters, 759 SecurityException class, 571 Seeds, 180–81
Selection sorts, 393–94 Self-documenting code, 64 Semantics, 109
Semaphores, 800–803
Semicolons
in do loops, 126
for empty statements, 454–56
required for Java statements, 11, 62, 65
SentenceTester program, 111, 112 Sentinel values
boolean variables as, 138
in nested loops, 41–42
“q” as, 561
terminating loops with, 38, 39–41
Sequential searches, 388–89, 390, 787 Sequential steps, 548
Sequential structures, 30, 57 Sequential-execution programs, 57, 107 Serialization, 622–24
Server view, 48 Servers, 305 Servlets, 15
set methods
ArrayList, 411–12 Color, 674
defined, 225 JButton, 663 JCheckBox, 722 JComboBox, 727 JLabel, 652
setSize method, 650 Statements Apago PDF Enhancer
setText methods JButton, 663 JLabel, 652 JTextArea, 720 JTextField, 653
setTitle method, 650 setVisible method
JButton, 663 JCheckBox, 722 JComboBox, 727 JTextField, 653, 654
setWrapStyleWord method, 720 Shape algorithm, 32–33
Shared values, class variables for, 347 Shifting array element values, 382–85 Shirt class, 307, 308
ShirtDriver class, 306
short reserved word, 753
Short-circuit evaluation, 453–54, 512 Shortcut operators, 765
Short-form tracing, 43–44 showConfirmDialog method, 631 showInputDialog method, 98–99 showMessageDialog method, 96–97,
631, 668–70
showOpenDialog method, 629, 631 Signatures, 262
Significant digits, 70
SimpleWindow program, 647–49 Simulations, 227–34, 385–86, 387
sin method, 158, 160
Single quotes, 83, 84, 121
16-bit characters, 459
16-bit instructions, 12
braces with, 761–63 defined, 11
flow of control, 30–31 line breaks in, 301 multiple, 764 pseudocode, 26
States
implementing in top-down design,
313–14
of objects, defined, 197
tracking with boolean variables, 135 tracking with ItemListener, 723
Static allocation, 346 Static binding, 520 static modifier
basic purpose, 61, 753
for class variables, 346
with Math methods, 156 optional for interfaces, 534–35 in UML class diagrams, 216
stdIn variable, 91
Stepping over method calls, 215 Stepwise refinement, 312–13 Step-with-midpoint algorithm, 232–34 StockAverage program, 415–17 Stopping conditions, 784
Storage devices, 6–7
Streams, 604
strictfp reserved word, 754
String concatenation, 66, 83, 87 String literals, 26, 62–63
String methods, 87–90, 166–72
String pooling, 513
String variables, 86, 98, 124