Assignment 4

This program represents the beginnings of a tool that can plan and display network connections. Implement an application or applet containing a Canvas or JPanel in which users may place points by clicking at any location in the canvas. Points can be displayed as small squares or other shapes. Users can also connect points with edges. Edges may be displayed as lines. At all times, the applet displays a minimal spanning tree starting at the first point that was entered, using (x,y) distances as weights. The spanning tree can be displayed using different colors for the lines than used for ordinary edges.

All details about how to display and connect points are up to you.


Doug Lea