This assignment has 3 parts but the third part is optional.
In this assignment you will write an applet to test the time resolution of
the Java virtual machine.
Note that we are using Java 1.1 and you may not use
any deprecated methods.
Turn in a copy of the source code for all parts of the assignment by the
due date.
Put a copy of the class file where it can be accessed from your course web page and put a link to it in your course web page. The link should be labeled Assignment 2, Part 1. Make sure you set the permissions so that anyone can access it from a browser.
Part 2:
Copy ShowTime1.java to ShowTime2.java and modify it
as follows. The number to be entered should be an integer.
The integer represents the number of iterations in a loop.
If the value is n, then a push of the Start button causes
n+1 calls
to System.currentTimeMillis() to be put in consecutive
entries in an array. The applet will then display various statistics
about the n differences of consecutive values stored in the array.
Instead of displaying one hundred times the number,
display the following information on separate lines in the following order.
Note that there will be two lines which show the number entered. One is updated when the number is entered and the other is updated when the button is pushed.
The following parts of the assignment are optional:
Part 3 (optional):
This part is for those with Java experience.
Copy ShowTime2.java to ShowTime3.java and modify it as
follows.
Make the output look as neat as possible in a table with the numbers
right-justified.
All floating point values should be displayed with two places after the
decimal point. Each time the button is pushed the information should
be updated without any flickering of the display and without any residue
from the previous display, even if the window size is increased.
Here is where you can show off your skills. The best ones will be
demonstrated in class.
Again, put this on the web with a link called Assignment 2, Part 3.