CSCI 6836 Section V1: Assignment 4
Fairleigh Dickinson University Vancouver
Fall 2023
Assigned: Monday, November 27, 2023
Due: Beginning of class, Monday, December 4, 2023 using Webcampus
Instructions
This assignment has 100 points. Complete this assignment entirely on your own. Submission must follow
the guidelines stated in What to Submit and Quality Requirements exactly.
This assignment is about graph algorithms. You must implement your own graph data structure. Do not use any off-the-shelf graph libraries.
Problem Definition
Implement a Graph class (undirected) using adjacency list representation. The graph class must include
a fromFile(inputFileName) method for reading an input file and constructing the graph object. After
constructing the graph, your program must perform breadth first search (BFS) and depth first search (DFS)
starting from a node specified by the user, and write the output to an output file. Sample input and output
are provided below. The program should be compiled from the command line as follows:
javac Graph.java
and run as follows:
java Graph