Chapter 0 Course Policies¶
- 1. Understanding this Course
- 1.1. Read the Course Syllabus
- 1.2. Who Is This Class For?
- 1.3. Students of Many Experience Levels
- 1.4. Online and Face-to-face Sections
- 1.5. Weekly Schedule
- 1.6. Reading Activities
- 1.7. Labs
- 1.8. Programming Assignments
- 1.9. Late Assignments
- 1.10. Grading
- 1.11. Programming Language and Environment
- 1.12. Cheating and The Honor Code
- 1.13. Self-Check: Confirm Your Understanding
Chapter 1 Getting Started¶
Chapter 2 Inheritance and Polymorphism¶
- 1. Inheritance and Polymorphism: Subclasses and Methods
Chapter 3 Conditional and Repeating Actions¶
- 1. Conditional and Repeating Actions
- 1.1. Selection
- 1.2. Conditions Using Sensor Methods
- 1.3. Java’s Syntax for the If-Then-Else Structure
- 1.4. Syntax Practice 3a: If-Then-Else
- 1.5. Creating Optional Statements With If-then
- 1.6. Java’s Syntax for the If-then Structure
- 1.7. Syntax Practice 3b: If-Then
- 1.8. Java’s Syntax for the Multi-way Selection Structure (a cascaded if)
- 1.9. Syntax Practice 3c: Multi-way If
- 1.10. Compound Conditions
- 1.11. Syntax Practice 3d: Compound Conditions
- 1.12. Repeating Actions
- 1.13. Generic Repetition Structures
- 1.14. Java’s Syntax for the While Loop
- 1.15. Syntax Practice 3e: While Loops
- 1.16. Programming Practice 3
- 1.17. Check Your Understanding
Chapter 4 Software Testing¶
- 1. Software Testing
- 1.1. What Is Software Testing?
- 1.2. Writing Your First Software Test
- 1.3. Check Your Understanding: Software Testing Concepts
- 1.4. More About Methods
- 1.5. Check Your Understanding: Method Signatures
- 1.6. Check Your Understanding: Methods with Parameters
- 1.7. Good Habits for Conditionals
- 1.8. A Different Type of Complex If-Statement
- 1.9. Short Circuit Evaluation
- 1.10. Check Your Understanding: Logical Equivalence
- 1.11. Syntax Practice 4
- 1.12. Programming Practice 4
- 1.13. Module Review
Chapter 5 Variables, Fields, and Parameters¶
- 1. Variables, Fields, and Parameters
- 1.1. Variables
- 1.2. Check Your Understanding: Variables
- 1.3. Fields Versus Local Variables
- 1.4. Changing Private Variables: Mutator Methods
- 1.5. Check your Understanding: Scope
- 1.6. Accessor Methods
- 1.7. Check Your Understanding: Fields, Getters and Setters
- 1.8. The Return Keyword
- 1.9. Check your Understanding: Typed Methods and Return Statements
- 1.10. Using Fields in Testing
- 1.11. Syntax Practice 5
- 1.12. Programming Practice 5
Chapter 6 Pictures and For-each Loops¶
Chapter 7 Aggregation, Strings and More Loops¶
- 1. Aggregation, Strings and More Loops
- 1.1. Object-Oriented Design: Aggregation, Composition, and Delegation
- 1.2. Strings and Characters
- 1.3. Check Your Understanding: Strings
- 1.4. Counter-controlled Loops
- 1.5. Check Your Understanding: Counter Controlled Loops
- 1.6. Tips on Random Numbers
- 1.7. Check Your Understanding: Random Numbers
- 1.8. Method Overriding
- 1.9. Check Your Understanding: Method Overriding
- 1.10. Syntax Practice 7
- 1.11. Programming Practice 7
Chapter 8 Grouping Objects Using Lists and Nested For Loops¶
- 1. Grouping Objects Using Lists and Nested For Loops
- 1.1. Collections of Objects
- 1.2. Interfaces
- 1.3. Check Your Understanding: Interfaces
- 1.4. The List Interface
- 1.5. Generics
- 1.6. ArrayList
- 1.7. Check Your Understanding: ArrayLists
- 1.8. Nested For Loops
- 1.9. Check Your Understanding: Nested For Loops
- 1.10. Syntax Practice 8
- 1.11. Programming Practice 8
- 1.12. Check Your Understanding
Chapter 9 Lists, Loop Idioms, Generics, and the Null Keyword¶
- 1. Lists, Loop Idioms, Generics, and the Null Keyword
- 1.1. Modelling the Contents of a Library
- 1.2. Looping Idioms
- 1.3. Check Your Understanding: Loop Idioms
- 1.4. Generics Revisited
- 1.5. Check Your Understanding: Generics
- 1.6. The Null Keyword
- 1.7. Diagnosing a Null Pointer Exception
- 1.8. Check Your Understanding: Null
- 1.9. Using BlueJ’s Debugger
- 1.10. Using BlueJ’s Code Pad
- 1.11. Syntax Practice 9
- 1.12. Programming Practice 9
Chapter 10 Arrays¶
- 1. Arrays
- 1.1. Creating An Array
- 1.2. Accessing Items in Arrays
- 1.3. Setting Items in an Array
- 1.4. Arrays Compared to Lists (or ArrayList)
- 1.5. Putting It All Together
- 1.6. Check Your Understanding: Arrays
- 1.7. Iterating Over Arrays
- 1.8. Check Your Understanding: Iterating with Arrays
- 1.9. Initializing Array Contents
- 1.10. Printing Arrays
- 1.11. Copying Array Variables
- 1.12. Naming Array Variables
- 1.13. Writing Test Assertions Involving Arrays
- 1.14. Applying Arrays in a Problem
- 1.15. Syntax Practice 10
- 1.16. Programming Practice 10
- 1.17. Check Your Understanding
Chapter 11 Multi-dimensional Arrays¶
- 1. Multi-dimensional Arrays
- 1.1. Dimensions in an Array
- 1.2. Check Your Understanding: 2D Arrays
- 1.3. Syntax Practice: 2D Array Basics
- 1.4. Iterating through a 2D Array
- 1.5. Check Your Understanding: Iterating with 2D Arrays
- 1.6. Syntax Practice: Looping Over 2D Arrays
- 1.7. Multi-Dimensional Arrays
- 1.8. Syntax Practice: 3D Arrays
- 1.9. But Can You Have Multi-dimensional Lists?
- 1.10. Integer Division and Modulus
- 1.11. Check Your Understanding: Modulus
- 1.12. Syntax Practice: Modulus
- 1.13. Programming Practice: Multi-dimensional Arrays
- 1.14. Programming Practice: Mod
Chapter 12 Input, Output and Variable Scoping¶
- 1. Input, Output and Variable Scoping
- 1.1. Variable Scoping
- 1.2. Check Your Understanding: Scope
- 1.3. Syntax Practice: Scoping
- 1.4. Java Input and Output
- 1.5. Output Using PrintWriters
- 1.6. Check Your Understanding: Output
- 1.7. Input Using Scanners
- 1.8. A Complete Input Example
- 1.9. Check Your Understanding: Input
- 1.10. A Complete Input/Output Example
- 1.11. Testing I/O-based Operations
- 1.12. Check Your Understanding: Testing
Chapter 13 Maps and Sets¶
- 1. Maps and Sets
- 1.1. The Map and Set Interfaces
- 1.2. The Map Interface
- 1.3. Syntax Practice: Making Maps
- 1.4. Adding and Accessing Pairs in a Map
- 1.5. Syntax Practice: Adding to Maps
- 1.6. Checking for and Removing Pairs in a Map
- 1.7. A Visual Summary of Using Map and HashMap
- 1.8. Syntax Practice: Map Contains and Remove
- 1.9. Looping Over Map Contents
- 1.10. Check Your Understanding: Maps
- 1.11. The Set Interface
- 1.12. Syntax Practice: Making A Set
- 1.13. Adding Values to a Set
- 1.14. Syntax Practice: Adding to a Set
- 1.15. Checking Values in a Set
- 1.16. Syntax Practice: Set Contains
- 1.17. Removing Values from a Set
- 1.18. Syntax Practice: Set Remove
- 1.19. Looping Over Sets
- 1.20. Check Your Understanding: Sets
- 1.21. Programming Practice: Maps
Chapter 14 Static, Main, and Exceptions¶
- 1. Static, Main, and Exceptions
- 1.1. The Main Method
- 1.2. Check Your Understanding: Main Methods
- 1.3. The Static Keyword
- 1.4. Check Your Understanding: The Static Keyword
- 1.5. Errors
- 1.6. Throwing Exceptions
- 1.7. Check Your Understanding: Throwing Exceptions
- 1.8. Syntax Practice: Throwing Exceptions
- 1.9. Try/Catch Blocks
- 1.10. Check Your Understanding: Try/Catch Blocks
- 1.11. Syntax Practice: Try-Catch Blocks