did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9780619064976

Java Programming

by
  • ISBN13:

    9780619064976

  • ISBN10:

    0619064978

  • Edition: CD
  • Format: Paperback
  • Copyright: 2003-01-27
  • Publisher: Course Technology
  • View Upgraded Edition
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $133.95

Summary

Java Programming: From Problem Analysis to Program Design is the ground-breaking, definitive text for the CS[subscript 1] Java course. This text was written and designed for the student. Success with Java will come easily through the numerous clear and concise examples. Drs. Malik and Nair drill down to the most important facet of an introduction to programming course: How does one analyze and solve the problem? Book jacket.

Author Biography

D.S. Malik is a Professor of Mathematics and Computer Science at Creighton University P.S. Nair is the Director of Computer Science at Creighton University

Table of Contents

Preface xxvii
An Overview of Computers and Programming Languages
1(20)
Introduction
2(1)
An Overview of the History of Computers
2(1)
Elements of a Computer System
3(3)
Hardware
3(2)
Software
5(1)
The Language of a Computer
6(1)
The Evolution of Programming Languages
7(1)
Processing a Java Program
8(3)
Programming with the Problem Analysis--Coding--Execution Cycle
11(4)
Programming Methodologies
15(2)
Structured Programming
15(1)
Object--Oriented Programming
16(1)
Quick Review
17(1)
Exercises
18(3)
Basic Elements of Java
21(76)
The Basics of a Java Program
22(3)
Special Symbols
23(1)
Word Symbols
24(1)
Identifiers
24(1)
Data Types
25(5)
Primitive Data Types
26(4)
Arithmetic Operators and Operator Precedence
30(3)
Order of Precedence
32(1)
Expressions
33(3)
Mixed Expressions
34(2)
Type Conversion (Casting)
36(1)
The class String
37(3)
Parsing Numeric Strings
38(2)
Input
40(14)
Allocating Memory with Named Constants and Variables
40(2)
Putting Data into Variables
42(2)
Saving and Using the Value of an Expression
44(1)
Declaring and Initializing Variables
45(1)
Input (Read) Statement
45(9)
Increment and Decrement Operators
54(2)
Strings and the Operator +
56(2)
Output
58(7)
The Method flush
64(1)
Packages, Classes, Methods, and the import Statement
65(1)
Creating a Java Application Program
66(5)
Programming Style and Form
71(4)
Syntax
71(2)
Documentation
73(2)
More on Assignment Statements
75(2)
Programming Example: Convert Length
77(4)
Programming Example: Make Change
81(4)
Quick Review
85(3)
Exercises
88(7)
Programming Exercises
95(2)
Introduction to Objects and Input/Output
97(50)
Objects and Reference Variables
98(4)
The Operator new
99(3)
Using Predefined Classes and Methods in a Program
102(2)
The Dot Between Class (Object) Name and Class Member: A Precaution
103(1)
The class String
104(9)
Input/Output
113(13)
Using Dialog Boxes for Input/Output
113(7)
Tokenizing a String
120(4)
Formatting the Output of Decimal Numbers
124(2)
File Input/Output
126(4)
Inputting (Reading) Data from a File
127(1)
Storing (Writing) Output to a File
128(2)
Programming Example: Movie Ticket Sale and Donation to Charity
130(6)
Programming Example: Student Grade
136(3)
Quick Review
139(1)
Exercises
140(3)
Programming Exercises
143(4)
Control Structures I
147(52)
Control Structures
148(1)
Relational Operators
149(2)
Relational Operators and Primitive Data Types
151(1)
Comparing Strings
152(4)
Logical (Boolean) Operators and Logical Expressions
156(2)
Order of Precedence
158(6)
Short-Circuit Evaluation
162(1)
The boolean Data Type and Logical (Boolean) Expressions
163(1)
Selection: if and if...else
164(13)
One-Way Selection
164(3)
Two-Way Selection
167(4)
Compound (Block of) Statements
171(1)
Multiple Selections: Nested if
172(3)
Comparing if. . .else Statements with a Series of if Statements
175(1)
The Conditional Operator (? :)
176(1)
switch Structures
177(6)
Programming Example: Cable Company Billing
183(6)
Quick Review
189(1)
Exercises
190(6)
Programming Exercises
196(3)
Control Structures II
199(64)
Why Is Repetition Needed?
200(1)
The while Looping (Repetition) Structure
201(14)
Counter--Controlled while Loops
204(3)
Sentinel--Controlled while Loops
207(6)
Flag--Controlled while Loops
213(1)
EOF--Controlled while Loops
213(2)
Programming Example: Checking Account Balance
215(9)
Programming Example: Fibonacci Number
224(5)
The for Looping (Repetition) Structure
229(6)
Programming Example: Classify Numbers
235(4)
The do...while Looping (Repetition) Structure
239(4)
break and continue Statements
243(2)
Nested Control Structures
245(2)
Quick Review
247(2)
Exercises
249(11)
Programming Exercises
260(3)
Graphical User Interface (GUI) and Object-Oriented Design (OOD)
263(50)
Graphical User Interface (GUI) Components
264(26)
Creating a Window
268(1)
JFrame
269(5)
Getting Access to the Content Pane
274(1)
JLabel
275(4)
JTextField
279(3)
JButton
282(8)
Programming Example: Temperature Conversion
290(8)
Object-Oriented Design
298(7)
A Simplified OOD Methodology
299(6)
Implementing Classes and Operations
305(2)
The class IntClass
306(1)
Quick Review
307(1)
Exercises
308(3)
Programming Exercises
311(2)
User-Defined Methods
313(80)
Predefined Methods
314(5)
User-Defined Methods
319(9)
Value-Returning Methods
320(3)
The return Statement
323(3)
Final Program
326(2)
Programming Example: Palindrome Number
328(4)
Flow of Execution
332(1)
Programming Example: Largest Number
332(2)
Void Methods
334(7)
Void Methods without Parameters
334(7)
Primitive Data Type Variables as Parameters
341(2)
Reference Variables as Parameters
343(16)
Parameters and Memory Allocation
347(1)
Reference Variables of the String Type as Parameters: A Precaution
347(3)
The class StringBuffer
350(9)
Scope of an Identifier within a Class
359(2)
Method Overloading: An Introduction
361(1)
Programming Example: Data Comparison
362(12)
Quick Review
374(2)
Exercises
376(9)
Programming Exercises
385(8)
User-Defined Classes and ADTs
393(74)
Classes
394(24)
Constructors
397(1)
Unified Modeling Language Diagrams
398(1)
Variable Declaration and Object Instantiation
399(2)
Accessing Class Members
401(1)
Built-in Operations on Classes
402(1)
The Assignment Operator and Classes: A Precaution
402(3)
Class Scope
405(1)
Methods and Classes
405(1)
Definitions of the Constructors and Methods of the class Clock
405(13)
The Copy Constructor
418(1)
Classes and the Method toString
419(2)
Static Members of a Class
421(2)
static Variables (Data Members) of a Class
422(1)
Finalizers
423(1)
Creating Your Own Packages
423(5)
Multiple File Programs
425(3)
The Reference this
428(5)
Cascaded Method Calls
429(4)
Inner Classes
433(1)
Abstract Data Types
433(1)
Programming Example: Candy Machine
434(23)
Quick Review
457(2)
Exercises
459(5)
Programming Exercises
464(3)
Arrays
467(56)
Why Do We Need Arrays?
468(1)
Arrays
469(19)
Alternate Ways to Declare an Array
471(1)
Accessing Array Components
471(4)
Specifying Array Size During Program Execution
475(1)
Arrays and the Instance Variable length
475(1)
Processing One-Dimensional Arrays
476(4)
Array Initialization During Declaration
480(1)
Array Index Out of Bounds Exception
480(1)
The Assignment Operator, the Relational Operators, and Arrays: A Precaution
481(3)
Arrays as Parameters to Methods
484(4)
Parallel Arrays
488(1)
Arrays of Objects
489(2)
Two--Dimensional Arrays
491(15)
Accessing Array Components
494(2)
Two--Dimensional Array Initialization During Declaration
496(2)
Processing Two--Dimensional Arrays
498(6)
Passing Two--Dimensional Arrays as Parameters to Methods
504(2)
Multidimensional Arrays
506(2)
Programming Example: Text Processing
508(4)
Quick Review
512(1)
Exercises
513(4)
Programming Exercises
517(6)
Applications of Arrays and Strings
523(58)
List Processing
524(18)
Searching
524(3)
Sorting a List: Selection Sort
527(7)
Sequential Search on an Ordered List
534(3)
Binary Search
537(5)
The class Vector
542(7)
Primitive Data Types and the class Vector
548(1)
Programming Example: Election Results
549(16)
The class String (Revisited)
565(5)
Programming Example: Pig Latin Strings
570(6)
Quick Review
576(1)
Exercises
576(3)
Programming Exercises
579(2)
Inheritance and Composition
581(88)
Inheritance
582(20)
Using Methods of the Superclass in a Subclass
584(6)
Constructors of the Superclass and Subclass
590(8)
Protected Members of a Class
598(4)
The class Object
602(2)
Java Stream Classes
604(1)
Objects of Superclasses and Subclasses
605(6)
The Operator instanceof
606(5)
Abstract Methods and Classes
611(3)
Interfaces
614(2)
Composition
616(5)
Programming Example: Grade Report
621(36)
Quick Review
657(1)
Exercises
658(6)
Programming Exercises
664(5)
Handling Exceptions and Events
669(52)
The Java Exception Hierarchy
670(4)
Java's Exception Classes
674(3)
Checked and Unchecked Exceptions
677(1)
Handling Exceptions within a Program
678(14)
try/catch/finally Block
678(6)
The class Exception and the Operator instanceof
684(4)
Rethrowing and Throwing an Exception
688(4)
The Method printStackTrace
692(3)
Exception--Handling Techniques
695(1)
Terminate the Program
695(1)
Fix the Error and Continue
695(1)
Log the Error and Continue
695(1)
Creating Your Own Exception Classes
696(2)
Event Handling
698(6)
Programming Example: Calculator
704(9)
Quick Review
713(2)
Exercises
715(4)
Programming Exercises
719(2)
Advanced GUIs and Graphics
721(92)
Applets
725(4)
class Font
729(3)
class Color
732(6)
class Graphics
738(10)
Converting an Application Program to an Applet
745(3)
Additional GUI Components
748(30)
JTextArea
749(5)
JCheckBox
754(7)
JRadioButton
761(5)
JComboBox
766(5)
JList
771(7)
Layout Managers
778(6)
FlowLayout
778(4)
BorderLayout
782(2)
Menus
784(2)
Key and Mouse Events
786(11)
Key Events
787(3)
Mouse Events
790(7)
Programming Example: Java Kiosk
797(8)
Quick Review
805(1)
Exercises
806(2)
Programming Exercises
808(5)
Recursion
813(38)
Recursive Definitions
814(3)
Direct and Indirect Recursion
816(1)
Infinite Recursion
816(1)
Problem Solving Using Recursion
817(12)
Recursion or Iteration?
829(1)
Programming Example: Converting a Number from Decimal to Binary
830(4)
Programming Example: Sierpinski Gasket
834(7)
Quick Review
841(1)
Exercises
842(2)
Programming Exercises
844(7)
APPENDIX A Java Reserved Words
851(2)
APPENDIX B Operator Precedence
853(2)
APPENDIX C Character Sets
855(4)
ASCII (American Standard Code for Information Interchange), the first 128 characters of the Unicode character set
855(1)
EBCDIC (Extended Binary Coded Decimal Interchange Code)
856(3)
APPENDIX D Packages and User-Defined Classes
859(12)
PrimitiveType Classes
859(12)
Class: IntClass
860(3)
Class: LongClass
863(1)
Class: CharClass
864(1)
Class: FloatClass
865(1)
Class: DoubleClass
866(1)
Class: BooleanClass
867(1)
Using PrimitiveType Classes in a Program
868(3)
APPENDIX E Java Classes
871(52)
Class: Boolean (Package java.lang)
871(1)
Constructors
871(1)
Methods
871(1)
Class: BorderLayout (Package java.awt)
871(1)
Constructors
871(1)
Methods
872(1)
Class: BufferedReader (Package java.io)
872(1)
Constructors
872(1)
Methods
872(1)
Class: Character (Package java.lang)
873(1)
Constructors
873(1)
Methods
873(1)
Class: Color (Package java.awt)
874(1)
Named Constants
874(1)
Constructors
874(1)
Methods
874(1)
Class: Component (Package java.awt)
875(2)
Constructors
875(1)
Methods
875(2)
Class: Container (Package java.awt)
877(1)
Constructor
877(1)
Methods
877(1)
Class: DecimalFormat (Package java.text)
878(1)
Constructors
878(1)
Methods
878(1)
Class: Double (Package java.lang)
879(1)
Named Constants
879(1)
Constructors
879(1)
Methods
879(1)
Class: Exception (Package java.lang)
880(1)
Constructors
880(1)
Class: FileReader (Package java.io)
880(1)
Constructors
880(1)
Methods
880(1)
Class: FileWriter (Package java.io)
881(1)
Constructors
881(1)
Methods
881(1)
Class: Float (Package java.lang)
881(2)
Named Constants
881(1)
Constructors
881(1)
Methods
882(1)
Class: FlowLayout (Package java.awt)
883(1)
Constructors
883(1)
Methods
883(1)
Class: Font (Package java.awt)
883(1)
Named Constants
883(1)
Constructors
884(1)
Methods
884(1)
Class: Graphics (Package java.awt)
884(4)
Constructors
884(1)
Methods
885(3)
Class: GridLayout (Package java.awt)
888(1)
Constructors
888(1)
Methods
888(1)
Class: InputStreamReader (Package java.io)
888(1)
Constructors
888(1)
Methods
889(1)
Class: Integer (Package java.lang)
889(1)
Named Constants
889(1)
Constructors
889(1)
Methods
889(1)
Class: JApplet (Package javax.swing)
890(1)
Constructors
890(1)
Methods
890(1)
Class: JButton (Package javax.swing)
891(2)
Constructors
891(1)
Methods
892(1)
Class: JCheckBox (Package javax.swing)
893(2)
Constructors
893(1)
Methods
894(1)
Class: JComboBox (Package javax.swing)
895(2)
Constructors
895(1)
Methods
895(2)
Class: JFrame (Package javax.swing)
897(1)
Constructors
897(1)
Methods
897(1)
Class: JLabel (Package javax.swing)
898(2)
Constructors
898(1)
Methods
898(2)
Class: JList (Package javax.swing)
900(1)
Constructors
900(1)
Methods
900(1)
Class: JMenu (Package javax.swing)
901(2)
Constructors
901(2)
Class: JMenuBar (Package javax.swing)
903(1)
Constructor
903(1)
Methods
903(1)
Class: JMenuItem (Package javax.swing)
904(1)
Constructors
904(1)
Methods
904(1)
Class: JRadioButton (Package javax.swing)
904(2)
Constructors
904(1)
Methods
905(1)
Class: JTextArea (Package javax.swing)
906(1)
Constructors
906(1)
Methods
906(1)
Class: JTextField (Package javax.swing)
907(2)
Constructors
907(1)
Methods
908(1)
Class: Long (Package java.lang)
909(1)
Named Constants
909(1)
Constructors
909(1)
Methods
909(1)
Class: Math (Package java.lang)
910(1)
Methods
910(1)
Class: Point (Package java.awt)
911(1)
Variables
911(1)
Constructors
911(1)
Methods
912(1)
Class: PrintWriter (Package java.io)
912(2)
Constructors
912(1)
Methods
912(2)
Class: String (Package java.lang)
914(2)
Constructors
914(1)
Methods
914(2)
Class: StringBuffer (Package java.lang)
916(3)
Constructors
916(1)
Methods
917(2)
Class: StringTokenizer (Package java.util)
919(1)
Constructors
919(1)
Methods
919(1)
Class: Throwable (Package java.lang)
919(1)
Constructors
919(1)
Variables
920(1)
Class: Vector (Package java.util)
920(3)
Variables
920(1)
Constructors
920(1)
Methods
920(3)
APPENDIX F Answers to Selected Exercises
923(12)
Chapter 1
923(1)
Chapter 2
923(1)
Chapter 3
924(1)
Chapter 4
925(1)
Chapter 5
926(1)
Chapter 6
927(1)
Chapter 7
928(1)
Chapter 8
928(1)
Chapter 9
929(1)
Chapter 10
930(1)
Chapter 11
931(1)
Chapter 12
932(1)
Chapter 13
932(1)
Chapter 14
933(2)
Index 935

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program