This project requires the use of the following Java program files:
|
Download them to your PC before doing this project.
Abide to the Emory Honor code when doing assignments.
(1) void addAt(T item, int pos) add item item to the linked list at position pos (2) T removeAt(int pos) remove the item in the linked list at position pos and return it |
The material on linked list is in Section 11 of my online syllabus (see Canvas for the link). Study the section if necessary. I will not explain what you need to do. You need to:
|
For a summary of the list manipulation operations, please check out this webpage:
Write the method addAt(item, pos) that inserts the item item at the position pos in the linked list.
pos = 0 inserts item at the front (as the first node) in the linked list pos = 1 inserts item as the 2nd node in the linked list and so on |
Furthermore:
|
When you finish coding the addAt( ) method, you can use Test1.java to test your code.
Write the method removeAt(pos) that removes the item at the position pos from the linked list and returns it.
pos = 0 removes the item at the front (= the first node) from the linked list pos = 1 removes the 2nd node from the linked list and so on |
Furthermore:
|
When you finish coding the removeAt( ) method, you can use Test2.java to test your code.
You must be on Emory campus (e.g.: Emory unplugged) in order to turn in an assignment
Use your web browser and visit the cs171 turnin website: click here
|
Follow the instructions given in homework 1 to turn in.
You must be on Emory campus (e.g.: Emory unplugged) in order to make extension requests
Use your web browser and visit the cs171 turnin website: click here
Use assignment code hw7 to request extension for this homework.
Follow the instructions given in homework 1 to request extension.