Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Directed Graph Question Consider the above directed weighted graph and represent the graph using an adjacency matrix. While creating the adjacency matrix, use the

C++ Directed Graph Question

image text in transcribed

Consider the above directed weighted 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): Create a menu driven application which will provide the following options to the users: This option will allow users to add an edge to the existing graph model. To add an edge, take two vertices (the edge is from first to second) and the edge weight 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!" 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!" Show total number of edges: Show total number of edges using the adjacency matrix. Show the matrix: Show the updated adjacency matrix in the console. Exit

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing

Authors: David M. Kroenke

12th Edition International Edition

1292023422, 978-1292023427

Students also viewed these Databases questions

Question

How wide are Salary Structure Ranges?

Answered: 1 week ago