
A Comprehensive Introduction to Object-Oriented Programming with Java
by C. Thomas WuISBN-10: 0073523399
ISBN-13: 9780073523392
Pub. Date: 01/01/2007
Publisher: McGraw-Hill Companies, The
An Introduction to Object-Oriented Programming with Java provides an accessible and technically thorough introduction to the basics of programming using java. The text takes a truly object-oriented approach. Objects are used early so that students think in objects right from the beginning.
Overview
An Introduction to Object-Oriented Programming with Java provides an accessible and technically thorough introduction to the basics of programming using java. The text takes a truly object-oriented approach. Objects are used early so that students think in objects right from the beginning.
Product Details
- ISBN-13:
- 9780073523392
- Publisher:
- McGraw-Hill Companies, The
- Publication date:
- 01/01/2007
- Pages:
- 1189
Table of Contents
Preface xiii
Key Differences from the Standard Edition xiii
Book Organization xiv
Hallmark Features of the Text xviii
Introduction to Computers and Programming Languages 1
A History of Computers 2
Computer Architecture 4
Programming Languages 11
Java 12
Introduction to Object-Oriented Programming and Software Development 15
Classes and Objects 16
Messages and Methods 18
Class and Instance Data Values 20
Inheritance 23
Software Engineering and Software Life Cycle 24
Getting Started with Java 29
The First Java Program 30
Program Components 39
Edit-Compile-Run Cycle 49
Sample Java Standard Classes 52
Sample Development 67
Numerical Data 81
Variables 82
Arithmetic Expressions 90
Constants 95
Displaying Numerical Values 97
Getting Numerical Input 103
The Math Class 109
Random Number Generation 113
The GregorianCalendar Class 115
Sample Development 120
Numerical Representation (Optional) 131
Defining Your Own Classes-Part 1 145
First Example: Defining and Using a Class 146
Second Example: Defining and Using Multiple Classes 156
Matching Arguments and Parameters 160
Passing Objects to a Method 162
Constructors 167
Information Hiding and Visibility Modifiers 172
Class Constants 175
Local Variables 183
Calling Methods of the Same Class 185
Changing Any Class to a Main Class 189
Sample Development 190
Selection Statements 213
The if Statement 214
Nested if Statements 225
Boolean Expressions and Variables 231
Comparing Objects 239
The switch Statement 244
Drawing Graphics 248
Enumerated Constants 258
Sample Development 264
Repetition Statements 295
The while Statement 296
Pitfalls in Writing Repetition Statements 305
The do-while Statement 311
Loop-and-a-Half Repetition Control 315
The for Statement 319
Nested for Statements 324
Formatting Output 326
Loan Tables 331
Estimating the Execution Time 334
Recursive Methods (Optional) 338
Sample Development 343
Defining Your Own Classes-Part 2 365
Returning an Object from a Method 366
The Reserved Word this 370
Overloaded Methods and Constructors 378
Class Variables and Methods 383
Call-by-Value Parameter Passing 387
Organizing Classes into a Package 394
Using Javadoc Comments for Class Documentation 395
The Complete Fraction Class 400
Sample Development 410
Exceptions and Assertions 437
Catching Exceptions 438
Throwing Exceptions and Multiple catch Blocks 445
Propagating Exceptions 450
Types of Exceptions 458
Programmer-Defined Exceptions 461
Assertions 463
Sample Development 469
Characters and Strings 487
Characters 488
Strings 491
Pattern Matching and Regular Expression 502
The Pattern and Matcher Classes 509
Comparing Strings 513
StringBuffer and StringBuilder 515
Sample Development 521
Arrays and Collections 543
Array Basics 544
Arrays of Objects 555
The For-Each Loop 565
Passing Arrays to Methods 569
Two-Dimensional Arrays 576
Lists and Maps 583
Sample Development 596
Sorting and Searching 619
Searching 620
Sorting 624
Heapsort 632
Sample Development 645
File Input and Output 669
File and JFileChooser Objects 670
Low-Level File I/O 679
High-Level File I/O 684
Object I/O 693
Sample Development 700
Inheritance and Polymorphism 713
A Simple Example 714
Defining Classes with Inheritance 717
Using Classes Effectively with Polymorphism 721
Inheritance and Member Accessibility 724
Inheritance and Constructors 729
Abstract Superclasses and Abstract Methods 733
Inheritance versus Interface 738
Sample Development 739
GUI and Event-Driven Programming 765
Simple GUI I/O with JOptionPane 768
Customizing Frame Windows 771
GUI Programming Basics 777
Text-Related GUI Components 787
Layout Managers 798
Effective Use of Nested Panels 808
Other GUI Components 817
Menus 835
Handling Mouse Events 839
Recursive Algorithms 859
Basic Elements of Recursion 860
Directory Listing 861
Anagram 863
Towers of Hanoi 866
Quicksort 868
When Not to Use Recursion 873
Memory Allocation Schemes and Linked Data Structures 879
Contiguous Memory Allocation Scheme 881
Noncontiguous Memory Allocation Scheme 886
Manipulating Linked Lists 890
Linked Lists of Objects 903
Sample Development 908
Generics and Type Safety 945
Generic Classes 946
Generics and Collections 961
Generics, Inheritance, and Java Interface 969
Additional Topics and Pitfalls 974
List ADT 981
The List ADT 982
The List Interface 988
The Array Implementation of the List ADT 992
The Linked-List Implementation of the List ADT 1001
The Linked Implementation with the Head Node 1018
The Iterator Design Pattern 1022
Sample Development 1027
Stack ADT 1035
The Stack ADT 1036
The Stack Interface 1040
The Array Implementation 1042
The Linked-List Implementation 1047
Implementation Using NPSList 1052
Sample Applications: Matching HTML Tags 1053
Sample Applications: Solving a Maze with Backtracking 1060
Queue ADT 1069
The Queue ADT 1070
The Queue Interface 1073
The Array Implementation 1075
The Linked-List Implementation 1082
Implementation Using NPSList 1088
Priority Queue 1089
Appendix A 1099
Appendix B 1107
Appendix C 1133
Appendix D 1155
Index 1163
Customer Reviews
Average Review: