Java Programming
Fall 2007
Course number: CSPP51036
Location: Reyerson 277
Time: Mon 5:30-8:30
Professor: Andrew Siegel
Office: Ry175-B
Email:asiegel@cs.uchicago.edu
Office Hours: 3:30-5:30 Tue
TA:
Office:
Office Hours:
Email:
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 at
cspp51036@cs.uchicago.edu
Required text
Core Java 2, Volume I: Fundamentals (7th or 8th Edition) by Gary Cornell, Cay S. Horstmann
Recommended Texts
- 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 SDK version 1.5: available free
here
and already installed on CS Linux cluster.
Note: SDK 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 Homeworks
- All hacks
- All notes
- All Quizzes
- Mid-term assignment
- Final assignment
- All Examples by topic
Lectures
Week 1 Sept 24: 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
- Good to start browsing
API now.
- Sun's New to Java Programming
Center
- Some simple commented examples
- Lecture notes
- In class hacks
Week 2 Oct 1: Object Basics (Prof. Shacklette, guest Lecturer)
Topics
- Basic Objects, cont.
- Constructors
- Methods -- static vs. non-static, calling semantics
- Object Composition
- Interfaces
- Packages
Suggested examples/readings
- Shacklette's lecture notes
- Core Java, ch. 4
- Course examples
- In-class hacks
- Sun's Object Concepts
tutorial
Week 3 Oct 8: Interfaces and abstract classes
Topics
- Rules for interfaces and abstract classes
- Upcasting/downcasting
- Polymorphism
- Techniques for writing general code
- Callbacks
- Quiz
Suggested examples/readings
- Lecture Notes
- In-class hacks
Homework 2
- Writeup
- Useful support classes
- Solution
Week 4 Oct 15: More complex Object relationships
Topics
- Implementation inheritance
- Simple design patterns
- More on abstract classes
- Object composition
- Inner classes (moved to week 6)
Suggested examples/readings
- Lecture notes (continued from Lesson 3)
- In-class hacks
- Core Java ch. 5
Week 5 Oct 22: io, exceptions, other language features
Topics
- Java i/o libraries
- Overriding Object methods
- Serialization
- Exceptions
- Assertions
Week 6 Oct 29: Swing
Topics
- Intro to Swing Java GUI Library
- "for each" loop
- varargs
- autoboxing
- metadata
- Enumerations
- static import
Week 7 Nov 5: Collections, etc.
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 12:
Topics
- Collections Framework, cont.
- Introduction to JNI
- Intro to socket programming
- Inner classes
Week 9 Nov 19: Introspection, Intro to Threads
Topics
- What are Threads?
- Spawing Java threads
- Thread synchronization
- Thread communication
- Java Reflection API
Final Homework
- Writeup
- Useful support classes
Week 10 Nov 26: Testing
Topics
- Threads, cont.
- More design patterns
- JUnit
-
Week 10 Dec 6: Makeup class