Java Programming
Fall 2009
Course number: CSPP51036
Location: Eckhart 202
Time: Mon 5:30-8:20
Professor: Andrew Siegel
Office: Ry175-B
Email:asiegel@cs.uchicago.edu
Office Hours: 3:30-5:30 Mon
TA: Zhao Zhang
Office:
Office Hours: by appt
Recitation: 7-8 Tue; 7:30-8:30 Wed, Ry 277
Email: zhaozhang@uchicago.edu
Grader: Ned Ruggeri
Email: ruggeri@uchicago.edu
Course description: This is a fast-paced first course in Java
for students with some prior programming experience, though not
necessarily in an object-oriented language. A strong emphasis will be
placed on understanding basic fundamentals of OO design --
inheritance, polymorphism, composition, etc, and more generally on
applying sound principles of modern software engineering to real-world
problems. In the latter half of the course more advanced OO design
patterns will be studied in the context of certain Java libraries
(e.g. Swing). However, the main focus will be on using the "core
language" to write good software rather than a detailed study of
particular high-level libraries.
Course Format:
Instructor lecture with significant student participation.
Please come prepared.
The final grade is determined as:
70% bi-weekly assignments
20% Periodic Quizzes
10% participation (either in-class or listhost)
Getting Help: The TA will have a group review session
followed by more informal office hoursy. He will also be available by
appointment. The Instructor will be available both by appointment and
at regular office hours, before class each Tuesday. The course
listhost is the best place to get help quickly. We will monitor it as
frequently as possible and often be able to answer
immediately. Students are encouraged to help their peers on the
listhost by contributing when it is convenient. Please register
here.
Required text
Core Java 2, Volume I: Fundamentals (7th or 8th Edition) by Gary Cornell, Cay S. Horstmann
Recommended Texts (not required)
- Thinking in Java by Bruce Eckel
- The Java Programming Language by Arnold and Gosling
- Java How to Program, Deitel and Deitel
Required Software
- Sun's Java SE 6: available free
here
and already installed on CS Linux cluster.
Note: Java SE is disabled on abyss
- You will probably want to install JDK locally on your own computer if
you prefer to work remotely. Displaying Swing graphics is clumsy across the
network and requires additional emulator software if you're not using X-windows.
- If you choose to use something other than JDK, you are responsible for
exporting the source and verifything that it runs on the local system under JDK.
Important Links:
All course material (updated throughout course)
- All examples by topic
- All Homeworks
- All notes
- All Quizzes
- Mid-term assignment
- Final assignment
Lectures
Week 1 Oct 5: Introduction
Topics
- Overview of Java Language
- First Java Program
- Java native datatypes
- Quick overview of fundmental programming structures
- Development tools
- Some simple programming strategies (needed for homework)
- Strings
- Arrays
- Type conversions (Integer.parseInt, etc.)
- Keyboard Input, file reading, etc.
- Random numbers
- Intro to objects and classes -- some basics
Suggested examples/readings
- Core Java, ch. 1-3
- Online CVS manual
- Ant tutorial
- Eclipse home page
- Common compiler/interpreter
problems
- Sun's New to Java Programming
Center
- Some simple commented examples
- Lecture notes
- In class hacks
Week 2 Oct 12: Object Basics
Topics
- Basic Objects, cont.
- Constructors
- Methods -- static vs. non-static, calling semantics
- Object Composition
- Interfaces
- Packages
Suggested examples/readings
- Lecture notes
- Core Java, ch. 4
- Course examples
- In-class hacks
- Sun's Object Concepts
tutorial
Week 3 Oct 19: Interfaces and abstract classes
Topics
- Rules for interfaces and abstract classes
- Upcasting/downcasting
- Polymorphism
- Techniques for writing general code
- Callbacks
Suggested examples/readings
- Lecture Notes
- In-class hacks
Homework 2
- Writeup
- Useful support classes
- Solution
Week 4 Oct 26: More complex Object relationships
Topics
- Implementation inheritance
- Simple design patterns
- More on abstract classes
- Object composition
Suggested examples/readings
- Lecture notes (continued from Lesson 3)
- In-class hacks
- Core Java ch. 5
Week 5 Nov 2: io, exceptions, other language features
Topics
- Java i/o libraries
- Overriding Object methods
- Serialization
- Exceptions
- Assertions
Week 6 Nov 9: Swing
Topics
- Intro to Swing Java GUI Library
- "for each" loop
- varargs
- autoboxing
- metadata
- Enumerations
- static import
Week 7 Nov 16: Collections
Topics
- Collections Framework: Case-study in an OO library
- Introduction to JNI
Suggested readings:
- Lecture notes
- Class commented examples
- In-class hacks
Week 8 Nov 23: Threads
Topics
- Collections Framework, cont.
- Introduction to JNI
- Java multi-threaded programming
Homework 4 (finalized Monday, Nov. 23)
Week 9 Nov. 30: Inner classes, etc.
Topics
- Intro to socket programming
- Introspection
- Inner classes