Exercise
09/08/2006
|
Initial
|
Due: Tuesday, September 12 8am
|
Relevant Reading:
- Handout from class (not available on line) and class notes
-
Chapters 5 and 6 of the Karel J. Robot text
Assignment: (worth 5 exercise points)
Get the ex09-08.zip file. Use the
files
in this folder as your basis for this assignment.
In
this program, you will have a robot place down beepers in the pattern
of one of your initials (choose your most interesting
initial).
Further specifications:
- the user should get to type in the name of the world into a dialog box. There are three worlds: test1.txt, test2.txt, test3.txt. In each of these worlds is a box of identical size, but in different locations.
- the user should get to choose the starting street and
avenue of the robot. This intersection should be either the upper
left corner of your initial or the lower left corner of your initial.
- tracing should be turned off. Instead, the following should appear in the console window at the end of the program:
- a report as to the name of the world that contains the initial
- a report as to the street and avenue where the robot started
- the only error shutoff that is allowed is if the robot tries to go through a wall because of poor placement by the user.
- If the user types in a bad filename, or something besides an integer, the program may crash. This is okay.
Notes:
- Think through how you will approach the problem rather than
just blindly starting to type code. Plan out what you will do on paper and
then fill in the details on the computer.
- Remember that you are permitted to talk with others in this section
regarding
how the program works. However, you need to do the actual work
yourself
and understand the answer that you produce.
- When
editing your programs on a PC, you will probably NOT want to use the
Notepad application. Wordpad or other text editors should be
fine, but Notepad can cause odd behaviors.
- By now, you should be comfortable with how to compile and
execute. The Application.java file you are given gives you a
reminder.
- Remember to put appropriate comments in your code, including:
- your name in any file that you create or modify
- a description of what the program does (if it is Application.java)
- a description of the new class (if a new class of robot is what is being defined)
- any new method you create should have a brief comment stating what it does
- You are NOT required to create a new class of robot, but you are welcome to do so, if you wish.
Handin:
-
Be sure to read the general handin instructions on the exercises page.
-
Rename the folder containing all of the files to be
"lastname-firstname-100SectionLetter-initial". For example, if I were in Section Z, I would rename my folder to
be: "McElfresh-Scott-100Z-initial"
(without the quotes).
- Create a zip file of this folder, with the same name as the folder (except
with the .zip ending this time). Instructions for zipping can be found in
the system and software handouts linked on the main course page.
- Submit this file via the electronic
handin. If you have problems, contact me.
|