

Can you give only the pseudocode in Java for this
(50) [Graph traversal: programming: queue-based implementations] Write a program that runs either BFS or DFS of a graph as requested by the user. (Note the only difference between queuebased BFS and DFS implementations is that FIFO is used for BFS and LIFO is used for DFS. (See their pseudocodes in the lecture slides.) So, you would write one code that uses FIFO queue for BFS and LIFO queue for DFS. Feel free to use Java classes to implement the queues. Your program must prompt for the graph traversal mode (i.e., BFS or DFS) and the start node number, and once they are input, run the traversal against the adjacency list representation of the graph shown below. (This graph is from the lecture slide.) When your program adds nodes to the queue, it must add them exactly in the order of appearance in the linked list (i.e., from left to right), or your program output will be incorrect. Your program code will be tested with different start nodes, for either BFS or DFS. At each run, the program should output (i.e., display on the terminal screen) the number of the node visited at each step of the graph traversal.
Example output of node traversal order: - BFS with the start node 1 discovers the nodes in the following order: 1,2,3,4, 5,7,8,6. - DFS with the start node 1 discovers the nodes in the following order: 1,3,8,7, 5, 6, 4, 2.