Java, Java, Java - Object-Oriented Programming

by Ralph Morelli & Ralph Wade

We have designed this third edition of Java, Java, Java to be suitable for a typical Introduction to Computer Science (CS1) course or for a slightly more advanced Java as a Second Language course. This edition retains the “objects first” approach to programming and problem solving that was characteristic of the first two editions. Throughout the text we emphasize careful coverage of Java language features, introductory programming concepts, and object-oriented design principles.

Description from LibreTexts.

Publisher
Trinity College
Subjects
Engineering, Computer Science
Licence
CC BY 4.0, as LibreTexts states it
Who can read
Tweens profiles and older, judged from its title and subjects

Contents

LibreTexts writes equations in TeX, and here they show as TeX; the PDF has them typeset.

  1. Front Matter
  2. TitlePage
  3. InfoPage
  4. Table of Contents
  5. Licensing
  6. 1: Java Program Design and Development
  7. 1.1: Introduction
  8. 1.2: Designing Good Programs
  9. 1.3: Designing a Riddle Program
  10. 1.4: Java Language Elements
  11. 1.5: Editing, Compiling, and Running a Java Program
  12. 1.6: From the Java Library- System and PrintStream
  13. 2: Objects- Defining, Creating, and Using
  14. 2.1: Introduction
  15. 2.2: Using String Objects
  16. 2.3: Drawing Shapes with the Graphics Object (Optional)
  17. 2.4: Class Definition
  18. 2.5: Case Study- Simulating a Two-Person Game
  19. 2.6: From the Java Library- java.util.Scanner
  20. 3: Methods- Communicating with Objects
  21. 3.1: Introduction
  22. 3.2: Passing Information to an Object
  23. 3.3: Constructor Methods
  24. 3.4: Retrieving Information from an Object
  25. 3.5: Passing a Value and Passing a Reference
  26. 3.6: Flow of Control- Control Structures
  27. 3.7: Testing an Improved OneRowNim
  28. 3.8: From the Java Library- java.lang.Object
  29. 3.9: Object-Oriented Design- Inheritance and Polymorphism
  30. 3.10: Drawing Lines and Defining Graphical Methods (Optional)
  31. 4: Input/Output- Designing the User Interface
  32. 4.1: Introduction
  33. 4.2: The User Interface
  34. 4.3: A Command-line Interface
  35. 4.4: A Graphical User Interface (GUI)
  36. 4.5: Case Study- The One Row Nim Game
  37. 4.6: From the Java Library- java.io.File and file input (Optional)
  38. 5: Java Data and Operators
  39. 5.1: Introduction
  40. 5.2: Boolean Data and Operators
  41. 5.3: Numeric Data and Operators
  42. 5.4: From the Java Library java.lang.Math
  43. 5.5: Numeric Processing Examples
  44. 5.6: From the Java Library- java.text.NumberFormat
  45. 5.7: Character Data and Operators
  46. 5.8: Example- Character Conversions
  47. 5.9: Problem Solving = Representation + Action
  48. 6: Control Structures
  49. 6.1: Introduction
  50. 6.2: Flow of Control- Repetition Structures
  51. 6.3: Counting Loops
  52. 6.4: Example- Car Loan
  53. 6.5: Graphics Example- Drawing a Checkerboard
  54. 6.6: Conditional Loops
  55. 6.7: Example- Computing Averages
  56. 6.8: Example- Data Validation
  57. 6.9: Principles of Loop Design
  58. 6.10: The switch Multiway Selection Structure
  59. 6.11: Object-Oriented Design- Structured Programming
  60. 6.12: Special Topic- What Can Be Computed?
  61. 7: Strings and String Processing
  62. 7.1: Introduction
  63. 7.2: String Basics
  64. 7.3: Finding Things Within a String
  65. 7.4: Example- Keyword Search
  66. 7.5: From the Java Library- StringBuffer
  67. 7.6: Retrieving Parts of Strings
  68. 7.7: Example- Processing Names and Passwords
  69. 7.8: Processing Each Character in a String
  70. 7.9: Comparing Strings
  71. 7.10: From the Java Library- StringTokenizer
  72. 7.11: Handling Text in a Graphics Context (Optional)
  73. 8: Inheritance and Polymorphism
  74. 8.1: Introduction
  75. 8.2: Java’s Inheritance Mechanism
  76. 8.3: Abstract Classes, Interfaces, and Polymorphism
  77. 8.4: Example- A Toggle Button
  78. 8.5: Example- The Cipher Class Hierarchy
  79. 8.6: Case Study- A Two Player Game Hierarchy
  80. 8.7: Principles of Object-Oriented Design
  81. 9: Arrays and Array Processing
  82. 9.1: Introduction
  83. 9.2: One-Dimensional Arrays
  84. 9.3: Simple Array Examples
  85. 9.4: Example- Counting Frequencies of Letters
  86. 9.5: Array Algorithms- Sorting
  87. 9.6: Array Algorithms- Searching
  88. 9.7: Two-Dimensional Arrays
  89. 9.8: Multidimensional Arrays (Optional)
  90. 9.9: Object-Oriented Design- Polymorphic Sorting (Optional)
  91. 9.10: From the Java Library- java.util.Vector
  92. 9.11: Case Study- An N-Player Computer Game
  93. 9.12: A GUI-Based Game (Optional Graphics)
  94. 10: Exceptions- When Things Go Wrong
  95. 10.1: Introduction
  96. 10.2: Handling Exceptional Conditions
  97. 10.3: Java’s Exception Hierarchy
  98. 10.4: Handling Exceptions Within a Program
  99. 10.5: Error Handling and Robust Program Design
  100. 10.6: Creating and Throwing Your Own Exceptions
  101. 10.7: From the Java Library- javax.swing.JOptionPane
  102. 11: Files and Streams
  103. 11.1: Introduction
  104. 11.2: Streams and Files
  105. 11.3: Case Study- Reading and Writing Text Files
  106. 11.4: The File Class
  107. 11.5: Example- Reading and Writing Binary Files
  108. 11.6: Object Serialization- Reading and Writing Objects
  109. 11.7: From the Java Library- javax.swing.JFileChooser
  110. 11.8: Using File Data in Programs
  111. 11.9: Special Topic- Databases and Personal Privacy
  112. 12: Recursive Problem Solving
  113. 12.1: Introduction
  114. 12.2: Recursive Definition
  115. 12.3: Recursive String Methods
  116. 12.4: Recursive Array Processing
  117. 12.5: Example- Drawing (Recursive) Fractals
  118. 12.6: Object-Oriented Design- Tail Recursion
  119. 12.7: Object-Oriented Design- Recursion or Iteration?
  120. 12.8: Special Topic- Exploring the Mandelbrot Set
  121. 12.9: From the Java Library- javax.swing.JComboBox
  122. 13: Graphical User Interfaces
  123. 13.1: Introduction
  124. 13.2: Java GUIs- From AWT to Swing
  125. 13.3: The Swing Component Set
  126. 13.4: Object-Oriented Design- Model-View-Controller Architecture
  127. 13.5: The Java Event Model
  128. 13.6: Case Study- Designing a Basic GUI
  129. 13.7: Containers and Layout Managers
  130. 13.8: Checkboxes, Radio Buttons, and Borders
  131. 13.9: Menus and Scroll Panes
  132. 13.10: Special Topic- Are Computers Intelligent?
  133. 14: Threads and Concurrent Programming
  134. 14.1: Introduction
  135. 14.2: What Is a Thread?
  136. 14.3: From the Java Library- java.lang.Thread
  137. 14.4: Thread States and Life Cycle
  138. 14.5: Using Threads to Improve Interface Responsiveness
  139. 14.6: Case Study- Cooperating Threads
  140. 14.7: Case Study- The Game of Pong
  141. 15: Sockets and Networking
  142. 15.1: Introduction
  143. 15.2: An Overview of Networks
  144. 15.3: Using Network Resources from an Applet
  145. 15.4: From the Java Library- java.net.URL
  146. 15.5: The Slide Show Program
  147. 15.6: Using Network Resources from an Application
  148. 15.7: Client/Server Communication via Sockets
  149. 15.8: Case Study- Generic Client/Server Classes
  150. 15.9: Playing One Row Nim Over the Network
  151. 15.10: Java Network Security Restrictions
  152. 15.11: Java Servlets and Server Pages
  153. 16: Data Structures- Lists, Stacks, and Queues
  154. 16.1: Introduction
  155. 16.2: The Linked List Data Structure
  156. 16.3: OBJECT-ORIENTED DESIGN- The List Abstract Data Type (ADT)
  157. 16.4: The Stack ADT
  158. 16.5: The Queue ADT
  159. 16.6: From the Java Library- The Java Collections Framework and Generic Types
  160. 16.7: Using the Set and Map Interfaces
  161. 16.8: The Binary Search Tree Data Structure
  162. 16.9: Chapter Summary
  163. Back Matter
  164. Index
  165. Glossary
  166. Detailed Licensing
  167. Appendix
  168. 17: Appendix
  169. 17.1: Computers, Objects, and Java
  170. 17.1.1: Preface
  171. 17.1.2: Suggested Course Outlines
  172. 18: Temp chapter