Wrote getCost and attempted parts of the constructor and addEdge