
|
The University of Rhode Island - Fall 1996
|
B. Ravikumar
Associate Professor, Computer Science Department
257, Tyler Hall
Phone: 874-2701 Fax: 874-4617 E-mail: ravi@cs.uri.edu
Class Meets:
208, Washburn Hall, T Th 3:30 - 4:45 P.M.
Office Hours:
T W 11 - 12, F 1-2
Teaching Assistant:
Qingli Jiang, Yejing Yang Office: 140 Tyler Hall
TA Office Hours:
Qingli Jiang TBA.
Yejing Yang M 2-3 and W 1:30-2:30
Goals and Outline of the course:
This semester, the course material and format will be radically different
from that of the past. First, the course will deal exclusively with the exciting
new programming language Java and
will present object-oriented programming in Java, as well as advanced topics such as
multithreading, graphical user interface, network communications etc. The following topics will be discussed
in some detail, in addition to the syntax and basics of Java programming.
- Object-oriented Programming: The data is central in this model of programming.
The data is organized in terms of logical units called objects. Objects
of the same type are said to belong to the same class. Each class is defined
by the information structure as well as the operations (methods) that can
be performed on them. (A car can be driven, serviced etc.) Methods allow
objects to interact. Central to OOP are: (a) encapsulation and information
hiding: Data belonging to an object are generally private . They
can only be accessed by methods belonging to the object. This makes updating
a program easy when parts of it are changed. (b) inheritance: It is possible
to generate new classes from old ones and reuse the code developed for
the old class. (c) polymorphism: This refers to the binding of a method
to an object at the runtime, allowing a programmer to write methods for
a hierarchy of objects. Main goals of OOP (that are harder to accomplish using other
programming methodologies) are software reuse, robustness and security.
- Network Programming: Java programs can access information on remote
computers via the Internet. This is one of the main applications of Java.
The platform independent nature of Java makes it robust for Internet applications.
- Graphical Interface: Java offers a rich library (AWT) of graphical functions.
An applet is a Java program included in a Web page. (See for illustration below.)
The simplicity of applet design is amply demonstrated by the number of applets that have been presented
in various Java cites and books. We will discuss how to include
existing applets in your applications as well as how to design new ones. Some standard applications
of graphical interface programming is in forms (questionnaires), games and
animations that allow user interaction. To see Java animation in action, click
here if you are
reading this document on a computer.
- Multithreading: Multitasking is the ability of a system to have more
than one program working at the same time. For example, printing on the
laser writer while simultaneously sending a fax message. Multithreading
extends this idea by taking it one level lower: a single program with the
ability to run multiple computations at the same time. In network programming
and graphics, multiple threads can be very useful. For example, suppose
you want to write a program to display three balls being juggled. Each
ball's movement overlaps with those of others in time. (An applet for juggling balls was actually designed
by a computer science student at the Hebrew University.)
Reading Material
The text-book for the course is Just Java by Peter van der
Linden. The extraordinary Interest in Java has resulted in an avalanche
of information about it in the form of text books, tutorials, multimedia
teaching tools, applets, and even journals and magazines dedicated exclusively
to this language. Our text is the first book in a series of four books
published by Sun Soft Press and Prentice Hall. You can read about this
excellent series of books here.
The cite http://www.javasoft.com
provides a lot of information as well as a gateway to many other sites.
The classical reference on Java is the book Java Programming Language
by Arnold and Gosling. Two excellent on-line books are Special Edition
using Java and Teach
Yourself Java in 21 Days.
A number of books on Java will be available
for short-term borrowing.
Prerequisites
It is assumed that the students enrolled in this course have completed
CSC 212 or an equivalent course. This means that they have about one year
experience in C++. Specifically, familiarity with the following topics
is expected: classes and objects, C or C++ control structures, recursion,
arrays and other simple data structures such as stacks, queues and linked
lists. But no background on Java or the Internet will be assumed.
Work and Grade
The course assignment will involve the following components. (i) Programming
Exercises: These are programming problems which involve writing extensions
to or modifying the programs presented during the lectures. Typical duration
of each assignment will be 2 to 4 weeks. (ii) Short Quiz: There will be a quiz
almost every week (of about 10 minutes duration). (iii) Programming Project:
You are to design and implement one project during the entire semester.
Typical group size for the project is 2 or 3. A list of potential projects
will be given out at the beginning of the semester. Each of you will identify
(mutually agreeable) partners as well as a problem before the end of Spetember.
A typical project will include all the important features
of Java (e.g. multithreading, AWT etc). It may be an extension or modification of an existing
applet. (iv) One mid-semester Test: The test will be open-book/open-notes
and will be of 75 minutes duration. It will take place during the lecture
hour on October 28, 1996. (v) Final Examination: It will take place on
December 16, 1996 from 8 A.M. to 11 A.M. It will be open-book/open-notes
and comprehensive.
Course Topics in Detail
Course Outline |
1 Lecture |
Web and Java (Chapter 1) |
2 Lectures |
Object-Oriented Programming (Chapter 2) |
3 Lectures |
Basics of Java (Chapters 3 and 4) |
10 Lectures |
Graphical Interface in Java (Chapter 8) |
5 Lectures |
Arrays, Pointers and Strings (Chapters 5 and 6) |
6 Lectures |
Multithreads (Chapter 5) |
4 Lectures |
Network Programming (Chapter 7) |
5 Lectures |
Miscellaneous Topics |
(remainder) |
Additional Information
APPLET CONTEST
Entries to the applet contest are the final projects done by students in
groups of size 1 to 4. A list of final projects can be found here. The best two applets will get cash
awards. The result of the contest will be announced soon.