Ap Computer Science- GridWorld: World And Grid

<p>I am confused about the relationship between world and grid. When do you use which and such, do you always use one to compliment the other such as in:</p>

<pre><code>ActorWorld world = new ActorWorld();

Grid gr = new BoundedGrid(10,10);

Actor clown = new Actor();
Location loc = new Location(3,4);

world.add(loc,clown);
gr.put(loc, clown);

world.show();
</code></pre>

<p>Thanks! ;D</p>

<p>Hi. The world class is not part of the appendix at the end of the test. So the college board would never ask you to write a new method or class using the world class.</p>

<p>The world class helps create graphics when you actually run a program on a computer. The Grid keeps track of the Actors themselves. You would never really write something that has both a World and a Grid at the same time.</p>