Java程序辅导

C C++ Java Python Processing编程在线培训 程序编写 软件开发 视频讲解

客服在线QQ:2653320439 微信:ittutor Email:itutor@qq.com
wx: cjtutor
QQ: 2653320439
Java Lab 8: Racecar – Part 2                                         Friday, June 25, 2004 
Read instructions carefully! Following instructions is part of the grade for this lab.  
 
This lab is due at 4pm today, at which point solutions will be posted at a location to be 
announced to the class. Having the lab due at 4 pm implies that you should save all your 
files and leave your machine by 4 pm. Failure to turn in the lab promptly at 5 pm will be 
penalized by taking off 1 point.  
 
Make sure you read through the entire lab before attempting any of the parts to manage 
your time appropriately. For this lab, we will also be grading the neatness of and 
comments in your code. Please look over the solutions that we give you for guidelines on 
how to present your code. 1 point will be taken off for code that is not neat or has no 
comments. 
 
0. Create a new folder named lab9 in the folder C:\java\lastName (where lastName is the 
variable that stores your last name). This is the folder to which you will be saving all the 
files required for this lab. 
 
1. (2 points) Create a new package called race in the lab9 folder that you just created. 
Move Racecar.java into the package folder and add a package statement to 
Racecar to declare it a member of that package. Compile and run. 
 
2. (2 points) Create a new package called easyreader. Copy EasyReader.java 
into the package folder and add a package statement to EasyReader to declare it a 
member of that package. Compile. 
 
3. (1 points) Add an import statement to Racecar that imports the EasyReader class. 
Compile Racecar. 
 
4. (5 points) The file EasyReader.html file in the easyreader folder is the API 
for the EasyReader class. Take at a look at it. Referencing the API as needed, change 
the main method in Racecar to make a more interactive racing game. If you want, you 
could allow users to choose the color and speed of their cars and construct races. Or you 
could do something completely different. Be creative. Feel free to change the Racecar 
class or add other classes to the race package. 
 
9. CheckOff  
Please ensure that you have all the required files in the folder named lab9. These files 
should compile successfully. Failure to compile will automatically cost you 1 point.   
  
If you are ready to be checked off before 4pm, call one of the team members who will 
assign you a grade for the lab. Otherwise, you should leave the required files on your 
machine for us to evaluate at our own convenience.  
 
We will not accept modifications to the required files after the lab is officially due.