Lab 2
The following exercises are to be completed during lab class. If you do
not have time to finish during lab, they must be completed before the beginning
of the following lab session. You will turn in the lab gradesheet
at the beginning of the following lab.
Before beginning the exercises, copy this lab's folder from the T: drive to
your H: drive.
-
Create an Eclipse java project.
Following the instructions from Lab 1, import the file Errors.java
from the Lab_02 folder into your project.
Correct all of the errors (as in pre-lab) so that you can run the program.
-
Complete exercise 1.9 on page 48 of your textbook.
Follow the instructions in your Lab 2 Handout for creating a new Java class.
Name your class HeadNorth. Neatly write the answer to parts b
and c on your grade sheet. For part c, be sure to consult the online
documentation, not the documentation at the end of the text book. Hint: Look in
the class City.
-
Complete exercise 1.10 on page 48 of your textbook. Import the file
FramePlay.java
from the Lab_02 folder. Answer questions
a and
b on your gradesheet.
-
Complete exercise 1.12 on page 49 of your textbook. Name your class
CircleWalls.
Use the windows zip utility to zip all required files into a single zip folder.
Submit the single zip folder to your lab section under project #2 using Web
Submit.
NOTE: Do NOT put your files into a folder to be zipped as this will make grading
more complicated. Simply select the necessary .java files, right click, choose
Send To = > Compressed (zipped) Folder.