Computer Science Please complete the following methods and areas commented out in java. Also provide a screen shot so i know its working. Thank you. ---------------------------------------------------------------- public class TheLinkedList { private class Node { public Type item; public Node next; ///create constructor for the node class public String toString() { return element.toString(); } } private Node first; private Node current; private Node previous; private int size; public void insertBefore(Type element) { //Inserts element before the current Node. If the curr is null then element is put in last position } public void insertAfter(Type element) { //Inserts element after current Node and if current is Null then it doesnt do anything } public Type current() { //return the current node } public Type first() { //set the current node to the first and return it } public Type next() { //set the current Node to the next node and return it }
Computer Science
Please complete the following methods and areas commented out in java. Also provide a screen shot so i know its working. Thank you.
----------------------------------------------------------------
public class TheLinkedList<Type> {
private class Node {
public Type item;
public Node next;
///create constructor for the node class
public String toString() {
return element.toString();
}
}
private Node first;
private Node current;
private Node previous;
private int size;
public void insertBefore(Type element) {
//Inserts element before the current Node. If the curr is null then element is put in last position
}
public void insertAfter(Type element) {
//Inserts element after current Node and if current is Null then it doesnt do anything
}
public Type current() {
//return the current node
}
public Type first() {
//set the current node to the first and return it
}
public Type next() {
//set the current Node to the next node and return it
}
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 5 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)