completed define class Graph,not complete method in Graph