Before continuing on, make sure you’re caught up on the lectures through 6/15 and 6/17. Also make sure to pull the starter code.
In this assignment your task is to complete a series of algorithms using linked lists. The method signatures and their explanations that you need to implement are provided at the top of LinkedList.java. The algorithms increase in difficulty as you go down the page. An example of the input and expected output is also provided. For these algorithms you should NOT be creating a new list and returning it, you should only be manipulating the list object that the method is called on (the object that the this keyword represents).
The ex05 package also contains the code for an implementation of a Linked List. The Node class is how we represent a Node that makes up the List and the LinkedList class has a full implementation of the LinkedList. You should not be changing any of the completed methods at the bottom, only edit the first 8 methods at the top of the file (only first 4 for this exercise). Look over and understand the contents of this package before starting on the algorithm solutions.
An example of how to test your code is provided in Main.java. A toString method is provided in LinkedList.java to display the contents of the list.
For ex05, we are expecting you to complete,
removeAtIndex
, isEqual
,
isSymmetrical
and multiply
. The rest will
count as part of ex06
, but feel free to work ahead.
“Push” your work up to GitHub for backup. By creating “commits”, which you can think of as versioned checkpoints in your workspace, you are not at risk of losing your work. It’s easy to revert back to an old version or to restore your entire workspace on a different computer.
main
branch, and needs to
be pushed to your remote backup.USERNAME
with your GitHub
username:
https://github.com/summer-210/summer210-workspace-USERNAME
All that’s left now is to hand-in your work on Gradescope for grading.
Before doing so, you need to know that before an assignment’s deadline you can resubmit work as many times as you need to without penalty. Portions of assignments are autograded and will provide near-immediate feedback. We want you to resubmit as many times as it takes you in order to earn full autograding credit!
Login to Gradescope and select the assignment named “EX05 - Linked List Part 1” You’ll see an area to upload a zip file. To produce a zip file for autograding, return back to IntelliJ.
Along the bottom of your window, you should see an option to open a terminal integrated into IntelliJ.
Type the following command (all on a single line):
./submit.sh ex05
In the file explorer pane, look to find the zip file named “ex05_submission.zip”. The script will call it an ex05 submission since that is the package we zipped. If you right click on this file “Open in -> Finder” on Mac, the zip file’s location on your computer will open. Upload this file to Gradescope to submit your work for this exercise.
We are working on rewriting the script to work for Windows! Until
then, please navigate to your course workspace in a File Explorer
window. Then right click on the src
folder in your
exercises directory and compress the directory into a zip folder. You
can name it “ex05_submission.zip”
When you upload it to Gradescope, please delete any files that showed
up in the src/
folder that were not actually part of
ex05
.