(Graphs) A graph consists of vertices and edges that connect vertices. Write a program that enables the user to draw vertices and edges dynamically, as shown in Figure 18.31. The radius of each vertex is 20 pixels. Implement the following functions: (1) The user clicks the left-mouse button to place a vertex centered at the mouse point, provided that the mouse point is not inside or too
close to an existing vertex. (2) The user clicks the right-mouse button inside an existing vertex to remove the vertex. (3) The user presses a mouse button inside a vertex and drags to another vertex and then releases the button to create an edge. (4) The user drags a vertex while pressing the CTRL key to move a vertex.
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.