In this exercise, you will complete a Java implementation of Prim's MST (min spanning tree) algorithm. It consists of 3 modules (files): Vertex.java, Prim.java, and Main.java. Vertex.java contains the definition of an Vertex object (including the parent vertex, and the weight associated with the edge back to the parent). Prim.java is where the majority of the work needs to be accomplished. The following methods need to be completed: process, and getMSTCost. Main.java contains code that demonstrates how one may use and test the MST algorithm. Submit your work via Canvas.
Note the boolean variable, verbose, is defined in Prim.java. If your code includes messages that are printed, only print them if verbose is true. If you print messages without checking verbose, I will deduct points from your score.