Purpose:
TaskDescriptions:
Task 1:Write Java code that creates the graph below and implements an algorithm that performs abreadth-first traversalof the graph, beginning at the node labeled . Please display nodes in order in which vertices are visited.
Task 2:Write Java code that creates the graph above and implementsan iterative algorithmthat performs adepth-first traversalof the graph, beginning at the node labeled . Please display nodes in order in which vertices are visited. (Note: please use stack for your iterative algorithm, not recursive method)
You will be graded based on the quality of your program.Please mention if Java interface and generic data type are used or not, as bonus will be considered for those who use Java interface and generic data type. Also, bonus will be considered for those who provide two versions (using adjacency matrix representation and using adjacency list). Screencast and unit testing are also extra credit worthy. Make sure your code will compile within my environment which use strict rules. (Tip: you can use a Java linter add-on to get all the warnings cleared.)
What to Submit?
1. Source codes for Tasks 1 and 2 (Note: properly comment your codes)
2. Readme.md (describes what graph representation you used and how to run your code)
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here