prevnext

Mini Assignment 1 

Timely Class

Instructions to Students

  1. Weighting for this Assignment: 5% of Continuous Assessment

  2. This assignment should be done by each individual student.

  3.  Plagiarism will be treated seriously.  All assignments that have been found
    involved wholly or partly in plagiarism (no matter these assignments are from the original authors or from the plagiarists) will score Zero mark. You will be asked a random question on your program to verify that your submission is your own work.

  4. You are required to hand in the program listing with a diskette containing your source file.

Overview

The purpose of this mini assignment is to learn how to write a Java class from a specification, and see how the finished class can be used in two different applications.

Pre-lab

  1. Review your course notes and read chapter 4 in Wu.
  2. Read about class stubs by clicking here.

Objectives

  1. Learn what a class stub is and how to use it to develop a Java class.
  2. Write a complete Java class.
  3. Develop some basic testing and debugging skills.
  4. See how a single Java class can be used in a variety of applications.
  5. Learn different ways to represent time.
  6. Further your understanding of Java expressions and operators.

Activities

  1. Write a class stub for the TimeCounter class.
  2. Write the TimeCounter class using the TimeConvertor application.
  3. Compile and run the Stopwatch application.

prevnext