CIS 3120
Design and Implementation of Software Applications I
Lab 3

Introduction

For this lab, you will develop a program that simulates a patrol car moving around in a 2-dimensional world, looking for suspects. The patrol car's current location is represented by an (x, y) point in space. Imagine that the patrol car can choose a direction command one at a time. The program will have a broad control loop, and for each iteration of the loop, the patrol car must decide what to do (i.e., which command to execute). The goal is for the patrol car to locate all the suspects hidden in its world. The patrol car's world is 10 X 10 units in size, and the x and y coordinates are in the range [0, 9] (i.e., from 0 to 9, inclusive).

Location (0,0) is assumed to be on the top-left corner, to conform computer graphics standards.

Add comments to your code, describing each data field, method and class (in the beginning of each file)!!!

What to Do

  1. Create a new class, Point2D, which has the following:
  2. Create a new class, PatrolCar, which has the following:
  3. Create a new class, World, which has the following:

What to Submit

You should complete lab by the indicated due date. Please read this carefully:

Results of the labs and assignments that do not involve usage of web server should be submitted as follows: