Instead of decorating an edge with just a weight (a double), Amir needs a weight (a double) and a name (a String).What changes have to be made to the interface to support this? What changes need to be made to the internal representation of vertices and edges?
What will be an ideal response?
At this point we need a new class to store the multiple pieces of information to be associated with each edge. This class might be called EdgeData. All the methods specified in WeightedGraph would have to be changed to replace double with EdgeData. No changes would have to be made to the representation of vertices or edges.
You might also like to view...
Describes the formatting to be executed.
a. Selector b. Declaration c. Inheritance d. Comments
A digital camera's ____ can store hundreds of images.
A. RAM stick B. BD C. hard drive D. solid-state memory card
Match each term with the correct statement below.
A. hypothesis about the social network graph of the whole world B. someone who suffers from dissocial personality disorder C. uses the least number of edges D. the online version of the spoilsport E. someone who uses the Internet to harass a particular target F. describes Internet sites like Facebook G. a branch of mathematics used to analyze social networks H. connects related nodes in a graph I. a construct in mathematics in which individual entities are represented as nodes
Which of the following documents would look best in landscape orientation?
A) A certificate B) A letter C) A memo D) A resume