The fourth programming project involves writing a program that accepts information contained in a file about the class dependencies in a Java program and creates a directed graph from that information.

computer science

Description

The fourth programming project involves writing a program that accepts information contained in a file about the class dependencies in a Java program and creates a directed graph from that information. From the directed graph, it produces two different kinds of displays of those dependency relationships.

The first name of each line of the file is a Java class upon which other classes depend. The remaining names are the classes that depend upon the first class on that line. The first line of the above file, for example, indicates that ClassA has three classes that depend upon it, ClassC, ClassE and ClassJ. A class that have does any classes that depend on it, need not appear at the head of any line.


The main method in the class for this project should allow user select the input file from the default directory by using the JFileChooser class. It should then add the edges to a directed graph that defines these class dependencies.


A second class, DirectedGraph, should be a generic class, whose generic parameter specifies the type of the labels that are associated with the vertices of the graph. The internal representation of the graph should be the alternate adjacency list representation illustrated in Figure 10.7 of our textbook Object-Oriented Data Structures Using Java. Unlike that graph, however, this graph will not be a weighted graph. 


Related Questions in computer science category


Disclaimer
The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.