Question: Create a directed graph G=(V,E) using Adjacency List Method. here V is a set of vertices and E is a set of ordered pairs of

Create a directed graph G=(V,E) using Adjacency List Method. here V is a set of vertices and E is a set of ordered pairs of vertices called edges. An edge(i,j) is directed from i to j.

Create a directed graph G=(V,E) using Adjacency List Method. here V is

Task 1: Create a directed graph G (VE) using Adjacency List method. Here V is a set of vertices and E is a set of ordered pairs of vertices called edges. An edge(i) is directed from 1 to Design and implement a graph class using the adjacency list method as explained in the class lecture. The nodes should store strings The class should have the following methods fully implemented. i. ii. 111. iv. v. vi, vii. Constructor - This should have an overload indicating the number of vertices in the graph. addNode(i) - adds a node to the graph. i is the value stored in the node addEdge(LJ)-Add the edge (ij) to E. removeEdge(LJ)-Remove the edge (ij) from E removeNode(i) - Removes the node from the graph. hasEdge(LJ)-Check if the edge (LJ) E E. outEdges(i) - Return a list of all integers j such that edge (ij)E E. viii. inEdges(i) - Return a list of all integers j such that edge (j.i) E E ix. Destructor Task 1: Create a directed graph G (VE) using Adjacency List method. Here V is a set of vertices and E is a set of ordered pairs of vertices called edges. An edge(i) is directed from 1 to Design and implement a graph class using the adjacency list method as explained in the class lecture. The nodes should store strings The class should have the following methods fully implemented. i. ii. 111. iv. v. vi, vii. Constructor - This should have an overload indicating the number of vertices in the graph. addNode(i) - adds a node to the graph. i is the value stored in the node addEdge(LJ)-Add the edge (ij) to E. removeEdge(LJ)-Remove the edge (ij) from E removeNode(i) - Removes the node from the graph. hasEdge(LJ)-Check if the edge (LJ) E E. outEdges(i) - Return a list of all integers j such that edge (ij)E E. viii. inEdges(i) - Return a list of all integers j such that edge (j.i) E E ix. Destructor

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!