Planning a course on Java

Approach

If you've decided to use Java for Students, you have probably also decided to:

The Software Development Environment

You will, of course, have to decide which development environment the students will use. See this page.

Information on the Libraries

The other thing that students need is access to information about the Java libraries - what's available and how to use it. Having access to good clear information can be a problem, we feel. There are the following sources:

The trouble with the JDK, the Sun web site page and a browser is that the information is minimal - sometimes no more than a method signature. Again, the appendices in the book give more information. As an instructor, you may feel the need for comprehensive information. For this purpose we keep copies of the following books to hand. They are thick (two and a half inches or 7cm each) and probably too expensive for students to buy. We have also placed single copies in our library for reference-only by students.

The Java Class Libraries, second edition, volume 1, by Patrick Chan et al, Addison-Wesley, 1998

The Java Class Libraries, second edition, volume 2, by Patrick Chan et al, Addison-Wesley, 1998

The Java Class Libraries, second edition, volume 1, Supplement for the Java 2 Platform by Patrick Chan et al, Addison-Wesley, 1999

We also find that students get confused about what is a Java keyword and what is a library method. To assist, the book index includes all the keywords and all the methods used in the book. There is also an appendix F that lists all the keywords. At the end of each chapter the newly-introduced keywords are listed.

Novices?

The book is aimed at novices, so it spends quite some time on basic control structures and on using methods. For more experienced students, you could romp through the early material quite quickly, while the students would probably enjoy creating GUI's and the associated event handling. We have used the book successfully in this way with students who have previously used Visual Basic.

You might be used to fitting course within a semester structure. Here in England a semester lasts about 12 to 15 weeks, or roughly half the academic year. We think that there's too much in the book for a single semester. There are too many ideas that would need to be understood in a short elapsed time. So we tend to think that there is a course on basic topics for semester 1 (see below), then a course on advanced topics in semester 2 (see below).

Practical work

We believe that practical work is vital in learning programming. To be realistic, there usually isn't enough time for students to attempt more than 2 or 3 exercises each week from the end-of-chapter exercises. Choose the ones that seem most fun! Answers to many of the exercises are on this web site. (This page is under the protection of the instructors password.)

A Course

Reminder: aimed at students new to programming.

Uses approximately one chapter each week.

We feel that this is a fairly demanding schedule. Some topics could be easily omitted if time is short. Candidates include two dimensional arrays and strings. Testing and debugging could be collapsed to a smaller time scale.

 

First Semester

week

topic

book chapter

1

Introduction to Java

A first Java program

1

2

2

Introductory graphics

3

3

Variables and Calculations

4

4

Methods and parameters

5

5

Events

6

6

Decisions - if

7

7

Repetition - while, etc

8

8

Objects and Classes

9

9

The User interface

10, 17

10

Calculations

12

11

Arrays, one dimensional

13

12

Arrays, two dimensional

14

13

Strings

15

14

Testing

23

15

Debugging

24

Calculations

Chapter 12 explains how to do non-trivial calculations in Java.

If your students are information system specialists or are business oriented, time could be spent on looking at financial calculations, as explained in chapter 12.

Alternatively, if your students are mathematical, scientific or engineering, the time could be spent on numerical calculations (also in chapter 12).

Second Semester

Aimed at students who have completed semester1.

Some of these ideas - like polymorphism and abstract classes - are challenging, we think. So the students need some time to understand them.

week

topic

book chapter

1

inheritance

11

2

exceptions

16

3

Free-standing programs

18

4

files

19

5

graphics and sound

20

6

OO design

21

7

Program style

22

8

threads - first part only on independent threads

25 up to page 454

9

packages

26

10

abstract classes

27

11

interfaces

27

12

polymorphism and casting

28

 

Multi-threading

We think multi-threading (chapter 25) is an advanced topic. In the suggested scheme above, only the simplest part of the topic is included. We think it might take 3 or 4 weeks to address the topic fully. Perhaps it is more appropriate for a second-level course.

Network Programming

We think that network programming is fun and trendy. On this web site we have provided material that could be used over 4 weeks to teach this subject. Perhaps this would be part of a second-level course.

AWT or Swing?

Most of the book uses the AWT approach to providing a GUI. We think this is the main way in which people will want to teach and use Java for the foreseeable future. But we have included a chapter on Swing for those who are interested. We see two difficulties in using Swing:

  1. it is slightly more complex to use as a programmer
  2. not all browsers support Swing

Enjoy your teaching