Phu Xuan University Library
Think Java - How to Think Like a Computer Scientist

External

Think Java - How to Think Like a Computer Scientist

Think Java is an introduction to computer science and programming intended for readers with little or no experience. We start with the most basic concepts and are careful to define all terms when they are first used. The book presents each new idea in a logical progression. Larger topics, like recursion and object-oriented programming, are divided into smaller examples and introduced over the course of several chapters.

Author
Allen B. Downey
Publisher
lin College
Source
LibreTexts
License
CC BY-NC-SA
Language
EN
Category
Information Technology
Contents· 186 sections
  1. 01: Objects
  2. 1.01: Point Objects
  3. 1.02: Attributes
  4. 1.03: Objects as Parameters
  5. 1.04: Objects as Return Types
  6. 1.05: Mutable Objects
  7. 1.06: Aliasing
  8. 1.07: The null Keyword
  9. 1.08: Garbage Collection
  10. 1.09: Class Diagrams
  11. 1.10: Java Library Source
  12. 1.11: Vocabulary
  13. 1.12: Exercises
  14. 02: Classes
  15. 2.01: The Time Class
  16. 2.02: Constructors
  17. 2.03: More Constructors
  18. 2.04: Getters and Setters
  19. 2.05: Displaying Objects
  20. 2.06: The toString Method
  21. 2.07: The equals Method
  22. 2.08: Adding Times
  23. 2.09: Pure Methods and Modifiers
  24. 2.10: Vocabulary
  25. 2.11: Exercises
  26. 03: Arrays of Objects
  27. 3.01: Card Objects
  28. 3.02: Card toString
  29. 3.03: Class Variables
  30. 3.04: The compareTo Method
  31. 3.05: Cards are Immutable
  32. 3.06: Arrays of Cards
  33. 3.07: Sequential Search
  34. 3.08: Binary Search
  35. 3.09: Tracing the Code
  36. 3.10: Recursive Version
  37. 3.11: Vocabulary
  38. 3.12: Exercises
  39. 04: Objects of Arrays
  40. 4.01: The Deck Class
  41. 4.02: Shuffling Decks
  42. 4.03: Selection Sort
  43. 4.04: Merge Sort
  44. 4.05: Subdecks
  45. 4.06: Merging Decks
  46. 4.07: Adding Recursion
  47. 4.08: Vocabulary
  48. 4.09: Exercises
  49. 05: Objects of Objects
  50. 5.01: Decks and Hands
  51. 5.02: CardCollection
  52. 5.03: Inheritance
  53. 5.04: Dealing Cards
  54. 5.05: The Player Class
  55. 5.06: The Eights Class
  56. 5.07: Class Relationships
  57. 5.08: Vocabulary
  58. 5.09: Exercises
  59. 06: Appendix A - Development Tools
  60. 6.01: Installing DrJava
  61. 6.02: DrJava Interactions
  62. 6.03: Command-line Interface
  63. 6.04: Command-line Testing
  64. 6.05: Running Checkstyle
  65. 6.06: Tracing With a Debugger
  66. 6.07: Testing with JUnit
  67. 6.08: Vocabulary
  68. 07: Appendix B - Java 2D Graphics
  69. 7.01: Creating Graphics
  70. 7.02: Graphics Methods
  71. 7.03: Example Drawing
  72. 7.04: Vocabulary
  73. 7.05: Exercises
  74. 08: Appendix C - Debugging
  75. 8.01: Compile-time Errors
  76. 8.02: Run-time Errors
  77. 8.03: Logic Errors
  78. 09: The Way of the Program
  79. 9.01: What Is Programming
  80. 9.02: What Is Computer Science
  81. 9.03: Programming Languages
  82. 9.04: The Hello World Program
  83. 9.05: Displaying Strings
  84. 9.06: Escape Sequences
  85. 9.07: Formatting Code
  86. 9.08: Debugging Code
  87. 9.09: Vocabulary
  88. 9.10: Exercises
  89. 10: Variables and Operators
  90. 10.01: Declaring Variables
  91. 10.02: Assignment
  92. 10.03: State Diagrams
  93. 10.04: Printing Variables
  94. 10.05: Arithmetic Operators
  95. 10.06: Floating-Point Numbers
  96. 10.07: Rounding Errors
  97. 10.08: Operators for Strings
  98. 10.09: Composition
  99. 10.10: Types of Errors
  100. 10.11: Vocabulary
  101. 10.12: Exercises
  102. 11: Input and Output
  103. 11.01: The System Class
  104. 11.02: The Scanner Class
  105. 11.03: Program Structure
  106. 11.04: Inches to Centimeters
  107. 11.05: Literals and Constants
  108. 11.06: Formatting Output
  109. 11.07: Centimeters to Inches
  110. 11.08: Modulus Operator
  111. 11.09: Putting It All Together
  112. 11.10: The Scanner Bug
  113. 11.11: Vocabulary
  114. 11.12: Exercises
  115. 12: Void Methods
  116. 12.01: Math Methods
  117. 12.02: Composition Revisited
  118. 12.03: Adding New Methods
  119. 12.04: Flow of Execution
  120. 12.05: Parameters and Arguments
  121. 12.06: Multiple Parameters
  122. 12.07: Stack Diagrams
  123. 12.08: Reading Documentation
  124. 12.09: Writing Documentation
  125. 12.10: Vocabulary
  126. 12.11: Exercises
  127. 13: Conditionals and Logic
  128. 13.01: Relational Operators
  129. 13.02: Logical Operators
  130. 13.03: Conditional Statements
  131. 13.04: Chaining and Nesting
  132. 13.05: Flag Variables
  133. 13.06: The Return Statement
  134. 13.07: Validating Input
  135. 13.08: Recursive Methods
  136. 13.09: Recursive Stack Diagrams
  137. 13.10: Binary Numbers
  138. 13.11: Vocabulary
  139. 13.12: Exercises
  140. 14: Value Methods
  141. 14.01: Return Values
  142. 14.02: Writing Methods
  143. 14.03: Method Composition
  144. 14.04: Overloading
  145. 14.05: Boolean Methods
  146. 14.06: Javadoc Tags
  147. 14.07: More Recursion
  148. 14.08: Leap of Faith
  149. 14.09: One More Example
  150. 14.10: Vocabulary
  151. 14.11: Exercises
  152. 15: Loops
  153. 15.01: The while Statement
  154. 15.02: Generating Tables
  155. 15.03: Encapsulation and Generalization
  156. 15.04: More Generalization
  157. 15.05: The for Statement
  158. 15.06: The do-while Loop
  159. 15.07: Break and Continue
  160. 15.08: Vocabulary
  161. 15.09: Exercises
  162. 16: Arrays
  163. 16.01: Creating Arrays
  164. 16.02: Accessing Elements
  165. 16.03: Displaying Arrays
  166. 16.04: Copying Arrays
  167. 16.05: Array Length
  168. 16.06: Array Traversal
  169. 16.07: Random Numbers
  170. 16.08: Traverse and Count
  171. 16.09: Building a Histogram
  172. 16.10: The Enhanced for Loop
  173. 16.11: Vocabulary
  174. 16.12: Exercises
  175. 17: Strings and Things
  176. 17.01: Characters
  177. 17.02: Strings Are Immutable
  178. 17.03: String Traversal
  179. 17.04: Substrings
  180. 17.05: The indexOf Method
  181. 17.06: String Comparison
  182. 17.07: String Formatting
  183. 17.08: Wrapper Classes
  184. 17.09: Command-line Arguments
  185. 17.10: Vocabulary
  186. 17.11: Exercises