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.

9780132221580

Introduction to Java Programming : Comprehensive Version

by
  • ISBN13:

    9780132221580

  • ISBN10:

    0132221586

  • Edition: 6th
  • Format: Paperback
  • Copyright: 2009-01-01
  • Publisher: Pearson College Div
  • 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: $115.00

Summary

Programming is, above all, problem solving. This book will help students thoroughly understand real-world programming problems - and solve those problems quickly and efficiently, using Java's sophisticated design and coding facilities.

Author Biography

Y. Daniel Liang is currently Yamacraw Professor of Software Engineering at the Department of Computer Science, Armstrong Atlantic State University, Savannah, GA.

Table of Contents

Fundamentals of Programmingp. 1
Introduction to Computers, Programs, and Javap. 3
Introductionp. 4
What Is a Computer?p. 4
Programsp. 7
Operating Systemsp. 10
(Optional) Number Systemsp. 11
Java, the World Wide Web, and Beyondp. 14
The Java Language Specification, API, JDK, and IDEp. 16
A Simple Java Programp. 17
Creating, Compiling, and Executing a Java Programp. 18
Anatomy of a Java Programp. 20
Displaying Text in a Message Dialog Boxp. 22
Primitive Data Types and Operationsp. 27
Introductionp. 28
Writing Simple Programsp. 28
Identifiersp. 30
Variablesp. 31
Assignment Statements and Assignment Expressionsp. 32
Constantsp. 33
Numeric Data Types and Operationsp. 34
Numeric Type Conversionsp. 40
Character Data Type and Operationsp. 41
The String Typep. 44
Getting Input from Input Dialogsp. 45
Case Studiesp. 46
Getting Input from the Consolep. 52
Programming Style and Documentationp. 55
Programming Errorsp. 57
Debuggingp. 58
Selection Statementsp. 67
Introductionp. 68
Boolean Data Type and Operationsp. 68
If Statementsp. 73
Switch Statementsp. 81
Conditional Expressionsp. 83
Formatting Console Output and Stringsp. 84
Operator Precedence and Associativityp. 86
Operand Evaluation Orderp. 87
Loopsp. 95
Introductionp. 96
The while Loopp. 96
The do-while Loopp. 100
The for Loopp. 102
Which Loop to Use?p. 104
Nested Loopsp. 105
Minimizing Numerical Errorsp. 106
Case Studiesp. 108
Keywords break and continuep. 113
Methodsp. 129
Introductionp. 130
Creating a Methodp. 130
Calling a Methodp. 131
Void Method Examplep. 134
Passing Parameters by Valuesp. 135
Overloading Methodsp. 137
Case Study: Computing Taxes with Methodsp. 139
The Scope of Variablesp. 141
The Math Classp. 142
Case Study: Generating Random Charactersp. 145
Method Abstraction and Stepwise Refinementp. 146
(Optional) Packagesp. 154
Arraysp. 169
Introductionp. 170
Array Basicsp. 170
Copying Arraysp. 177
Passing Arrays to Methodsp. 179
Returning an Array from a Methodp. 181
(Optional) Variable-Length Argument Listsp. 185
Searching Arraysp. 186
Sorting Arraysp. 188
The Arrays Classp. 191
Two-Dimensional Arraysp. 193
(Optional) Multidimensional Arraysp. 199
Object-Oriented Programmingp. 211
Objects and Classesp. 213
Introductionp. 214
Defining Classes for Objectsp. 214
Constructorsp. 216
Accessing Objects via Reference Variablesp. 216
Using Classes from the Java Libraryp. 222
Static Variables, Constants, and Methodsp. 224
Visibility Modifiersp. 228
Data Field Encapsulationp. 229
Immutable Objects and Classesp. 232
Passing Objects to Methodsp. 233
The Scope of Variablesp. 235
The this Keywordp. 236
Array of Objectsp. 237
Class Abstraction and Encapsulationp. 239
Case Study: The Loan Classp. 239
Case Study: The Course Classp. 243
(Optional) Case Study: The StackOfIntegers Classp. 245
(Optional GUI) Creating Windowsp. 247
Strings and Text I/Op. 261
Introductionp. 262
The String Classp. 262
The Character Classp. 270
The StringBuilder/StringBuffer Classp. 273
Command-Line Argumentsp. 277
(Optional) Regular Expressionsp. 279
The File Classp. 283
Text I/Op. 286
(Optional GUI) Containers and Layout Managersp. 290
Inheritance and Polymorphismp. 301
Introductionp. 302
Superclasses and Subclassesp. 302
Using the super Keywordp. 307
Overriding Methodsp. 309
Overriding vs. Overloadingp. 310
The Object Class and Its to String() Methodp. 310
Polymorphism, Dynamic Binding, and Generic Programmingp. 311
Casting Objects and the instanceof Operatorp. 313
The ArrayList Classp. 315
A Custom Stack Classp. 319
The protected Data and Methodsp. 320
The final Classes, Methods, and Variablesp. 321
(Optional) Methods in the Object Classp. 322
(Optional) Hiding Data Fields and Static Methodsp. 325
(Optional) Initialization Blocksp. 327
(Optional GUI) Inheriting GUI Componentsp. 330
Abstract Classes and Interfacesp. 341
Introductionp. 342
Abstract Classesp. 342
The Calendar and GregorianCalendar Classesp. 346
Interfacesp. 347
Processing Primitive Data Type Values as Objectsp. 356
Automatic Conversion Between Primitive Types and Wrapper Class Typesp. 362
(Optional GUI) Handling GUI Eventsp. 363
Object-Oriented Designp. 371
Introductionp. 372
The Software Development Processp. 372
Discovering Class Relationshipsp. 373
Case Study: Object-Oriented Designp. 377
Case Study: The Rational Classp. 382
Class Design Guidelinesp. 387
(Optional) Modeling Dynamic Behavior Using Sequence Diagrams and Statechartsp. 390
Framework-Based Programming Using Java APIp. 392
GUI Programmingp. 397
Getting Started with GUI Programmingp. 399
Introductionp. 400
GUI Componentsp. 400
The Java GUI APIp. 401
Framesp. 403
Layout Managersp. 406
The Color Classp. 412
The Font Classp. 413
Using Panels as Subcontainersp. 413
Common Features of Swing GUI Componentsp. 415
Image Iconsp. 418
Graphicsp. 425
Introductionp. 426
Graphical Coordinate Systemsp. 426
The Graphics Classp. 426
The paintComponent Methodp. 429
Drawing Graphics on Panelsp. 430
Drawing Strings, Lines, Rectangles, and Ovalsp. 431
Case Study: The FigurePanel Classp. 432
Drawing Arcsp. 436
The Polygon class and Drawing Polygons and Polylinesp. 438
Centering a Display Using the FontMetrics Classp. 440
Case Study: The MessagePanel Classp. 442
(Optional) Case Study: The StillClock Classp. 447
(Optional) Displaying Imagesp. 451
(Optional) Case Study: The ImageViewer Classp. 452
Event-Driven Programmingp. 463
Introductionp. 464
Event and Event Sourcep. 465
Listeners, Registrations, and Handling Eventsp. 465
Mouse Eventsp. 477
Key Eventsp. 479
(Optional) Animation Using the Timer Classp. 482
Creating User Interfacesp. 491
Introductionp. 492
Buttonsp. 492
Check Boxesp. 498
Radio Buttonsp. 501
Labelsp. 503
Text Fieldsp. 504
Text Areasp. 506
Combo Boxesp. 509
Listsp. 512
Scroll Barsp. 515
Slidersp. 518
Creating Multiple Windowsp. 521
Applets and Multimediap. 535
Introductionp. 536
The Applet Classp. 536
The JApplet Classp. 538
The HTML File and the Tagp. 539
Enabling Applets to Run as Applicationsp. 544
Passing Strings to Appletsp. 546
(Optional) Case Study: TicTacToep. 550
(Optional) Case Study: Bouncing Ballp. 554
(Optional) Locating Resource Using the URL Classp. 557
(Optional) Playing Audiop. 559
(Optional) Case Study: Multimedia Animationsp. 560
(Optional) Packaging and Deploying Java Projectsp. 562
Exception Handling, I/O, and Recursionp. 575
Exceptions and Assertionsp. 577
Introductionp. 578
Exception-Handling Overviewp. 578
Exceptions and Exception Typesp. 580
Understanding Exception Handlingp. 582
The finally Clausep. 589
When to Use Exceptionsp. 590
Rethrowing Exceptionsp. 591
(Optional) Chained Exceptionsp. 591
(Optional) Creating Custom Exception Classesp. 592
(Optional) Assertionsp. 593
Binary I/Op. 605
Introductionp. 606
How is I/O Handled in Java?p. 606
Text I/O vs. Binary I/Op. 606
Binary I/O Classesp. 608
Case Study: Copying Filep. 615
Object I/Op. 617
(Optional) Random Access Filesp. 621
(Optional) Case Study: Address Bookp. 623
Recursionp. 635
Introductionp. 636
Example: Factorialsp. 636
Example: Fibonacci Numbersp. 638
Problem Solving Using Recursionp. 640
Recursive Helper Methodsp. 641
Tower of Hanoip. 643
Fractalsp. 646
Recursion versus Iterationp. 649
Data Structuresp. 657
Lists, Stacks, Queues, Trees, and Heapsp. 659
Introductionp. 660
Listsp. 660
Stacks and Queuesp. 675
Binary Treesp. 677
Heapsp. 683
Priority Queuesp. 688
Genericsp. 693
Introductionp. 694
Motivationsp. 694
Declaring Generic Classes and Interfacesp. 695
Generic Methodsp. 698
Raw Type and Backward Compatibilityp. 699
Wildcardsp. 701
Important Factsp. 703
Avoiding Unsafe Raw Typesp. 703
(Optional) Case Study: Generic Matrix Classp. 705
Java Collections Frameworkp. 713
Introductionp. 714
The Collection Interface and the AbstractCollection Classp. 715
Setsp. 716
The Comparator Interfacep. 721
Listsp. 723
Static Methods for Lists and Collectionsp. 726
The Vector and Stack Classesp. 729
Queues and Priority Queuesp. 731
(Optional) Mapsp. 733
Singleton and Unmodifiable Collections and Mapsp. 737
Algorithm Efficiency and Sortingp. 745
Introductionp. 746
Estimating Algorithm Efficiencyp. 746
Bubble Sortp. 749
Merge Sortp. 751
Quick Sortp. 754
Heap Sortp. 757
External Sortp. 761
Concurrency, Networking, and Internationalizationp. 771
Multithreadingp. 773
Introductionp. 774
Thread Conceptsp. 774
Creating Tasks and Threadsp. 774
The Thread Classp. 777
Example: Flashing Textp. 780
GUI Event Dispatcher Threadp. 781
(Optional) Case Study: Clock with Audiop. 782
Thread Poolsp. 785
Thread Synchronizationp. 787
(Optional) Synchronization Using Locksp. 790
(Optional) Cooperation Among Threadsp. 792
(Optional) Case Study: Producer/Consumerp. 797
(Optional) Blocking Queuesp. 799
(Optional) Semaphoresp. 801
Avoiding Deadlocksp. 803
Thread Statesp. 803
Synchronized Collectionsp. 804
(Optional) JProgressBarp. 805
Networkingp. 815
Introductionp. 816
Client/Server Computingp. 816
The InetAddress Classp. 822
Serving Multiple Clientsp. 823
Applet Clientsp. 826
Sending and Receiving Objectsp. 829
Retrieving Files from Web Serversp. 834
JEditorPanep. 836
(Optional) Case Studies: Distributed TicTacToe Gamesp. 838
(Optional) Datagram Socketp. 850
Internationalizationp. 861
Introductionp. 862
The Locale Classp. 862
Displaying Date and Timep. 864
Formatting Numbersp. 875
(Optional) Resource Bundlesp. 881
(Optional) Character Encodingp. 888
Advanced GUI Programmingp. 895
JavaBeans and Bean Eventsp. 897
Introductionp. 898
JavaBeansp. 898
Bean Propertiesp. 899
Java Event Model Reviewp. 900
Creating Custom Source Componentsp. 902
(Optional) Creating Custom Event Setsp. 906
Containers, Layout Managers, and Bordersp. 917
Introductionp. 918
Swing Container Structuresp. 918
Layout Managersp. 920
Creating Custom Layout Managersp. 938
JScrollPanep. 943
JTabbedPanep. 947
JSplitPanep. 949
Swing Bordersp. 952
(Optional) Pluggable Look-and-Feelp. 960
Menus, Toolbars, Dialogs, and Internal Framesp. 967
Introductionp. 968
Menusp. 968
Popup Menusp. 974
JToolBarp. 976
Processing Actions Using the Action Interfacep. 978
JOptionPane Dialogsp. 982
Creating Custom Dialogsp. 989
JColorChooserp. 992
JFileChooserp. 994
(Optional) Creating Internal Framesp. 999
MVC and Swing Modelsp. 1007
Introductionp. 1008
MVCp. 1008
MVC Variationsp. 1014
Swing Model-View-Controller Architecturep. 1015
JSpinnerp. 1016
Spinner Models and Editorsp. 1018
JListp. 1024
List Modelsp. 1029
List Cell Rendererp. 1032
JComboBoxp. 1035
JTable and JTreep. 1045
Introductionp. 1046
JTablep. 1046
Table Models and Table Column Modelsp. 1051
Case Study: Modifying Rows and Columnsp. 1055
Table Renderers and Editorsp. 1060
Custom Table Renderers and Editorsp. 1062
Table Model Eventsp. 1065
JTreep. 1068
TreeModel and DefaultTreeModelp. 1073
TreeNode, MutableTreeNode, and DefaultMutableTreeNodep. 1074
TreePath and TreeSelectionModelp. 1077
Case Study: Modifying Treesp. 1080
Tree Node Rendering and Editingp. 1084
Tree Eventsp. 1085
Web Programmingp. 1091
Java Database Programmingp. 1093
Introductionp. 1094
Relational Database Systemsp. 1094
SQLp. 1098
JDBCp. 1106
PreparedStatementp. 1113
Retrieving Metadatap. 1116
Advanced Java Database Programmingp. 1125
Introductionp. 1126
A Universal SQL Clientp. 1126
Batch Processingp. 1130
Scrollable and Updateable Result Setp. 1135
RowSet, JdbcRowSet, and CachedRowSetp. 1145
Storing and Retrieving Images in JDBCp. 1150
Servletsp. 1157
Introductionp. 1158
HTML and Common Gateway Interfacep. 1158
Creating and Running Servletsp. 1160
The Servlet APIp. 1164
Creating Servletsp. 1168
HTML Formsp. 1170
Database Programming in Servletsp. 1176
Session Trackingp. 1180
Sending Images from Servletsp. 1195
JavaServer Pagesp. 1209
Introductionp. 1210
A Simple JSP Pagep. 1210
How Is a JSP Page Processed?p. 1211
JSP Scripting Constructsp. 1211
Predefined Variablesp. 1213
JSP Directivesp. 1215
Using JavaBeans in JSPp. 1219
Getting and Setting Propertiesp. 1222
Associating Properties with Input Parametersp. 1223
Forwarding Requests from JavaServer Pagesp. 1232
Case Study: Browsing Database Tablesp. 1232
Remote Method Invocationsp. 1243
Introductionp. 1244
RMI Basicsp. 1244
Developing RMI Applicationsp. 1246
RMI vs. Socket-Level Programmingp. 1252
Developing Three-Tier Applications Using RMIp. 1253
RMI Callbacksp. 1255
p. 1269
Java Keywordsp. 1271
The ASCII Character Setp. 1272
Operator Precedence Chartp. 1274
Java Modifiersp. 1276
Special Floating-Point Valuesp. 1278
Bit Operationsp. 1279
Indexp. 1281
Table of Contents provided by Ingram. All Rights Reserved.

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