Introduction to Programming and Computational Problem-Solving

  1. Programs and Values (6 steps, 11 runnable, 8 exercises) — Run your first programs right on the page
    1. Hello, Pict!
    2. Number Definitions
    3. String Definitions
    4. Operators
    5. Non-integer Numbers
    6. Programs and Values in Summary
  2. Data That Travels Together (8 steps, 26 runnable, 13 exercises) — Records: declare the shape of your data
    1. Values that belong to each other
    2. Records and Images
    3. More Composition
    4. Methods for Repeated Computation
    5. More Methods
    6. Convenience Methods
    7. Methods Provided by Java
    8. String Methods
  3. The Main Thing (5 steps, 10 runnable, 5 exercises) — What java does with a file, why main matters, and more ways to run and check programs
    1. The Main Thing
    2. Main and Pict
    3. Into the Void
    4. Just in Case
    5. Checking Assertively
  4. Recipe for Success (4 steps, 14 runnable, 9 exercises) — Going from word problem to code.
    1. Breaking It Down
    2. Pizza
    3. A Helping Hand
    4. Practice
  5. Collecting Values (9 steps, 13 runnable, 16 exercises) — Working with arrays (our first example of a collection)
    1. A List of Names
    2. Arrays and Records
    3. Arrays and Loops
    4. More Arrays and Loops
    5. Arrays and main
    6. Counter as an Index
    7. Arrays of Unusual Size
    8. Making Arrays
    9. Collecting Values in Summary
  6. How Java Runs (8 steps, 17 runnable, 17 exercises) — Looking at the details of how Java runs our programs
    1. When Some Values are More Equal than Others
    2. Checking Contents vs Checking Identity
    3. Methods and Memory
    4. Methods that Update Arrays
    5. Objects, Methods, and Memory
    6. Aliasing
    7. Nuanced and Nested Structures
    8. How Java Runs in Summary
  7. Nested and 2D Structures (6 steps, 12 runnable, 13 exercises) — Arrays of arrays and objects containing arrays of...
    1. Rows of Seats
    2. Sitting with Friends
    3. Rasters
    4. Index Loops with Rasters
    5. Negatives
    6. Nested and 2D Structures in Summary
  8. Classes that Share Behavior (6 steps, 18 runnable, 9 exercises) — Asking questions about data with methods, and what happens when there are too many questions
    1. Searching for Images
    2. Combining Queries
    3. Queries as Data
    4. Growing ImageData
    5. The Pict Library, Revisited
    6. Building Your Own Pict
  9. Appendix: The Pict Library — Pict constructors and methods
  10. Appendix: Working on Your Own Computer — The kit: the Pict library, JUnit, and a Codespace