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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!