Question: Exercise: Implement the following. Setting up the Environment: Create a new Project on Netbeans. Give the project name Lab3 Class Node.java Create a new Class
Exercise: Implement the following. Setting up the Environment: Create a new Project on Netbeans. Give the project name Lab3 Class Node.java Create a new Class and name it Node. The class has the following attributes and methods Attributes: Data of any type (Element). Next of type Node that points to the next element. Methods: Constructor that creates a Node with the specified Data and Next. Class LinkedList.java Create a new Class and name it LinkedList. In the main method do the following: o Create a linked list of type integer, starting with a head node 1. o Create two Nodes, which are a reference to Node. Add New Nodes to the Linked List with integer values from 2 to 5. o Create printList(Node listHead) method. o Create Max(Node listHead) method. o Create Sum(Node listHead) method. o Create delete Node(Node list Head, int data) that return true if deleted false otherwise
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
