<h> tag, 278
absolute values
arguments, 90
abstraction, objects, 346
accessing
cookies via document.cookie, 189-190
global variables, 324
properties within a method, 327-328
accuracy, debugging code, 114-119
ActiveX, 289
advanced programming, 187, 198
cookies
JavaScript programming weakness, 187-191
AJAX (Asynchronous JavaScript and XML), 210, 285-289, 297
ajaxRequest function, 292
ajaxResponse function, 292
frameworks, 288
JavaScript client, 286
libraries, 288
creating quizzes from, 292-296
algorithms, 169
nested loops, 169
Amazon.com, 287
Andromeda Strain, 114
animations
API (application programming interface), 209
applets (Java), 203, 255, 265. See also programs
appletviewer, 256
Autocrazy, 212
security issues, 211
viewing inside web page, 264-265
appletviewer, 256
application programming interface (API), 209
applications. See also applets (Java); programs
compilation and packaging, 408-409
continuous integration and deployment, 416
open source, distributing, 409
RAD (rapid application development), 47
version control, 410
Visual Basic, creating from scratch, 361-368
arguments
absolute values, 90
arithmetic operators
Array data type (PHP), 312
elements, 87
parallel, 150
searching
sequential searches, 159
ascending order, sorting data, 155
ASCII (American Standard Code for Information Interchange), 76
nonprinting characters, 87
assembly language, 334
assignment operators, PHP, 313
Asynchronous JavaScript and XML (AJAX). See AJAX (Asynchronous JavaScript and XML)
Autocrazy, 212
automated testing, code, 415-416
Backbone.js, 288
bandwidth
web pages, 257
behavior, objects, adding to, 350-352
beta testing programs, 141
binary searches
bits, 76
Boolean data type (PHP), 312
Boolean literals, 222
Boolean variables, 225
bottom-up design, 48
branching programs, 133
breakpoints, setting, 127
debugging tools, 113
logic errors, 115
runtime errors, 119
built-in functions
C programming language, 339-343
bytes, 76
C programming language, 333-336, 354-355
command keywords, 334
conversion characters, 340
functions, 338
main(), 336
writing general program, 343-345
operators, 345
requirements, 335
strings, 342
C# programming language, 375
C++ programming language, 333, 346, 354-355
accessing members, 350
working with class scope, 352-353
OOP (object-oriented programming), 346-347
requirements, 335
versus Java, 202
calculations, JavaScript, 79-83, 92-93
call stacks, 127
call-by-value languages, 249
calling functions, 321
CASE (Computer-Aided Software Engineering), 417-418
case sensitivity, Java programs, 214
CGI (Common Gateway Interface), 206
character literals, 222
character strings, 61
charts, flowcharts, 51, 97, 133
check boxes, Java interface, 209
Chrome, debugging tools, 120
CIL (common intermediate language), CLR (common language runtime), 377
classes
inheritance, 247
.NET Framework, FCL (framework class library), 377-378
objects, 346
CIL (common intermediate language), 377
CTS (common type system), 377
code. See also programs
bugs
logic errors, 115
runtime errors, 119
placement, 15
JavaScript, packaging into functions, 137-139
leading spaces, 314
profiling, 142
spaghetti, 133
Visual Basic
modules, 360
JavaScript, 13
code listings
Accessing Class Properties within a Method, 327-328
Accessing Global Variables with the global statement, 324
Adding a different interactivity to your web photos with the onmouseover event, 179-180
Adding a photo rotator to your webpage is easy with JavaScript, 174-175
Adding interactivity to your web photos, 177
AJAX Library, 291
Alert sends output of calculations and other data to the screen, 62-63
Binary search can speed searching tremendously, 163-162
Building a simple informational function, 137-138
C is cryptic and requires several elements that other languages do not), 335
C program contains no errors but is extremely difficult to maintain, 119
C program with better spacing is far clearer to understand, 120
Class can have both data members and procedure methods, 246
Class with a Method, 327
Collecting your functions into a .js file, 139-140
Completed version of the Calculator program, 243
Completing the text-based Java applet, 258
Counting down from 10 to 1 is simple with a for loop, 106
Declaring a Function That Requires an Argument, 322
Declaring and Calling a Function, 321
Even a simple program can have an error in it, 116
Examples of setting your own styles using CSS to control font color, size, and typeface, 279-280
Examples of the <h> tag show how to change headline text size, 277-278
Function That Returns a Value, 322
General format for all HTML Web pages, 275-276
HTML File for the Quiz Example, 293
HTML file that carries a Java applet, 261-263
JavaScript calculations follow the order of operator precedence, 81-82
JavaScript File for the Quiz Example, 295-296
JavaScript script that performs a button change when the user points to the button, 71
Machine language is extremely difficult for people to decipher, 12
Merging two strings together is simple, 76
Move away from the text mode into windowed features, 244
NetBeans builds an outline of your code so you have less to type, 241-242
Number-guessing game can use a counter variable, 147-148
Our website for our small store is starting to get a bit robust, 181-182
PHP Script Incorporated into HTML, 304
Printing a message several times in a loop is efficient, 103-104
Printing results of calculations, 59
Printing without a for loop gets tedious, 102-103
Program outline that doesn’t use functions can be hard to maintain, 165-166
Program outline that uses functions is simple, 166-167
Program that uses functions for everything is easier to maintain and understand, 167-168
Proof That Your Object Exists, 326
Sales program stores data in arrays for each month, 150-151
Sales-reporting and averaging program can use an accumulator for sales totals, 152-153
scanf() and printf() for input and output, 343-344
Sequential search can help an inventory application, 161
Showing Object Properties, 327
Simple C# program to calculate the area of a circle when given the radius, 380-381
Simple HTML commands can produce attractive Web pages, 274-275
Simple Java program adds two numbers together, 240
Simple PHP Script, 303
Swing-based Java applet uses this program outline, 256-257
Teacher’s grade-printing program is easy to follow when you use a loop, 104-105
Type this to complete the main procedure that Forte began for you, 243
Type your first program into the editor, 16-17
Use an if statement when you want your program to make a decision, 96-97
Use for to control a counting loop, 101
Use main() to control the rest of the program, 343-345
Using if-else to compute an employee’s overtime, 232-233
Using prompt to get the value of a circle’s radius, 64
Using prompts to get a user’s first and last names, 66
Using the for Statement, 310
Variables Defined Outside Functions Are Inaccessible from Within a Function by Default, 323
while Statement, 308
XML File Containing the Quiz Questions and Answers, 294
You can control the grade program with a while loop, 107-108
You can nest several if statements to check a series of conditions, 99-100
You can sort a list of values with the bubble sort, 156-157
You can use prompt to simulate a cash register program for a small store, 67-68
You must supply detailed instructions when you want the computer to do something, 27-28
Your first Java program may look cryptic, 213-214
college degrees, 395
combined assignment operators, PHP, 314-315
command keywords, C programming language, 334
command tags (HTML). See tags (HTML)
double slashes (//), 15
Java code, 214
JavaScript, 14
PHP scripts, 305
placement, 15
Common Gateway Interface (CGI), 206
common intermediate language (CIL), CLR (common language runtime), 377
common language runtime (CLR). See CLR (common language runtime)
common type system (CTS), CLR (common language runtime), 377
companies
computer-related jobs, 393-394
data processing departments, 389-393
IT (information technology) departments, 389-393
programmers, job titles, 394-400
ongoing training needs, 419-420
putting program into production, 401-403
structured walkthrough, 400-401
comparison operators
Java, 229
PHP, 316
compilation, applications, 408-409
compilers, 19
JIT (just-in-time compiler), 377
computer programs. See programs
Computer-Aided Software Engineering (CASE), 417-418
computers
mistakes, 8
programming languages, 33
concatenation operators, PHP, 314
conditional operators, Java, 230
constants, PHP, 319
constructs, 133
context, devices, 260
continuous integration and deployment of applications, 416
contract programmers, 132, 393
control statement, C programming language, 345-346
controlling programs, 95, 109-111
comparing data with if statement, 95-98
relational tests, writing, 96-100
conversion characters, C programming language, 340
cookieName property (cookies), 191
accessing, via document.cookie, 189-190
setting and reading, PHP, 329
cookieValue property (cookies), 191
counting loops, controlling, 101
Crichton, Michael, 114
CSS (cascading style sheets), 282
CTS (common type system), CLR (common language runtime), 377
data
comparing, if statements, 95-98
hiding, 211
data formats, C programming language, 337-338
data modeling, UML (Unified Modeling Language), 418
performing math with JavaScript, 79-83
data processing departments, 6, 389-393
databases, interacting with, PHP, 329
JavaScript console log, 125-126
decision structured-programming construct, 134-135
decision symbols, 97
decrement operators, Java, 227-228
defining PHP functions, 321-323
degrees (college), 395
deprecation, 279
descending order, sorting data, 155
bottom-up design, 48
defining output and data flows, 43-50
OOD (object-oriented design), 44
RAD (rapid application development), 47
user-program agreements, 40-41
desk checking programs, 141
devices, context, 260
digital signatures, 211
distributing applications, 407, 410
DLR (dynamic language runtime), .NET Framework, 378
document.cookie, accessing cookies, 189-190
DOM (document object model), 286
domain property (cookies), 191
Donahue, John, 204
double slashes (//), comments, 15
drawString() function, 215-217
drawString() method, 257
dynamic language runtime (DLR), .NET Framework, 378
EBCDIC, tables, 78
echo statement, 304
elements, arrays, 87
Ember.js, 288
empty strings, 64
encryption, 211
environment, IDEs (Integrated Development Environments), 415
errors. See bugs
escape sequences, Java, 222-223
events, mouse, capturing, 66-71
executable content, Java, 204-206
expires property (cookies), 191
extraction operators, 347
Facebook, 287
FCL (framework class library), .NET Framework, 377-378
fields, 42
Firefox, debugging tools, 120
Float data type (PHP), 312
floating-point numbers, 82
floating-point variables, 225
flow control functions, PHP, 306-308
form data, processing, PHP, 328
format, Java statements, 230
Forte for Java, 217
FORTRAN programming language, 34
framework class library (FCL), .NET Framework, 377-378
frameworks, AJAX (Asynchronous JavaScript and XML), 288
ajaxRequest, 292
ajaxResponse, 292
C programming language, 338
main(), 336
writing general program, 343-345
case sensitivity, 322
collecting into .js file, 140
JavaScript code, packaging into, 137-139
versus methods, 216
PHP, 320
calling, 321
returning values from user-defined, 322-323
printBR(), 322
user-defined, 321
returning values from, 322-323
garbage collection, CLR (common language runtime), 377
Git, 410
GitHub, 410
global variables, 224
Gmail (Google), 287
goto statement, 133
graphical user interface (GUI)
graphics. See images
GUI (graphical user interface)
Gutmans, Andi, 301
<h> tag, 278
hiding data, 211
Hopper, Grace, 114
horizontal scrolling, websites, 437
Hörnell, Karl, 212
HTML (Hypertext Markup Language), 34, 269, 275-276, 282
Java, executable content, 204-206
standardization, 271
tags
<h>, 278
web pages
displaying, 273
including graphics in, 281-282
Hypertext Markup Language (HTML). See HTML (Hypertext Markup Language)
IDEs (Integrated Development Environments), 415
nesting, 100
relational operators, 99
web pages, including in, 281-282
increment operators, Java, 227-228
inheritance
Java classes, 247
objects, 346
init() method, 216
initialization, Java variables, 224
insertion operators, 347
Integer data type (PHP), 312
integer literals, 222
PHP, automatically incrementing and decrementing, 315-316
Integrated Development Environments (IDEs), 415
interfaces
API (application programming interface), 209
CGI (Common Gateway Interface), 206
Internet-related jobs, 399-400
interpreters, 19
I/O (input/output), C++ programming language, 347-348
IT (information technology) departments, 389-393
Java, 12, 34, 201-204, 212-218, 221, 230, 235-236
appletviewer, 256
viewing inside web page, 264-265
versus C++, 202
call-by-value language, 249
case sensitivity, 214
inheritance, 247
code
comments, 214
development of, 202
Forte for Java, 217
Java Virtual Machine (JVM), 207-208
versus JavaScript, 210
JVM (Java Virtual Machine), 216-217
multi-platform executable content, 206-208
NetBeans, 217
OOP (object-oriented programming), 245-246, 248-249
coding, 262
comparison, 229
conditional, 230
primary math, 227
programs, GUI (graphical user interface), 244-245
running programs, NetBeans, 239-244
seamless execution, 206
security issues, 211
statements
format, 230
Swing, 209
arrays, 226
Boolean, 225
floating-point, 225
initialization, 224
string, 226
web pages, 255
Java Virtual Machine (JVM), 207-208
JavaScript, 10-13, 34, 173, 183-184, 285, 378. See also AJAX (Asynchronous JavaScript and XML)
capturing mouse position, 179
comments, 14
versus Java, 210
jQuery, 288
math operators, 79
packaging code into functions, 137-139
Prototype, 288
repeating news tickers, adding to websites, 179-183
rotating images on page, 173-179
scriptlets, 66
writing code, 13
XMLHttpRequest object, 289-291
JIT (just-in-time compiler), 377
job titles, programmers, 394-400
jQuery JavaScript library, 288
junior programmers, 397
JVM (Java Virtual Machine), 207-208
keyboard data, obtaining, prompt method, 62-71
keywords, C programming language, 334
languages. See programming languages
LANs (Local Area Networks), 399
leading spaces, 314
Lerdorf, Rasmus, 301
libraries
AJAX (Asynchronous JavaScript and XML), 288
creating quizzes from, 292-296
.NET Framework, FCL (framework class library), 377-378
licenses, software, 10
Local Area Networks (LANs), 399
local variables, 323
logic errors, 115
logical operators, PHP, 316-318
structured-programming construct, 135-137
loops
counting, controlling, 101
Java
nested, 169
nesting, 107
lowercase strings, 88
Lunar Lander, 204
machine language, 12
main() function, 336
mainframe computers, 78
maintaining programs, 19
Management Information Systems (MIS), 416
math
performing with JavaScript, 79-83
math operators
Java, 227
JavaScript, 79
Math.abs() method, 90
media queries, CSS (cascading style sheets), adding to web pages, 432
members, accessing objects, 350
messages, objects, 346
methods
drawString(), 257
versus functions, 216
init(), 216
Math.abs(), 90
prompt, obtaining keyboard data, 62-71
resize(), 258
send(), 290
MIS (Management Information Systems), 416
mistakes, computers, 8
mobile web applications
distribution, 409
modules, code, 360
mouse
capturing position, 179
names, sorting, 155
naming, PHP variables, 310-312
nested loops, 169
nesting
if statements, 100
loops, 107
NetBeans, 217
Java programs, running, 239-244
C# programming language, 378-387
CLR (common language runtime), 376-377
DLR (dynamic language runtime), 378
FCL (framework class library), 377-378
parallel computing platform, 378
networks
LANs (Local Area Networks), 399
WANs (Wide Area Networks), 399
New Project selection screen (Visual Basic), 360
news tickers, websites, adding to, 179-183
nonprinting characters, ASCII codes, 87
NULL data type (PHP), 312
numbers, binary equivalents, 85
Object data type (PHP), 312
object-oriented programming (OOP). See OOP (object-oriented programming)
objects, 347
abstraction, 346
classes, 346
DOM (document object model), 286
inheritance, 346
members, accessing, 350
messages, 346
polymorphism, 347
reuse, 347
OOD (object-oriented design), 44
OOP (object-oriented programming), 44
abstraction, 346
C++ programming language, 346-347
coding, 262
open source software, distributing, 409
operators
C programming language, 345
extraction, 347
insertion, 347
comparison, 229
conditional, 230
primary math, 227
assignment, 313
comparison, 316
concatenation, 314
relational, if statement, 99
keyboard data, obtaining, 62-71
programs, 42
overloading operators, 354-355
ownership, programs, 10
packaging applications, 408-409
parallel arrays, 150
parallel computing platform, .NET Framework, 378
parallel testing programs, 141-142
parameters, programs, 42
path property (cookies), 191
PHP (PHP: Hypertext Preprocessor), 34, 301, 329
comments, 305
constants, 319
echo statement, 304
flow control functions, 306-308
functions, 320
returning values from user-defined, 322-323
assignment, 313
comparison, 316
concatenation, 314
print() statement, 304
placement, comments, 15
polymorphism, objects, 347
precedence, operators, PHP, 318-319
preprocessor directives, 336-337
primary math operators, Java, 227
print() statement, 304
printBR() function, 322
printf() function, 339-341, 344
printing
private keys, 211
procedures, Visual Basic, 369-370
profiling code, 142
programmers,
demand for, 9
job security, 402
ongoing training needs, 419-420
JavaScript programming weakness, 187-191
accumulators, 146-148, 152-153
nested loops, 169
putting program into production, 401-403
structured walkthrough, 400-401
first program, 13
HTML (Hypertext Markup Language), 269-274
OOP (object-oriented programming), 44
resource editors, 414
decision structured-programming construct, 134-135
looping structured-programming construct, 135-137
origins, 132
sequence structured-programming construct, 133-134
programming languages, 33-34. See also AJAX (Asynchronous JavaScript and XML); C programming language; Java; JavaScript; PHP; Visual Basic
AJAX (Asynchronous JavaScript and XML), 285-289
assembly, 334
requirements, 335
C#, 375
requirements, 335
call-by-value, 249
compilers, 19
FORTRAN, 34
goto statement, 133
interpreters, 19
Java, 34, 201-204, 212-218, 221, 230, 235-236
applets, 203
versus C++, 202
development of, 202
multi-platform executable content, 206-208
NetBeans, 217
OOP (object-oriented programming), 245-246, 248-249
seamless execution, 206
security issues, 211
writing code, 13
Visual Basic, 333, 359, 370-371
programs, 95. See also applets (Java); applications; code
branching, 133
comparing data with if statement, 95-98
bottom-up design, 48
defining output and data flows, 43-50
OOD (object-oriented design), 44
RAD (rapid application development), 47
user-program agreements, 40-41
existing, 9
fields, 42
Java
case sensitivity, 214
running with NetBeans, 239-244
maintaining, 19
obtaining, 22
output, 42
obtaining keyboard data, 62-71
ownership, 10
parameters, 42
putting into production, 401-403
relational tests, writing, 96-100
setting breakpoints, 127
software licenses, 10
tasks, 6
beta, 141
desk checking, 141
prompt method, keyboard data, obtaining, 62-71
properties
Prototype JavaScript library, 288
purchasing programs, 22
Python, 378
QA (quality assurance) testing, 415-416
RAD (rapid application development), 47
relational operators, if statement, 99
relational tests, writing, 96-100
remarks. See comments
repeating news tickers, websites, adding to, 179-183
reserving space, arrays, 149-150
resize() method, 258
Resource data type (PHP), 312
resource editors, 414
reuse, objects, 347
rollover effect, web pages, 66
rotating images on page, 173-179
Ruby, 378
runtime errors, 119
sales totals, accumulators, 152-153
saved instructions, programs, 29-31
scope, classes, working with, 352-353
screen, printing, JavaScript, 57-58
scriptlets (JavaScript), 66
scripts
JavaScript, scriptlets, 66
PHP
comments, 305
Simple PHP Script, 303
searching arrays
Secure property (cookies), 191
security, Java, 211
send() method, 290
senior programmers, 397
sequence structured-programming construct, 133-134
sequential searches, arrays, 159
skeleton, Java applet, 256-257
slashes, comments, 15
software. See applications
space, arrays, reserving, 149-150
spaghetti code, 133
statements
C programming language, control, 345-346
echo, 304
goto, 133
if
nesting, 100
relational operators, 99
Java
format, 230
print(), 304
String data type (PHP), 312
string variables, 226
C programming language, 342
character, 61
empty, 64
making all capital or lowercase, 88
structured programming, 131-137
constructs, 133
decision structured-programming construct, 134-135
looping structured-programming construct, 135-137
origins, 132
sequence structured-programming construct, 133-134
subroutines. See functions
Subversion, 410
Suraski, Zeev, 301
swapping values, variables, 154-155
<h>, 278
tasks, programs, 6
testing
beta, 141
desk checking, 141
text, formatting in HTML (Hypertext Markup Language), 276-278
text editors, 13
top-down design, programs, 48-50
trailing spaces, 314
training, programming, ongoing needs, 419-420
twips, 362
UML (Unified Modeling Language), 418
uppercase strings, 88
user sessions, setting and reading, PHP, 329
user-defined functions, 321
returning values from, 322-323
user-program agreements, programs, 40-41
values
variables
global, 224
arrays, 226
Boolean, 225
floating-point, 225
initialization, 224
string, 226
local, 323
watch, 127
applications, creating from scratch, 361-368
property values, 367
twips, 362
WANs (Wide Area Networks), 399
watch variables, 127
web browsers, Java, usage, 208-209
web pages
bandwidth, 257
displaying, 273
including graphics in, 281-282
placing Java applets in, 261-264
rollover effect, 66
viewing applets inside, 264-265
websites
adding repeating news ticker to, 179-183
Wide Area Networks (WANs), 399
word processors, 13
writing
C general program functions, 343-345
XML (Extensible Markup Language), 287, 294. See also AJAX (Asynchronous JavaScript and XML)
3.15.229.111