Write a Java program which stores three values by using singly linked list. - Node class 1. stuID, stuName, stuScore, //data fields 2. constructor 3. update and accessor methods - Singly linked list class which must has following methods: 1. head, tail, size// data fields 2. constructor 3. update and accessor methods a. getSize() //Returns the number of elements in the list. b. isEmpty( ) //Returns true if the list is empty, and false otherwise. c. getFirstStuID( ), getStuName( ), getFirstStuScore( ) d. addFirst(stuID, stuName, stuScore) e. addLast(stuID, stuName, stuScore) f. removeFirst ( ) //Removes and returns the first element of the list. g. displayList( ) //Displays all elements of the list by traversing the linked list. - Test class – initialize a singly linked list instance. Test all methods of singly linked list class
Write a Java program which stores three values by using singly linked list.
- Node class
1. stuID, stuName, stuScore, //data fields
2. constructor
3. update and accessor methods
- Singly linked list class which must has following methods:
1. head, tail, size// data fields
2. constructor
3. update and accessor methods
a. getSize() //Returns the number of elements in the list.
b. isEmpty( ) //Returns true if the list is empty, and false otherwise.
c. getFirstStuID( ), getStuName( ), getFirstStuScore( )
d. addFirst(stuID, stuName, stuScore)
e. addLast(stuID, stuName, stuScore)
f. removeFirst ( ) //Removes and returns the first element of the list.
g. displayList( ) //Displays all elements of the list by traversing the linked list.
- Test class – initialize a singly linked list instance. Test all methods of singly linked list class

Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 5 images









