Chapter 0 modules¶
- 0.1. Debugging In Eclipse
- 0.2. Writing JUnit Tests
- 0.3. Abstract Data Types
- 0.4. Mathematical Proof Techniques
- 0.5. Binary Trees
- 0.6. Collision Resolution
- 0.7. Skip Lists
- 0.8. Derivations and Parse Trees
- 0.9. Parser Generators
- 0.10. Using Parser Generators to Interpret a Language
- 0.11. Semantics of the Lambda Calculus
- 0.12. Regular Expressions
- 0.13. Closure Properties of Regular Grammars
- 0.14. Identifying Non-regular Languages
- 0.15. Properties
- 0.16. Models of Computation
- 0.17. Turing Machines
- 0.18. Understanding this Course
- 0.18.1. Read the Course Syllabus
- 0.18.2. Who Is This Class For?
- 0.18.3. Students of Many Experience Levels
- 0.18.4. Online and Face-to-face Sections
- 0.18.5. Weekly Schedule
- 0.18.6. Reading Activities
- 0.18.7. Labs
- 0.18.8. Programming Assignments
- 0.18.9. Programming Language and Environment
- 0.18.10. Cheating and The Honor Code
- 0.18.11. Self-Check: Confirm Your Understanding
- 0.19. Getting Started
- 0.19.1. Installing BlueJ
- 0.19.2. Introducing LightBot
- 0.19.3. From LightBot to Micro Worlds
- 0.19.4. Self Check: Micro-Worlds
- 0.19.5. A Bit More LightBot
- 0.19.6. Textually Representing Programs
- 0.19.7. Self-Check: Turning Micro-Worlds into Code
- 0.19.8. What Does LightBot Say About Programming?
- 0.19.9. A Programmable LightBot in Java
- 0.19.10. Syntax Practice 1a
- 0.19.11. Creating New Objects
- 0.19.12. Calling Methods on an Object
- 0.19.13. Putting it All Together
- 0.19.14. A Word on Making Code Easy to Read
- 0.19.15. Syntax Practice 1b
- 0.19.16. Programming Practice 1
- 0.19.17. Check Your Understanding
- 0.20. Inheritance and Polymorphism: Subclasses and Methods
- 0.20.1. The Jeroos of Santong Island
- 0.20.2. Class Hierarchy and Inheritance
- 0.20.3. Summarizing: What is Inheritance?
- 0.20.4. Syntax Practice 2a: Jeroo Methods
- 0.20.5. Problem Solving and Algorithms
- 0.20.6. Creating and Using Jeroo Methods
- 0.20.7. What is Polymorphism?
- 0.20.8. Syntax Practice 2b: Subclass Constructors
- 0.20.9. Syntax Practice 2c: More Subclass Constructors
- 0.20.10. Programming Practice 2
- 0.20.11. Check Your Understanding
- 0.21. Conditional and Repeating Actions
- 0.21.1. Selection
- 0.21.2. Conditions Using Sensor Methods
- 0.21.3. An Overview of Conditional Statements
- 0.21.4. Java’s Syntax for the If-Then-Else Structure
- 0.21.5. Syntax Practice 3a: If-Then-Else
- 0.21.6. Creating Optional Statements With If-then
- 0.21.7. Java’s Syntax for the If-then Structure
- 0.21.8. Syntax Practice 3b: If-Then
- 0.21.9. Java’s Syntax for the Multi-way Selection Structure (a cascaded if)
- 0.21.10. Syntax Practice 3c: Multi-way If
- 0.21.11. Compound Conditions
- 0.21.12. Syntax Practice 3d: Compound Conditions
- 0.21.13. Repeating Actions
- 0.21.14. Generic Repetition Structures
- 0.21.15. Java’s Syntax for the While Loop
- 0.21.16. Syntax Practice 3e: While Loops
- 0.21.17. Programming Practice 3
- 0.21.18. Check Your Understanding
- 0.22. Software Testing
- 0.22.1. What Is Software Testing?
- 0.22.2. Writing Your First Software Test
- 0.22.3. Check Your Understanding: Software Testing Concepts
- 0.22.4. More About Methods
- 0.22.5. Check Your Understanding: Method Signatures
- 0.22.6. Check Your Understanding: Methods with Parameters
- 0.22.7. Good Habits for Conditionals
- 0.22.8. A Different Type of Complex If-Statement
- 0.22.9. Short Circuit Evaluation
- 0.22.10. Check Your Understanding: Logical Equivalence
- 0.22.11. Syntax Practice 4a: Compound Conditionals
- 0.22.12. Syntax Practice 4b: Conditionals and Relational Operators
- 0.22.13. Programming Practice 4
- 0.22.14. Module Review
- 0.23. Variables, Fields, and Parameters
- 0.23.1. Variables
- 0.23.2. Check Your Understanding: Variables
- 0.23.3. Fields Versus Local Variables
- 0.23.4. Changing Private Variables: Mutator Methods
- 0.23.5. Check your Understanding: Scope
- 0.23.6. Accessor Methods
- 0.23.7. Check Your Understanding: Fields, Getters and Setters
- 0.23.8. Syntax Practice 5a: Fields and Accessors
- 0.23.9. The Return Keyword
- 0.23.10. Check your Understanding: Typed Methods and Return Statements
- 0.23.11. Syntax Practice 5b: Mutators and Return Statements
- 0.23.12. Using Fields in Testing
- 0.23.13. Programming Practice 5a
- 0.23.14. Programming Practice 5b
- 0.24. Pictures and For-each Loops
- 0.25. Aggregation, Strings and More Loops
- 0.25.1. Object-Oriented Design: Aggregation, Composition, and Delegation
- 0.25.2. Strings and Characters
- 0.25.3. Check Your Understanding: Strings
- 0.25.4. Counter-controlled Loops
- 0.25.5. Check Your Understanding: Counter Controlled Loops
- 0.25.6. Tips on Random Numbers
- 0.25.7. Check Your Understanding: Random Numbers
- 0.25.8. Method Overriding
- 0.25.9. Check Your Understanding: Method Overriding
- 0.25.10. Syntax Practice 7a: For Loops and OO Design
- 0.25.11. Syntax Practice 7b: toString and Returning Values
- 0.25.12. Programming Practice 7a
- 0.25.13. Programming Practice 7b
- 0.26. Grouping Objects Using Lists and Nested For Loops
- 0.26.1. Collections of Objects
- 0.26.2. Interfaces
- 0.26.3. Check Your Understanding: Interfaces
- 0.26.4. Syntax Practice 8a: Strings
- 0.26.5. The List Interface
- 0.26.6. Generics
- 0.26.7. ArrayList
- 0.26.8. Check Your Understanding: ArrayLists
- 0.26.9. Syntax Practice 8b: Lists
- 0.26.10. Nested For Loops
- 0.26.11. Check Your Understanding: Nested For Loops
- 0.26.12. Syntax Practice 8c: Nested Loops
- 0.26.13. Check Your Understanding
- 0.26.14. Programming Practice 8a
- 0.26.15. Programming Practice 8b
- 0.27. Lists, Loop Idioms, Generics, and the Null Keyword
- 0.27.1. Modelling the Contents of a Library
- 0.27.2. Looping Idioms
- 0.27.3. Check Your Understanding: Loop Idioms
- 0.27.4. Syntax Practice 9a: Loop Idioms
- 0.27.5. Your Opinions on Motivation and Engagement
- 0.27.6. Generics Revisited
- 0.27.7. Check Your Understanding: Generics
- 0.27.8. Syntax Practice 9b: Generics
- 0.27.9. The Null Keyword
- 0.27.10. Diagnosing a Null Pointer Exception
- 0.27.11. Check Your Understanding: Null
- 0.27.12. Using BlueJ’s Debugger
- 0.27.13. Using BlueJ’s Code Pad
- 0.27.14. Programming Practice 9a: Loop Idioms
- 0.27.15. Programming Practice 9b: Loops and Generics
- 0.28. Arrays
- 0.28.1. Creating An Array
- 0.28.2. Accessing Items in Arrays
- 0.28.3. Setting Items in an Array
- 0.28.4. Arrays Compared to Lists (or ArrayList)
- 0.28.5. Putting It All Together
- 0.28.6. Check Your Understanding: Arrays
- 0.28.7. Syntax Practice 10a
- 0.28.8. Iterating Over Arrays
- 0.28.9. Check Your Understanding: Iterating with Arrays
- 0.28.10. Syntax Practice 10b
- 0.28.11. Initializing Array Contents
- 0.28.12. Printing Arrays
- 0.28.13. Copying Array Variables
- 0.28.14. Naming Array Variables
- 0.28.15. Writing Test Assertions Involving Arrays
- 0.28.16. Applying Arrays in a Problem
- 0.28.17. Syntax Practice 10c
- 0.28.18. Check Your Understanding
- 0.28.19. Programming Practice 10a
- 0.28.20. Programming Practice 10b
- 0.29. Multi-dimensional Arrays
- 0.29.1. Dimensions in an Array
- 0.29.2. Check Your Understanding: 2D Arrays
- 0.29.3. Syntax Practice: 2D Array Basics
- 0.29.4. Iterating through a 2D Array
- 0.29.5. Check Your Understanding: Iterating with 2D Arrays
- 0.29.6. Syntax Practice: Looping Over 2D Arrays
- 0.29.7. Multi-Dimensional Arrays
- 0.29.8. Syntax Practice: 3D Arrays
- 0.29.9. But Can You Have Multi-dimensional Lists?
- 0.29.10. Integer Division and Modulus
- 0.29.11. Check Your Understanding: Modulus
- 0.29.12. Syntax Practice: Modulus
- 0.29.13. Programming Practice: Multi-dimensional Arrays
- 0.29.14. Programming Practice: Mod
- 0.30. Variable Scoping, Input, and Output
- 0.30.1. Variable Scoping
- 0.30.2. Summarizing Scope Concepts
- 0.30.3. Check Your Understanding: Scope
- 0.30.4. Syntax Practice: Scoping
- 0.30.5. Java Input and Output
- 0.30.6. Output Using PrintWriters
- 0.30.7. Check Your Understanding: Output
- 0.30.8. Input Using Scanners
- 0.30.9. A Complete Input Example
- 0.30.10. Check Your Understanding: Input
- 0.30.11. A Complete Input/Output Example
- 0.30.12. Testing I/O-based Operations
- 0.30.13. Check Your Understanding: Testing
- 0.31. Maps and Sets
- 0.31.1. The Map and Set Interfaces
- 0.31.2. The Map Interface
- 0.31.3. Syntax Practice: Making Maps
- 0.31.4. Adding and Accessing Pairs in a Map
- 0.31.5. Syntax Practice: Adding to Maps
- 0.31.6. Checking for and Removing Pairs in a Map
- 0.31.7. A Visual Summary of Using Map and HashMap
- 0.31.8. Syntax Practice: Map Contains and Remove
- 0.31.9. Looping Over Map Contents
- 0.31.10. Check Your Understanding: Maps
- 0.31.11. The Set Interface
- 0.31.12. Syntax Practice: Making A Set
- 0.31.13. Adding Values to a Set
- 0.31.14. Syntax Practice: Adding to a Set
- 0.31.15. Checking Values in a Set
- 0.31.16. Syntax Practice: Set Contains
- 0.31.17. Removing Values from a Set
- 0.31.18. Syntax Practice: Set Remove
- 0.31.19. Looping Over Sets
- 0.31.20. Check Your Understanding: Sets
- 0.31.21. Programming Practice: Maps
- 0.32. Static, Main, and Exceptions
- 0.32.1. The Main Method
- 0.32.2. Check Your Understanding: Main Methods
- 0.32.3. The Static Keyword
- 0.32.4. Check Your Understanding: The Static Keyword
- 0.32.5. Your Opinions on Motivation and Engagement
- 0.32.6. Errors
- 0.32.7. Throwing Exceptions
- 0.32.8. Check Your Understanding: Throwing Exceptions
- 0.32.9. Syntax Practice: Throwing Exceptions
- 0.32.10. Try/Catch Blocks
- 0.32.11. Check Your Understanding: Try/Catch Blocks
- 0.32.12. Syntax Practice: Try-Catch Blocks