Define a class for finite digraphs. The class should be called Digraph. It should represent a directed graph with n vertices, and various edges between them. One possible representation is an nxn matrix A where A(i,j) is 1 if there is an edge from i to j, and zero otherwise. For strategic reasons, the domain of A(i,j) could be a byte rather than a boolean. Array values should be non-negative. The vertices can be 'labeled' 0,1,2,...,n-1. Initialization can be via a set of ordered pairs where each pair represents an edge. These pairs can reside in a file, and the first element of the file might be n. Constructors: Digraph(filename fn, size n) Digraph(size n) Mutator method to set a digraph: void setGraph(filename fn) application methods: 1. inDegree(vertex_index v) 2. outDegree(vertex_index v) 3. boolean edgeFrom(v1,v2) returns true if there is an edge from v1 to v2 4. paths(length n) returns a Digraph B such that B(v1,v2) is > 0 iff there is a path from v1 to v2 of length precisely n. 5. pathFrom(v1, v2) returns true if there is SOME path from v1 to v2; alternatively a shortest path could be returned, or the length of a shortest path could be returned 6. a reasonable public void toString() 7. a reasonable public boolean equals(Digraph d)
## Deliverables
Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
## Deadline information
deadline is tuesday or wednesday