(Display a graph) A graph consists of vertices and edges that connect vertices. Write a program that reads a graph from a file and displays it on a panel. The first line in the file contains a number that indicates the number of vertices (n). The vertices are labeled as 0, 1, . . . , n-1. Each subsequent line, with the format u x y v1 v2 ..., describes that the vertex u is located at position (x, y) with edges (u, v1), (u, v2), and so on. Figure 14.14a gives an example of the file for a graph. Your program prompts the user to enter the name of the file, reads data
from the file, and displays the graph on a panel, as shown in Figure 14.14b. Write another program that reads data from a Web URL such as http://cs.armstrong.edu/liang/data/graph.txt. This program should prompt the user to enter the URL for the file.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.