Java Programming
Fall 2011
Course number: CSPP51036
Location: Ryerson 276
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: Ali Alkhafaji
Recitation times: Every Wed and Fri, 6:30-7:30
Recitation location: Ry 277 (regular classroom)
Additional office hours: by appt
Email: ali.a.alkhafaji@gmail.com
Grader: Keven Wang
Email: kdwang@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, Volume I: Fundamentals, 8th Edition,by Gary Cornell, Cay S. Horstmann
ISBN: 978-0132354769
Recommended Texts (not required)
- Just Java by Peter Van Der Linden
- Thinking in Java by Bruce Eckel
- The Java Programming Language by Arnold and Gosling
- Java How to Program, Deitel and Deitel
Required Software
- Oracle'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.
Useful Links
All course material (updated throughout course)
- All examples by topic
- All Homeworks
- All Notes by subject
- All Quizzes
- Mid-term assignment
- Final assignment
Lectures
Week 1 Sept. 26: Introduction
Topics
- Overview of Java Language
- First Java Program
- Java native datatypes
- Quick overview of fundmental programming structures
- Some simple programming strategies (needed for homework)
- Strings
- Arrays
- Type conversions (Integer.parseInt, etc.)
- Scanner for 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
- Oracle's New to Java Programming
Center
- Some simple commented examples
- Lecture notes
- In class hacks
Week 2 Oct 3: Object Basics
Topics
- Basic Objects, cont.
- Constructors
- Methods -- static vs. non-static, calling semantics
- Object Composition
- Concepts of data hiding, accessor and mutator methods, etc.
- Rules of method overriding
- Rules of method overloading
- Concepts of unit testing
- Packages
- Introduction to Polymorphism
- mechanics of interfaces
- upcasting/downcasting for objects
- instanceof operator and runtime binding
- static vs. runtime typing
- Proper use of abstraction in software design
Suggested examples/readings
- Lecture notes: See ClassBasics.ppt and beginning of Polymorphism.ppt
under Notes link
- Core Java, ch. 4, ch. 5 pp 172-191
- Course examples
- In-class hacks
Week 3 Oct 10: Interfaces and abstract classes
Topics
- Continuation of interface discussion
- More techniques: callbacks, "function pointers" design of abstract code
- Introduction of abstract classes
- Implementation vs. interface inheritance
- Practical examples
Suggested examples/readings
- Lecture notes: See Polymorphism.ppt under Notes link
- In-class hacks
Homework 2
- Writeup
- Useful support classes
- Solution
Week 4 Oct 17: More complex Object relationships
Topics
- Quiz 1 (very short): Focus on interfaces, sub/super-typing.
- Implementation inheritance
- Abstract classes
- Some basic design patterns
- Object composition
Suggested examples/readings
- Lecture notes (continued from Lesson 3)
- In-class hacks
- Discussion of access privileges: public, private, , protected
- Core Java ch. 5
Week 5 Oct. 24: Object methods & exceptions
Topics
- Overriding Object methods
- Exceptions
Week 6 Oct. 31: Inner Clases, Swing
Topics
- Rules for use of inner classes
- Intro to Swing
Week 7 Nov 7: Collections
Topics
- Collections Framework
Week 8 Nov 14: Threads
Topics
- Collections Framework, cont. (see week 7 link for notes/examples/hacks)
examples)
- Misc Language Features (enumerations, varargs, for-each, etc.) (see MiscLang.ppt in notes)
- A little deeper into generics
- Java I/O libary (see IO.ppt in notes)
Week 9 Nov. 21: Inner classes, etc.
Topics
- Intro to socket programming
- Introspection
Week 10 Nov. 28
Topics
- More on threads
- Intro to socket programming
- Java Native Interface
- Inner classes
Finals Week Dec. 5