Added a getCost method.
Added an addEdge method.
Added a constructor and a removeEdge method.