Pick one of the following problems to do for your interclass problem.

1. Shape Drawing - Using your new found skills with GreenfootImage, I want you to draw something interesting. It needs to involve several shapes and different colors. Have your drawing as the image for an actor so that it can be moved around the world.

2. Polygons - Write a method called drawRegularPolygon(int n) in a World class. It should draw an n-sided regular polygon. So if you pass it 4 you get a square. If you pass 8 you will get a regular octagon. (Note that you will probably want to use Math.sin() and Math.cos() to do this.)

3. Making Change - Write a method called makeChange(int cents). When you call this method you pass how many cents you want to make change for. It should print out how many quarters, dimes, nickels, and pennies are needed to make change. The trick is that you want as few coins as possible. Assume you have unlimited change for doing this.

4. Alternate Minimum Spanning Tree - In class we wrote minimum spanning tree one way and talked about how it could be done another way. The way we did it kept track of whether a node was connected using a boolean. This other method keeps two lists. One is the nodes that are connected and the other is nodes that aren't connected. To do this you will use the add and remove methods in List class. You will also have to make some lists of your own. To do this you should use the following lines of code:


List<Node> unList=new ArrayList<Node>(list);
List<Node> conList=new ArrayList<Node>();
		

The first line would make a new list that is a copy of the original list for the unconnected nodes. The second line makes a second list that starts off empty for the connected nodes. You will have to add an import statement for java.util.ArrayList unless you import java.util.*.