Question: Write in C++ only Create a menu driven application which will provide the following options to the users : 1. Insert : This option will

Write in C++ only

Write in C++ only Create a menu driven application which will provide

Create a menu driven application which will provide the following options to the users:

1. Insert: This option will allow users to add an edge to the existing graph model. To add an edge, take two vertices as input from the user, update the adjacency matrix using that two vertices as index. If an edge already exists, notify the user by saying edge already exists!

2. Delete: This option will allow users to delete an edge to the existing graph model. To delete an edge, take two vertices as input from the user, update the adjacency matrix using that two vertices as index. If there is no existing edge, notify the user by saying no edge available! 1

3. Show total number of edges: Show total number of edges using the adjacency matrix.

4. Show the matrix: Show the updated adjacency matrix in the console.

5. Exit

Boston New York Chicago San Francisco Washington Denver Los Angeles Consider the above undirected graph and represent the graph using an adjacency matrix. While creating the adjacency matrix, use the state names in alphabetical orders. Instead of using the whole names (e.g. New York), use the first letters (e.g. N) of the states to identify them. Format of adjacency matrix will be (the first row is done for you): whole names (leg, New York, uner the fit( f the states to identif them. Forinat B CDLNS w

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!