Chapter 0 Course Policies¶
- -1.1. Understanding this Course
- -1.1.1. Read the Course Syllabus
- -1.1.2. Who Is This Class For?
- -1.1.3. Students of Many Experience Levels
- -1.1.4. Weekly Schedule
- -1.1.5. Reading Activities
- -1.1.6. Labs
- -1.1.7. Programming Assignments
- -1.1.8. Programming Language and Environment
- -1.1.9. Free Passes Instead of Traditional Late Policy
- -1.1.10. Cheating and The Honor Code
- -1.1.11. Self-Check: Confirm Your Understanding
Chapter 1 Getting Started¶
- -1.1. Getting Started
- -1.1.1. Installing BlueJ
- -1.1.2. Introducing LightBot
- -1.1.3. From LightBot to Micro Worlds
- -1.1.4. Self Check: Micro-Worlds
- -1.1.5. A Bit More LightBot
- -1.1.6. Textually Representing Programs
- -1.1.7. Self-Check: Turning Micro-Worlds into Code
- -1.1.8. What Does LightBot Say About Programming?
- -1.1.9. A Programmable LightBot in Java
- -1.1.10. Syntax Practice 1a
- -1.1.11. Creating New Objects
- -1.1.12. Calling Methods on an Object
- -1.1.13. Putting it All Together
- -1.1.14. A Word on Making Code Easy to Read
- -1.1.15. Syntax Practice 1b
- -1.1.16. Programming Practice 1
- -1.1.17. Check Your Understanding
Chapter 2 Inheritance and Polymorphism¶
- -1.1. Inheritance and Polymorphism: Subclasses and Methods
- -1.1.1. The Jeroos of Santong Island
- -1.1.2. Your Opinions on Course Grading Policies
- -1.1.3. Class Hierarchy and Inheritance
- -1.1.4. Summarizing: What is Inheritance?
- -1.1.5. Syntax Practice 2a: Jeroo Methods
- -1.1.6. Problem Solving and Algorithms
- -1.1.7. Creating and Using Jeroo Methods
- -1.1.8. What is Polymorphism?
- -1.1.9. Syntax Practice 2b: Subclass Constructors
- -1.1.10. Syntax Practice 2c: More Subclass Constructors
- -1.1.11. Programming Practice 2
- -1.1.12. Check Your Understanding
Chapter 3 Conditional and Repeating Actions¶
- -1.1. Conditional and Repeating Actions
- -1.1.1. Selection
- -1.1.2. Conditions Using Sensor Methods
- -1.1.3. An Overview of Conditional Statements
- -1.1.4. Java’s Syntax for the If-Then-Else Structure
- -1.1.5. Syntax Practice 3a: If-Then-Else
- -1.1.6. Creating Optional Statements With If-then
- -1.1.7. Java’s Syntax for the If-then Structure
- -1.1.8. Syntax Practice 3b: If-Then
- -1.1.9. Java’s Syntax for the Multi-way Selection Structure (a cascaded if)
- -1.1.10. Syntax Practice 3c: Multi-way If
- -1.1.11. Compound Conditions
- -1.1.12. Syntax Practice 3d: Compound Conditions
- -1.1.13. Your Opinions on Learning and Engagement
- -1.1.14. Repeating Actions
- -1.1.15. Generic Repetition Structures
- -1.1.16. Java’s Syntax for the While Loop
- -1.1.17. Syntax Practice 3e: While Loops
- -1.1.18. Programming Practice 3
- -1.1.19. Check Your Understanding
Chapter 4 Software Testing¶
- -1.1. Software Testing
- -1.1.1. What Is Software Testing?
- -1.1.2. Writing Your First Software Test
- -1.1.3. Check Your Understanding: Software Testing Concepts
- -1.1.4. More About Methods
- -1.1.5. Check Your Understanding: Method Signatures
- -1.1.6. Check Your Understanding: Methods with Parameters
- -1.1.7. Good Habits for Conditionals
- -1.1.8. A Different Type of Complex If-Statement
- -1.1.9. Short Circuit Evaluation
- -1.1.10. Check Your Understanding: Logical Equivalence
- -1.1.11. Syntax Practice 4a: Compound Conditionals
- -1.1.12. Syntax Practice 4b: Conditionals and Relational Operators
- -1.1.13. Programming Practice 4
- -1.1.14. Module Review
Chapter 5 Variables, Fields, and Parameters¶
- -1.1. Variables, Fields, and Parameters
- -1.1.1. Variables
- -1.1.2. Check Your Understanding: Variables
- -1.1.3. Fields Versus Local Variables
- -1.1.4. Changing Private Variables: Mutator Methods
- -1.1.5. Check your Understanding: Scope
- -1.1.6. Accessor Methods
- -1.1.7. Check Your Understanding: Fields, Getters and Setters
- -1.1.8. Syntax Practice 5a: Fields and Accessors
- -1.1.9. The Return Keyword
- -1.1.10. Check your Understanding: Typed Methods and Return Statements
- -1.1.11. Syntax Practice 5b: Mutators and Return Statements
- -1.1.12. Using Fields in Testing
- -1.1.13. Programming Practice 5a
- -1.1.14. Programming Practice 5b
Chapter 6 Pictures and For-each Loops¶
- -1.1. Pictures and For-each Loops
Chapter 7 Aggregation, Strings and More Loops¶
- -1.1. Aggregation, Strings and More Loops
- -1.1.1. Object-Oriented Design: Aggregation, Composition, and Delegation
- -1.1.2. Strings and Characters
- -1.1.3. Check Your Understanding: Strings
- -1.1.4. Counter-controlled Loops
- -1.1.5. Check Your Understanding: Counter Controlled Loops
- -1.1.6. Tips on Random Numbers
- -1.1.7. Check Your Understanding: Random Numbers
- -1.1.8. Method Overriding
- -1.1.9. Check Your Understanding: Method Overriding
- -1.1.10. Syntax Practice 7a: For Loops and OO Design
- -1.1.11. Syntax Practice 7b: toString and Returning Values
- -1.1.12. Programming Practice 7a
- -1.1.13. Programming Practice 7b
Chapter 8 Grouping Objects Using Lists and Nested For Loops¶
- -1.1. Grouping Objects Using Lists and Nested For Loops
- -1.1.1. Collections of Objects
- -1.1.2. Interfaces
- -1.1.3. Check Your Understanding: Interfaces
- -1.1.4. Syntax Practice 8a: Strings
- -1.1.5. The List Interface
- -1.1.6. Generics
- -1.1.7. ArrayList
- -1.1.8. Check Your Understanding: ArrayLists
- -1.1.9. Syntax Practice 8b: Lists
- -1.1.10. Nested For Loops
- -1.1.11. Check Your Understanding: Nested For Loops
- -1.1.12. Syntax Practice 8c: Nested Loops
- -1.1.13. Check Your Understanding
- -1.1.14. Programming Practice 8a
- -1.1.15. Programming Practice 8b
- -1.1.16. Your Opinions on TAs and Office Hours
Chapter 9 Lists, Loop Idioms, Generics, and the Null Keyword¶
- -1.1. Lists, Loop Idioms, Generics, and the Null Keyword
- -1.1.1. Modelling the Contents of a Library
- -1.1.2. Looping Idioms
- -1.1.3. Check Your Understanding: Loop Idioms
- -1.1.4. Syntax Practice 9a: Loop Idioms
- -1.1.5. Generics Revisited
- -1.1.6. Check Your Understanding: Generics
- -1.1.7. Syntax Practice 9b: Generics
- -1.1.8. The Null Keyword
- -1.1.9. Diagnosing a Null Pointer Exception
- -1.1.10. Check Your Understanding: Null
- -1.1.11. Using BlueJ’s Debugger
- -1.1.12. Using BlueJ’s Code Pad
- -1.1.13. Programming Practice 9a: Loop Idioms
- -1.1.14. Programming Practice 9b: Loops and Generics
Chapter 10 Arrays¶
- -1.1. Arrays
- -1.1.1. Creating An Array
- -1.1.2. Accessing Items in Arrays
- -1.1.3. Setting Items in an Array
- -1.1.4. Arrays Compared to Lists (or ArrayList)
- -1.1.5. Putting It All Together
- -1.1.6. Check Your Understanding: Arrays
- -1.1.7. Syntax Practice 10a
- -1.1.8. Iterating Over Arrays
- -1.1.9. Check Your Understanding: Iterating with Arrays
- -1.1.10. Syntax Practice 10b
- -1.1.11. Initializing Array Contents
- -1.1.12. Printing Arrays
- -1.1.13. Copying Array Variables
- -1.1.14. Naming Array Variables
- -1.1.15. Writing Test Assertions Involving Arrays
- -1.1.16. Applying Arrays in a Problem
- -1.1.17. Syntax Practice 10c
- -1.1.18. Check Your Understanding
- -1.1.19. Programming Practice 10a
- -1.1.20. Programming Practice 10b
Chapter 11 Multi-dimensional Arrays¶
- -1.1. Multi-dimensional Arrays
- -1.1.1. Dimensions in an Array
- -1.1.2. Check Your Understanding: 2D Arrays
- -1.1.3. Syntax Practice: 2D Array Basics
- -1.1.4. Iterating through a 2D Array
- -1.1.5. Check Your Understanding: Iterating with 2D Arrays
- -1.1.6. Syntax Practice: Looping Over 2D Arrays
- -1.1.7. Multi-Dimensional Arrays
- -1.1.8. Syntax Practice: 3D Arrays
- -1.1.9. But Can You Have Multi-dimensional Lists?
- -1.1.10. Integer Division and Modulus
- -1.1.11. Check Your Understanding: Modulus
- -1.1.12. Syntax Practice: Modulus
- -1.1.13. Programming Practice: Multi-dimensional Arrays
- -1.1.14. Programming Practice: Mod
Chapter 12 Variable Scoping, Input, and Output¶
- -1.1. Variable Scoping, Input, and Output
- -1.1.1. Variable Scoping
- -1.1.2. Summarizing Scope Concepts
- -1.1.3. Check Your Understanding: Scope
- -1.1.4. Syntax Practice: Scoping
- -1.1.5. Java Input and Output
- -1.1.6. Output Using PrintWriters
- -1.1.7. Check Your Understanding: Output
- -1.1.8. Input Using Scanners
- -1.1.9. A Complete Input Example
- -1.1.10. Check Your Understanding: Input
- -1.1.11. A Complete Input/Output Example
- -1.1.12. Testing I/O-based Operations
- -1.1.13. Check Your Understanding: Testing
Chapter 13 Maps and Sets¶
- -1.1. Maps and Sets
- -1.1.1. The Map and Set Interfaces
- -1.1.2. The Map Interface
- -1.1.3. Syntax Practice: Making Maps
- -1.1.4. Adding and Accessing Pairs in a Map
- -1.1.5. Syntax Practice: Adding to Maps
- -1.1.6. Checking for and Removing Pairs in a Map
- -1.1.7. A Visual Summary of Using Map and HashMap
- -1.1.8. Syntax Practice: Map Contains and Remove
- -1.1.9. Looping Over Map Contents
- -1.1.10. Check Your Understanding: Maps
- -1.1.11. Your Opinions on Course Grading Policies
- -1.1.12. The Set Interface
- -1.1.13. Syntax Practice: Making A Set
- -1.1.14. Adding Values to a Set
- -1.1.15. Syntax Practice: Adding to a Set
- -1.1.16. Checking Values in a Set
- -1.1.17. Syntax Practice: Set Contains
- -1.1.18. Removing Values from a Set
- -1.1.19. Syntax Practice: Set Remove
- -1.1.20. Looping Over Sets
- -1.1.21. Check Your Understanding: Sets
- -1.1.22. Programming Practice: Maps
Chapter 14 Static, Main, and Exceptions¶
- -1.1. Static, Main, and Exceptions
- -1.1.1. The Main Method
- -1.1.2. Check Your Understanding: Main Methods
- -1.1.3. The Static Keyword
- -1.1.4. Check Your Understanding: The Static Keyword
- -1.1.5. Your Opinions on Learning and Engagement
- -1.1.6. Errors
- -1.1.7. Throwing Exceptions
- -1.1.8. Check Your Understanding: Throwing Exceptions
- -1.1.9. Syntax Practice: Throwing Exceptions
- -1.1.10. Try/Catch Blocks
- -1.1.11. Check Your Understanding: Try/Catch Blocks
- -1.1.12. Syntax Practice: Try-Catch Blocks