York University
Department of Computer Science and Engineering

CSE 1020: Introduction to Computer Science I

Fall 2007

Midterm Labtest
7:00 p.m. Thursday, October 18, 2007


Welcome To The Labtest Environment!

During the test, you will not be able to access your regular home directory, access electronic mail, send or receive email, print, or access the Internet.

At the end of your test session, this machine will be converted back to a standard, unrestricted Prism Lab machine. At this time, any files written by you during the test except those that have been submitted will not be recoverable.  Make sure you submit your code prior to the end of the test (instructions to submit your code are provided below).  If you do not submit your work on time, you will receive a grade of zero (there will be no exceptions).

Important:  When you submit a file, you must include, at the top of the file, your name (first, last) and your Prism lab login.
These should be placed in a comment, so the file will compile. Files that do not compile will receive a large penalty when marked, no matter how small the error that prevented compiling.


The Questions

Here are two simple questions. Answer them both.
Question1
Question2

Useful APIs

Here are the common APIs that you may access:

Java 1.5 API
Type API

Submitting Your Work

The program you write for question 1 should be called Q1.java. The program you write for question 2 should be called Q2.java. Submit both Q1.java and Q2.java before the time deadline.
Here is the command to submit your work (further details regarding the submit command can also be obtained by typing man submit
Once again, you are encouraged to submit regularly. Newer submissions overwrite older ones.

submit 1020 midtermW5 Q1.java Q2.java