Home  |   Notes  |   Homework  |   Labs  |   Programs
Program 2: Trash Man

Due midnight the evening of 9/22

Goal

In your second programming assignment, you will be writing another simple robot subclass to pick up trash (i.e., beepers). Your robot will start off in the "home" position (at 1st Street and 1st Avenue, facing North, with no beepers). This is the southwest corner of a rectangular room of random size. The room is "littered" with beeper piles of random sizes at random locations. Your robot's mission is to sweep the room and pick up all of the beepers, and then turn off when done.

 
Learning Objectives
  • Familiarity with complete robot tasks
  • Familiarity with creating new subclasses
  • Familiarity with writing test cases
  • Familiarity with if statements
  • Familiarity with simple recursion, or
  • Familiarity with while loops
  • Familiarity with the Web-CAT Grader
  • Initializing the World

    You can start your world off this way:

        World.startFromURL( "program2.php" );
    

    This will load up a random world description. Note that there may even be one or more beepers at the home position where your robot starts. An example room layout is shown below:


    Click picture for a larger view

    Requirements for your Solution

    There are several requirements your solution must follow:

    Submit Your Solution

    Program submissions work just like lab submissions. On BlueJ's main menu, click Tools->Submit.... Click on "Browse...", double-click to open the "CS 1705 Programs" folder, and select Program 2. Click "OK". Click "Submit". Click on the link provided in the submission response in order to view the results of the automated phase of program grading.

    If no "Program 2" entry is visible on BlueJ's submission menu, then the Web-CAT Grader is not yet accepting submissions for this assignment. Wait for a message posted to the course web site that submissions are being accepted, and try again.

    If any errors are indicated, you can fix them and resubmit. You may resubmit as many times as you like, up until the deadline. Be careful as the due time approaches--if you submit just over the deadline, a late penalty will be assessed.

    Home  |   Notes  |   Homework  |   Labs  |   Programs

    copyright © 2003 Virginia Tech, ALL RIGHTS RESERVED
    Last modified: September 22, 2003, 8:41:28 am EDT, by Stephen Edwards <edwards@cs.vt.edu>