Table of Contents


   
book cover
  
• Table of Contents
• Index
Java, Java, Java™: Object-Oriented Problem Solving, Third Edition
By Ralph Morelli, Ralph Walde -  Trinity College
Publisher: Prentice Hall
Pub Date: December 22, 2005
Print ISBN-10: 0-13-147434-0
Print ISBN-13: 978-0-13-147434-5
eText ISBN-10: 0-13-185995-1
eText ISBN-13: 978-0-13-185995-1
Pages: 880
 


   Copyright
   Prefacexiii
      What's New in the Third Edition?xiii
      Why Start with Objects?xiv
      Organization of the Textxv
    Chapter 0.  Computers, Objects, and Java1
      Section 0.1.  Welcome2
      Section 0.2.  What Is a Computer?2
      Section 0.3.  Networks, the Internet, and the World Wide Web3
      Section 0.4.  Why Study Programming?6
      Section 0.5.  Programming Languages6
      Section 0.6.  Why Java?8
      Section 0.7.  What Is Object-Oriented Programming?10
      Chapter Summary18
      Exercises20
    Chapter 1.  Java Program Design and Development23
      Section 1.1.  Introduction24
      Section 1.2.  Designing Good Programs24
      Section 1.3.  Designing a Riddle Program26
      Section 1.4.  Java Language Elements33
      Section 1.5.  Editing, Compiling, and Running a Java Program48
      Section 1.6.  From the Java Library: System and PrintStream52
      Chapter Summary54
      Solutions to Self-Study Exercises56
      Exercises57
    Chapter 2.  Objects: Using, Creating, and Defining63
      Section 2.1.  Introduction64
      Section 2.2.  Using String Objects64
      Section 2.3.  Drawing Shapes with a Graphics Object (Optional)68
      Section 2.4.  Class Definition73
      Section 2.5.  Case Study: Simulating a Two-Person Game78
      Section 2.6.  From the Java Library: java.util.Scanner91
      Chapter Summary95
      Solutions to Self-Study Exercises96
      Exercises97
    Chapter 3.  Methods: Communicating with Objects103
      Section 3.1.  Introduction104
      Section 3.2.  Passing Information to an Object104
      Section 3.3.  Constructor Methods111
      Section 3.4.  Retrieving Information from an Object115
      Section 3.5.  Passing a Value and Passing a Reference118
      Section 3.6.  Flow of Control: Control Structures121
      Section 3.7.  Testing an Improved OneRowNim129
      Section 3.8.  From the Java Library: java.lang.Object133
      Section 3.9.  Object-Oriented Design: Inheritance and Polymorphism135
      Section 3.10.  Drawing Lines and Defining Graphical Methods (Optional)136
      Chapter Summary139
      Solutions to Self-Study Exercises140
      Exercises142
    Chapter 4.  Input/Output: Designing the User Interface149
      Section 4.1.  Introduction150
      Section 4.2.  The User Interface150
      Section 4.3.  A Command-Line Interface151
      Section 4.4.  A Graphical User Interface (GUI)159
      Section 4.5.  Case Study: The One-Row Nim Game175
      Section 4.6.  From the Java Library: java.io.File and File Input (Optional)183
      Chapter Summary186
      Solutions to Self-Study Exercises188
      Exercises190
    Chapter 5.  Java Data and Operators195
      Section 5.1.  Introduction196
      Section 5.2.  Boolean Data and Operators197
      Section 5.3.  Numeric Data and Operators204
      Section 5.4.  From the Java Library: java.lang.Math215
      Section 5.5.  Numeric Processing Examples216
      Section 5.6.  From the Java Library: java.text.NumberFormat228
      Section 5.7.  Character Data and Operators230
      Section 5.8.  Example: Character Conversions233
      Section 5.9.  Problem Solving = Representation + Action236
      Chapter Summary236
      Solutions to Self-Study Exercises238
      Exercises242
    Chapter 6.  Control Structures249
      Section 6.1.  Introduction250
      Section 6.2.  Flow of Control: Repetition Structures250
      Section 6.3.  Counting Loops251
      Section 6.4.  Example: Car Loan260
      Section 6.5.  Graphics Example: Drawing a Checkerboard262
      Section 6.6.  Conditional Loops266
      Section 6.7.  Example: Computing Averages272
      Section 6.8.  Example: Data Validation275
      Section 6.9.  Principles of Loop Design277
      Section 6.10.  The switch Multiway Selection Structure278
      Section 6.11.  Object-Oriented Design: Structured Programming282
      Chapter Summary290
      Solutions to Self-Study Exercises291
      Exercises298
    Chapter 7.  Strings and String Processing305
      Section 7.1.  Introduction306
      Section 7.2.  String Basics306
      Section 7.3.  Finding Things within a String313
      Section 7.4.  Example: Keyword Search315
      Section 7.5.  From the Java Library: java.lang.StringBuffer317
      Section 7.6.  Retrieving Parts of Strings320
      Section 7.7.  Example: Processing Names and Passwords322
      Section 7.8.  Processing Each Character in a String323
      Section 7.9.  Comparing Strings326
      Section 7.10.  From the Java Library: java.util.StringTokenizer332
      Section 7.11.  Handling Text in a Graphics Context (Optional)334
      Chapter Summary340
      Solutions to Self-Study Exercises341
      Exercises344
    Chapter 8.  Inheritance and Polymorphism349
      Section 8.1.  Introduction350
      Section 8.2.  Java's Inheritance Mechanism350
      Section 8.3.  Abstract Classes, Interfaces, and Polymorphism359
      Section 8.4.  Example: A Toggle Button365
      Section 8.5.  Example: The Cipher Class Hierarchy368
      Section 8.6.  Case Study: A Two-Player Game Hierarchy375
      Section 8.7.  Principles of Object-Oriented Design396
      Chapter Summary397
      Solutions to Self-Study Exercises398
      Exercises400
    Chapter 9.  Arrays and Array Processing405
      Section 9.1.  Introduction406
      Section 9.2.  One-Dimensional Arrays406
      Section 9.3.  Simple Array Examples413
      Section 9.4.  Example: Counting Frequencies of Letters416
      Section 9.5.  Array Algorithms: Sorting420
      Section 9.6.  Array Algorithms: Searching426
      Section 9.7.  Two-Dimensional Arrays430
      Section 9.8.  Multidimensional Arrays (Optional)437
      Section 9.9.  Object-Oriented Design: Polymorphic Sorting (Optional)439
      Section 9.10.  From the Java Library: java.lang.Vector443
      Section 9.11.  CASE STUDY: An N-Player Computer Game444
      Section 9.12.  A GUI-Based Game (Optional Graphics)452
      Chapter Summary459
      Solutions to Self-Study Exercises460
      Exercises465
    Chapter 10.  Exceptions: When Things Go Wrong471
      Section 10.1.  Introduction472
      Section 10.2.  Handling Exceptional Conditions472
      Section 10.3.  Java's Exception Hierarchy474
      Section 10.4.  Handling Exceptions within a Program478
      Section 10.5.  Error Handling and Robust Program Design488
      Section 10.6.  Creating and Throwing Your Own Exceptions497
      Section 10.7.  From the Java Library: javax.swing.JOptionPane501
      Chapter Summary503
      Solutions to Self-Study Exercises505
      Exercises507
    Chapter 11.  Files and Streams: Input/Output Techniques511
      Section 11.1.  Introduction512
      Section 11.2.  Streams and Files512
      Section 11.3.  Case Study: Reading and Writing Text Files518
      Section 11.4.  The File Class530
      Section 11.5.  Example: Reading and Writing Binary Files533
      Section 11.6.  Object Serialization: Reading and Writing Objects542
      Section 11.7.  From the Java Library: javax.swing.JFileChooser547
      Section 11.8.  Using File Data in Programs548
      Chapter Summary551
      Solutions to Self-Study Exercises552
      Exercises553
    Chapter 12.  Recursive Problem Solving557
      Section 12.1.  Introduction558
      Section 12.2.  Recursive Definition561
      Section 12.3.  Recursive String Methods564
      Section 12.4.  Recursive Array Processing574
      Section 12.5.  Example: Drawing (Recursive) Fractals580
      Section 12.6.  Object-Oriented Design: Tail Recursion584
      Section 12.7.  Object-Oriented Design: Recursion or Iteration?586
      Section 12.8.  From the Java Library: javax.swing.JComboBox588
      Chapter Summary594
      Solutions to Self-Study Exercises595
      Exercises599
    Chapter 13.  Graphical User Interfaces603
      Section 13.1.  Introduction604
      Section 13.2.  Java GUIs: From AWT to Swing604
      Section 13.3.  The Swing Component Set607
      Section 13.4.  Object-Oriented Design: Model-View-Controller Architecture607
      Section 13.5.  The Java Event Model609
      Section 13.6.  Case Study: Designing a Basic GUI614
      Section 13.7.  Containers and Layout Managers627
      Section 13.8.  Checkboxes, Radio Buttons, and Borders633
      Section 13.9.  Menus and Scroll Panes641
      Chapter Summary650
      Solutions to Self-Study Exercises651
      Exercises653
    Chapter 14.  Threads and Concurrent Programming657
      Section 14.1.  Introduction658
      Section 14.2.  What Is a Thread?658
      Section 14.3.  From the Java Library: java.lang.Thread662
      Section 14.4.  Thread States and Life Cycle668
      Section 14.5.  Using Threads to Improve Interface Responsiveness670
      Section 14.6.  Case Study: Cooperating Threads678
      Section 14.7.  Case Study: The Game of Pong693
      Chapter Summary700
      Solutions to Self-Study Exercises702
      Exercises704
    Chapter 15.  Sockets and Networking707
      Section 15.1.  Introduction708
      Section 15.2.  An Overview of Networks708
      Section 15.3.  Using Network Resources from an Applet714
      Section 15.4.  From the Java Library: java.net.URL715
      Section 15.5.  The Slide-Show Applet717
      Section 15.6.  Using Network Resources from an Application722
      Section 15.7.  Client/Server Communication via Sockets732
      Section 15.8.  CASE STUDY: Generic Client/Server Classes736
      Section 15.9.  Playing One-Row Nim Over the Network745
      Section 15.10.  Java Network Security Restrictions752
      Section 15.11.  Java Servlets and Java Server Pages753
      Chapter Summary762
      Solutions to Self-Study Exercises763
      Exercises765
    Chapter 16.  Data Structures: Lists, Stacks, and Queues767
      Section 16.1.  Introduction768
      Section 16.2.  The Linked List Data Structure768
      Section 16.3.  Object-Oriented Design: The List Abstract Data Type (ADT)780
      Section 16.4.  The Stack ADT785
      Section 16.5.  The Queue ADT788
      Section 16.6.  From the Java Library: The Java Collections Framework and Generic Types791
      Section 16.7.  Using the Set and Map Interfaces795
      Section 16.8.  The Binary Search Tree Data Structure799
      Chapter Summary801
      Solutions to Self-Study Exercises803
      Exercises806
    Appendix A.  Coding Conventions811
      Comments811
      Indentation and White Space813
      Naming Conventions813
      Use of Braces814
      File Names and Layout815
      Statements816
      Executable Statements817
      Preconditions and Postconditions818
      Sample Programs818
    Appendix B.  The Java Development Kit819
      The Java Compiler: javac819
      The Java Interpreter: java821
      The appletviewer821
      The Java Archiver jar Tool825
      The Java Documentation Tool: javadoc827
    Appendix C.  The ASCII and Unicode Character Sets828
    Appendix D.  Java Keywords829
    Appendix E.  Operator Precedence Hierarchy830
    Appendix F.  Java Inner Classes832
      What Are Inner Classes?832
      Nested Top-Level Versus Member Classes832
      Local and Anonymous Inner Classes834
    Appendix G.  Java Autoboxing and Enumeration837
      Autoboxing and Unboxing837
      Enumeration838
    Appendix H.  Java and UML Resources841
      Reference Books841
      Online References841
   Index



Java, Java, Java(c) Object-Orienting Problem Solving
Java, Java, Java, Object-Oriented Problem Solving (3rd Edition)
ISBN: 0131474340
EAN: 2147483647
Year: 2005
Pages: 275

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net