Home : Course Map : Tips
Course Guide
Course Map
     About JavaTech
     Codes List
     Topic Index
     Course Guide
     What's New

The Course Map shows that the website offers a tremendous amount of material that is probably too large to cover in a single term course. Students enrolled in the A1418(undergraduate) or 5A5448 (graduate) classes at KTH come with diverse backgrounds that range from little or no previous programming experience to those with extensive training in C/C++ or other languages.

Course Tailoring

At a minimum, all students in these two courses should obtain the skills to do basic level programming in Java for technical and scientific tasks. However, students should work with the teacher to tailor the selection of topics and materials they will study so as to best apply their time.

Student who need an introduction to programming in general should focus on the Java track in Part I: Chapters 1-12. If time permits, they should study the basics of Java networking techniques in Part II: Chapters 13-14.

Students with prior programming experience will more quickly traverse the Part I materials and so can delve more deeply into the Java networking topics presented in Part II: Chapters 12-15. Some students will want to study the more sophisticated networking topics discussed in Chapters 16-21 and to learn techniques discussed in Part III: Chapters 22-24 that extend Java to work with other languages and to access platform and hardware capabilities.

Course Project Option

Students have the option of developing a course programming project instead of simply performing the exercises at the end of each chapter. The student's program should illustrated an understanding of the Java programming techniques discussed in Part I. So the progam should, for example, use a graphical interface, employ threads, execute input/output operations to read and save disk data, etc.

The exercises in the chapters are meant to illustrate the techniques discussed and to

KTH Course Requirements

The table below shows the list of essential topics that a student in the A1418/5A5448 classes should understand by the end of the course. The student can demonstrate this by

  • Completion of the 12 Tech Task assignments. (The student is also encouraged to do some or all of the exercises given at the end of each chapter.)

  • Or a term project that uses the techniques covered by the Tech Tasks.

In addition, there will be a final exam that reviews the topics listed here. Sample questions for the final exam are available here.

Topics & Tasks Relevant Chapters
  • Setup the SDK.
  • Basics of creating an applet and an application.
  • Relevance of Java for technical progrmming.

Essential syntax of a Java program. This includes

  • Class definition with methods and variables.
  • Declaring variables.
  • Using strings.
  • Loops (for, do-while, etc.)
  • if-else
  • Casting variable of one type into that of another type.
  • Primitive types
  • Essentials of floating-point in Java, e.g. relative precision of float vs double.

Tech Task 1:

  • Using the Math class to carry out a computation and print out the result..
2, 3

Classes and objects:

  • Instantiation
  • Constructors
  • Overloading of methods
  • Passing arguments by value vs reference
  • Arrays
  • Primitive type wrapper classes
  • Handling exceptions (i.e. the try-catch format)
  • static variables and methods

Tech Task 2:

  • Do one of the root finding exercises in the Physics track or create a Java program to execute some other mathematical algorithm.

Class inheritance

  • Overriding methods
  • Abstract class
  • Interface
  • Casting a reference variable to that of a subclass or superclass type.
  • this, super vs. this(), super()

Tech Task 3:

  • Create a program that uses the random number generators in Java.
  • Packages and import
  • Defining constants
  • Access modifiers
Tech Task 4:
  • Use System.out.printf() to format the numerical output in one or more of the previous tech programs.

Basics of creating a graphical user interface:

  • Swing vs. basic AWT
  • Using JPanel and JButton
  • Using simple layouts: FlowLayout, BorderLayout, GridLayout
  • Simple techniques of drawing on a panel.
  • Event handling for a button
  • Familiarity with other components such as check boxes and radio boxes.
  • Create a user interface with two or more panels, each holding components.

Tech Task 5:

  • Add a GUI to one of your previous programs or create a new program that carries out a technical task of some sort. The program should use input value(s) entered by the user via the GUI.
6, 7
  • Threading in Java
  • Thread subclass
  • Runnable interface.
  • Animation

Tech Task 6:

  • Create a program to display a simple animation of a technical process of some sort.
  • Write text to a file and read it back.
  • Write binary data to a file and read it back.

Tech Task 7:

  • Use the Histogram class from the course, or one of its subclasses, in a program.
  • ArrayList
  • String Builder
  • split() method in String
  • Arrays class
  • Enumerated type.

Tech Task 8:

  • Read in a file with a mix of text and numbers, carry out an operation with the numbers, and write the results to a new file.
  • Loading and drawing images
  • Handling colors

Tech Task 9:

  • Create a program to read in and filter an image, e.g. remove all but one color band, and display the before and after images.
  • Or create an animated image with a mathematical technique such as fractal generation.
  • Cursor icons
  • Timing and performance

Tech Task 10:

  • Enhance one of your previous programs with two or more techniques from Chapter 12 such as changing the cursor according to what graphical interface component it is above.
  • Basics of networking.
    • TCP/IP
    • Ports
    • Client/Server architectures

Tech Task 11:

  • From an application, read a data file via a URL entered by the user, calculate something from the data , and display the result.
  • ServerSocket and Socket classes
  • Threads to handle clients

Tech Task 12:

  • Create a simple server with Java that, when contacted by a client (e.g. a web browser or your own custom Java client), runs an algorithm of some sort and sends a result back to the client in HTML format.
14, 15



Most recent update: May 9, 2006

  Part I Part II Part III
Java Core 1  2  3  4  5  6  7  8  9  10  11  12 13 14 15 16 17
18 19 20
22 23 24

1  2  3  4  5  6  7  8  9  10  11  12

Tech 1  2  3  4  5  6  7  8  9  10  11  12
Physics 1  2  3  4  5  6  7  8  9  10  11  12

Java is a trademark of Sun Microsystems, Inc.