[SOLVED] CSI2110 - Lab 1

30.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon Lab1-x6lqm6.zip (3.5 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
πŸ”’ Securely Powered by:
Secure Checkout
5/5 - (1 vote)

0) Test your IDE (optional)

In case you are uncertain if your prefered Java development environment works as expected, the archive Lab1.zip contains HelloWorld.java for testing.

1) Singly Linked List

  • Download the archive Lab1.zip and extract the singly linked list implementation contained in the following files
    • LinkList.java
    • Node.java
  • Compile and run LinkList.java and study its behaviour.

2) Doubly Linked Lists

  • Change the singly-linked-list to a doubly-linked-list by changing Node.java to DNode.java.
  • Change the LinkList class to work with DNode, in particular, adapt the implementation of the void LinkList.deleteLast() method.

3) Using Generics

  • The archive Lab1.zip also contains the file GNode.java which implements a node for a singly-linked-list as before but instead of storing a reference to an Object, it uses a generic element.
  • Adapt the original LinkList class to use the generic Gnode class.
  • Lab1-x6lqm6.zip