Lab 6: Circular Linked Lists

Due Date and Submission Requirements


The goal of this lab is:


Directions

You will be writing a Circular Linked List where each Node represents a country. First, define the Node class. Each Node (country) will have a name. Remember that each Node must also keep track of the node that comes next, and the node that comes before it. Then, download Lab6Demo.java, and supply the missing functions inside the CircularLinkedList class. In the CircularLinkedList class, you must write the following methods

Rules

You are NOT allowed to import java.util.LinkedList;

Starting Code

Required Output

When your program is run, your output should look very similar the same as seen in this screenshot . Note that your final removed nodes might be different, because the random value being generated is going to different.

You might be confused regarding why Egypt or Japan was selected to remove. Here is a visualization of the linked list, and how it was determined which node was removed:

Grading (10 points)



Deductions
  • -10 points if you dont use a Linked List