your job is to write a class that can load an undirected graph from a file then your class should support a number of options all accessed through a text driven menu let s list the things you re going to need to be able to do

PLEASE TAKE A LOOK AT THE ATTACHMENT FIRST.

Your job is to write a class that can load an (undirected) graph from a file. Then, your class should support a number of options, all accessed through a text-driven menu. Let’s list the things you’re going to need to be able to do.

  1. Loading the Graph: You will need to open the file specified by the user and read in a representation of an undirected graph.
  2. Display a menu: Display a menu the user can make choices from. Each choice will either give information about the currently loaded graph or transform it in some way.
  3. Is Connected: You will need to determine whether or not the graph is connected.
  4. Minimum Spanning Tree: If the graph is connected, you will need to find a minimum spanningtree for the graph and print an error otherwise.
  5. Shortest Path: Prompt the user for a node. Then, print the lengths of the shortest paths from thatnode to all other nodes and the actual paths as well.