Copyright © 1997-1999 by Axel T. Schreiner. All Rights Reserved.

Programming with Java 2

Axel-Tobias Schreiner, Department of Mathematics and Computer Science, University of Osnabrück, Germany.

An introduction to programming with the Java 2 programming language.

Lecture notes for a course in the summer semester 1999.

From here one can reach copies of the overheads used in class, the Java-2 documentation from Sun, and the programming examples used in class. The text does not constitute a complete transcript of the lectures. Additionally one should consult books about Java, object oriented programming, network programming, and about the World Wide Web.
A CD with this material is available from the author.
Um deutsche Seiten zu sehen, muß als Sprachpräferenz de eingestellt werden.

Directories

aufgaben There will be some programming assignments each week, possibly followed by a final exam...
code The programming examples are collected in directories that more or less correspond to the chapters of the lecture notes.
ftp Archived copies of the programming examples, the documentation, and the overheads as well as development kits, browsers, and related tools are available only from within the university of Osnabrück's local network using the file transfer protocol.
    A good starting point to look for Java tools on the Web are the Java Solutions and the Java Products & APIs at Sun Microsystems as well as Jeff Poskanzer's Home-Page.
html Here are the overheads used in class and the Java documentation and the examples from Sun's JDK (1.2.1).
pdf PStill was used to convert and index the overheads from the html area using the Portable Document Format. This is primarily suitable for printouts and (under Windows) for text searches.
    Depending on the computing platform you need special viewers or plugins which have to be installed beforehand.Viewers for Windows and Linux are available in the ftp area.

Local Availability of Java

Uwe Hein gave the following information concerning Java installations in the department's local area network:
Location/System Platform Java Version
Room 31/339 Intel/Linux 1.1.7
ramses Sparc/Solaris 5.6 1.2.1
zeus
buddha Intel/Solaris 5.6
dosuni
sol
/usr/local/java/bin is added to the search path, if ~/.profile calls up Java. The relevant commands are java and javac on all platforms.

Timetable 1999

Lectures Tuesday, 10:15 31/449a Schreiner
Thursday, 10:15
Discussion Groups Monday, 10:15 31/449a Kühl
Monday, 12:15
Office Hours Thursday after 15:00 b.a. 31/321 Schreiner
Tuesday 14-16 or b.a. 31/318a Kühl

Calendar 1999

April 13 Introduction, organisation of the web server, literature, design considerations, the first program, programs/hello/
15 The first application, apps/hello/, packages, import, AWT classes and threads, inner classes, delegate pattern
20 The first applet, applets/hello/, HTML, applet-tag, Java Plugin, HTMLConverter, javadoc, integer values, Ranges.java
22 Integer values, Ranges.java, Try.java, Cvt.java, integer types, integer operations, string concatenation, wrapper classes
27 Integer values, Cvt.java, control structures, floating point values, IEE-754, Ranges.java, Qgl.java, not a number, conditions, Cvt.java, identity
29 security concepts, signed applet, authentication, keytool, policytool; conditions, Cvt.java, identity vs. equivalence, characters and strings, Unicode
May 4 String functions, input and output, counting characters, package, command line processing, clone()
6 counting characters, vectors, deep copy, clone(), counting bytes, Bc
11 counting characters, Uc, interface, system properties, Prop, inner classes, Hi, counting characters with streams
13 holiday
18 counting characters with streams, command line, inner classes, derived streams, statically nested classes, arithmetic expressions, recursive descent
20 recursive descent, objects as method pointers, closure, StringReader, framework for command line processing
25 holiday
27 holiday
June 1 Main framework: interface vs. adapter class, Cat with adapter class, Wc with interface, Ls, File
3 Ls, File, design problems in listFiles(), Collection framework: features and representations
8 Collection Framework: methods; sorting: List; word frequency: Map
10 Collection Framework: word frequency, threads, parallel access
15 FreqP: various techniques for synchronisation; threads: features, race conditions, monitors and critical regions
17 threads: conditional critical regions, consumer/producer problems, semaphores, dining philosophers, pipelines, Grep, GrepAll; AWT: concepts, relation to Swing
22 AWT: class hierarchy, object hierarchy, events and listeners, the role of views, Button
24 tracing events, newInstance(), java.lang.reflect, Canvas
29 new implementation of event tracing, Checkbox, Choice, List, Dialog, modal loop, FileDialog, Image
July 1 Image, Label, Color, Menu, PopupMenu
6 Scrollbar, ScrollPane, TextArea, Font, examples as applets: communication design
8 examples as applets: implementation, event management principles: model/view/controller, delegation, ActionReader
13 event management principles: interfaces vs. inner classes, application framework; layout: CardLayout, GridBagConstraints, GridBagLayout
15 JDK version problems: focus owner, caret position vs. text selection, background color; binding properties; layout: GridBagConstraints, GridBagLayout
20 Swing: concepts, first application, JButton, trace, ButtonModel, problems
22 trace implementation, menues, buttons and groups, JComboBox