Computer Science II: Object-Oriented Programming
Fall 2021
Administrivia
- Instructor: Phillip Kirlin
- Office hours: Mon 4-5pm, Tue/Thu 9-10:30am, Wed 2-3pm in Briggs 209. Also available by appointment.
- I’m also available to meet over Zoom during office hours, or to chat over Slack.
- Syllabus
- Tutoring hours: Sunday-Thursday 5pm-11pm in Briggs 001.
- My answers to your questions about me from the first day survey.
- Final exam times:
- Saturday, Dec 11, 1-3:30, FJ-B [tentative location]
- Monday, Dec 13, 9-11:30, Spence Wilson Room (in Briggs) [tentative time & place]
- Wednesday, Dec 15, 1-3:30, FJ-B [tentative location]
Resources
- Textbooks and tutorials: Introduction to Java by Liang (textbook), Introduction to Programming in Java by Sedgewick and Wayne (textbook), official Java tutorials, Introduction to Programming Using Java (free online textbook)
- Java in the browser: CodeHS, Repl.it
- Official Java documentation
- Handouts: Java basics, while loops, for loops, functions, OOP definitions, creating classes, strings, ArrayLists, recursion
- APIs: SimpleCanvas API, Color API, String API, ArrayList API
Calendar
- Wed, Aug 25
- Introduction, go over syllabus, introduce Java.
- Slides
- Fri, Aug 27
- Dive into Java.
Printing, variables, user input, math, if/else, loops.
Programs for today.- 12pm code 1pm code
- Reading Liang chapter 2 (basics), chapter 3 (if statements), chapter 5 (loops).
- 12pm code 1pm code
- Mon, Aug 30
- Lab Lab 1
- Reading Liang 7.0-7.8 (arrays).
- Wed, Sept 1
- Lab Review
Review concepts from lab (loops, arrays); functions.
while loop handout, for loop handout, functions handout, functions practice- Slides 12pm code 1pm code
- Reading Liang chapter 6 (functions).
- Project Project 1 (due Wed, Sep 8)
- Slides 12pm code 1pm code
- Fri, Sep 3
- Practice with functions.
Handout with practice problems.- 12pm code 1pm code
- Homework Homework 1 (due Fri, Sep 10)
- 12pm code 1pm code
- Mon, Sep 6
- Labor Day (no class)
- Wed, Sep 8
- Object-Oriented Programming I
Introduction to OOP concepts and terminology.
OOP definitions- 12pm code 1pm code
- Reading S&W 3.1, pp. 329-325 (OO concepts).
- 12pm code 1pm code
- Fri, Sep 10
- Object-Oriented Programming II
Using classes and objects designed by others.
SimpleCanvas and Color APIs- 12pm code 1pm code
- Mon, Sep 13
- Lab Lab 2
- Reading Liang chapter 8 (multidimensional arrays).
- Project Project 2 (due Mon, Sep 27)
- Reading Liang chapter 8 (multidimensional arrays).
- Wed, Sep 15
- Object-Oriented Programming III
OOP “gotchas”, learning about references, and image filter practice.
Gotchas handout- 12pm code 1pm code
- Fri, Sep 17
- Creating Classes I
Learning how to design simple classes.
Class design handout- Slides 12pm code 1pm code
- Reading Liang 9.1-9.3, 9.5 (creating classes).
- Slides 12pm code 1pm code
- Mon, Sep 20
- Lab Lab 3
- Wed, Sep 22
- Lab Review and Project Q&A
Reviewing Lab 3, Q&A for Project 2. - Fri, Sep 24
- Creating Classes II
Public/private, constructors, passing objects as arguments to methods.- Slides 12pm code 1pm code
- Reading Liang 9.4, 9.8 (constructors, public/private).
- Homework Homework 2 (due Fri, Oct 1)
- Slides 12pm code 1pm code
- Mon, Sep 27
- Lab Lab 4
- Wed, Sep 29
- Creating Classes III, OO Design Best Practices
static
, arrays of objects.- 12pm code 1pm code
- Reading Liang 9.7 (static), 9.11 (arrays of objects).
- 12pm code 1pm code
- Fri, Oct 1
- OO Design Practices
Designing aFraction
class.- 12pm code 1pm code
- Mon, Oct 4
- Class canceled
- Wed, Oct 6
- Review for midterm
- 12pm code 1pm code
- Fri, Oct 8
- Midterm I
- Mon, Oct 11
- Lab Lab 6
- Wed, Oct 13
- ArrayLists, Strings, and File Reading
String handout, ArrayList handout, Practice problems- 12pm code 1pm code
- Fri, Oct 15
- ArrayLists, Strings, and File Reading
Continue practice from Wednesday.- 12pm code 1pm code
- Reading Liang 11.11 (ArrayLists), 4.4 and 10.10 (strings).
- 12pm code 1pm code
- Mon, Oct 18
- Fall break (no class)
- Wed, Oct 20
- Recursion I
Recursion handout- Slides 12pm code 1pm code
- Reading Liang 18.1-18.2 (recursion intro).
- Slides 12pm code 1pm code
- Fri, Oct 22
- Recursion II
- 12pm code 1pm code
- Reading Liang 18.3 (recursion continued). Pay special attention to Figures 18.2 and 18.3 on page 722; these are important to understand.
- 12pm code 1pm code
- Mon, Oct 25
- Lab Lab 7
- Wed, Oct 27
- Recursion III
Recursive functions with arrays
Recursion with arrays handout- Slides 12pm code 1pm code
- Fri, Oct 29
- Recursion IV
Binary search
Binary search handout- Slides 12pm code 1pm code
- Project Project 3 (due Wed, Nov 10)
- Slides 12pm code 1pm code
- Mon, Nov 1
- Lab Lab 8
- Wed, Nov 3
- Inheritance I
Inheritance handout- Slides 12pm code 1pm code
- Reading Liang 11.1-11.2 (inheritance).
- Homework Homework 3 (due Mon, Nov 8)
- Slides 12pm code 1pm code
- Fri, Nov 5
- Inheritance II
Inheritance handout #2- Slides 12pm code 1pm code
- Reading Liang 11.3-11.5 (inheritance continued).
- Slides 12pm code 1pm code
- Mon, Nov 8
- Lab Lab 9
- Wed, Nov 10
- Polymorphism I
12pm code 1pm code- Reading Liang 11.7-11.9 (polymorphism).
- Fri, Nov 12
- Polymorphism II and abstract classes
12pm code 1pm code
Band in a Box: 12pm code 1pm code- Reading Liang 13.1-13.2 (abstract classes).
- Mon, Nov 15
- Review for midterm
- Wed, Nov 17
- Midterm II
- Fri, Nov 19
- Interfaces
12pm code 1pm code- Reading Liang 11.5-11.6 (interfaces).
- Mon, Nov 22
- Lab Lab 10
- Mon, Nov 29
- Lab Lab 11
- Wed, Dec 1
- Big Oh
How computer scientists measure how fast algorithms run.
Big Oh handout - Fri, Dec 3
- Big Oh II
Big Oh problems - Mon, Dec 6
- Lab Lab 12
Lab diagram handout