Question
JAVA Linked List with Comparison Use the code and write a new class with name Student The Student has 3 attributes: int id, String name,
JAVA
Linked List with Comparison
Use the code and write a new class with name "Student"
The Student has 3 attributes: int id, String name, double avg (average - Cumulative GPA)
The student must be ready for comparison using Comparable or Comparator
Then, write two methods in CustomLinkedList class, that are:
remove (E data)
contains (E data)
The new methods use the comparison to find the Node that has the inputted data.
remove method deletes the Node.
contains method return true if there is an object successes in the equality
The new methods must be able to perform comparison on native Java classes and the custom Java classes (user-defined classes).
use two calss Node & CustomLinkedList
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started