Assignment Instructions
Instructions:
* Make sure you go to this week’s chapter lesson for more guidance.
This assignment involves using recursive method. Write a program that reverses a LinkedList.
Save the code in jGRASP, then save it in c:\myjava and run it.
/*******************
Name:
Date:
Notes:
*******************/
// Java program for reversing the linked list
class MyLinkedList {
static Node head;
static class Node {
int data;
Node next;
Node(int d) {
data = d;
next = null;
}
}
/* Function to reverse the linked list */
Node reverse(Node node) {
add content
node = prev;
return node;
}
// prints content of double linked list
void printList(Node node) {
while (node != null) {
System.out.print(node.data + ” “);
node = node.next;
}
}
public static void main(String[] args) {
MyLinkedList list = new MyLinkedList();
add content }
}
Make sure that you include all source codes and the compiled codes into W7_firstname_lastname.zip.
You must leave me a note in the Submitted Text area on how to compile and run your code.
Requirements
Points Available
Assignment details in a comment block (flowerbox)
10
Core application as described in the assignment requirement
60
Print function used to correctly to print the solution to the assignment
20
Code is commented and application name is submitted as requested
10
Total
100
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more