Midterm Review |
Note: Please keep the programs that you create today, in case you have a dispute about your grades for the ICEs at the end of the quarter. When you're working with a partner, each person should save their own, individual copy
With your partner, go through all the code you're written, material you've gotten from the website, sections of the book that you've read, online documentation you've used, etc, etc, and build up a list of commands that are built into a normal, plain vanilla Robot (i.e., the Robot that's part of becker.jar ; not any new types of robot that you might have created on your own).
The objective here is to be familiar with the capabilities of a basic robot, so that you're not caught off-guard on the exam. In order to do that, you should make sure that you can fill in the following table for each command:
Command Name |
English Description |
Example Code |
canPickThing |
Returns true if there's a Thing in the exact same intersection as the robot. This means that I can use this command to tell if it's safe to tell the robot to pick a Thing up or not. |
if(this.canPickThing() ) |
Etc |
|
<for a new row in this table (in Word), move the cursor to this cell, then push the 'Tab' key> |
Part 2: Exam Review: Sample Exam
With a partner(s), go through the sample exam (if you haven’t already), and make sure that you can answer all the questions correctly.
Part 3: Exam Review: Writing Code
Take the I_04_If.java file, and modify it so that robot moves from the starting point to the other end of the pipe.
For this exercise, the goal is to review most of the programming techniques that you have looked at so far during this term. Towards that end, you are required to use the following in your solution:
1. One new type of Robot
2. The new type of robot must have at least two new commands / services / methods / whatever-you-want-to-call-them, and you must use both.
3. You must use an if (or an if/else) statement somewhere
4. You must use a counting loop
5. You must use a non-counting loop (for example – while( Jo.frontIsClear() { } )
You may use more than what’s listed above (you might have two, or three or more counting loops), but you’re not allowed to use less.