Java help. The file UnsortedLinkedDictionary.java contains unimplemented methods for a dictionary basedon an unsorted linked list. Implement all these methods.   The java code is below: import java.util.Iterator;import java.util.NoSuchElementException;public class UnsortedLinkedDictionary<K, V> {public static void main(String args[]){// Add you tests here}public UnsortedLinkedDictionary() {} // end default constructorpublic V add(K key, V value) {} // end addpublic V remove(K key) {} // end removepublic V getValue(K key) {} // end getValuepublic boolean contains(K key) {} // end containspublic boolean isEmpty() {} // end isEmptypublic int getSize() {} // end getSizepublic final void clear() { } // end clearprivate class Node {private K key;private V value;private Node next;private Node(K searchKey, V dataValue) {key = searchKey;value = dataValue;next = null; } // end constructorprivate Node(K searchKey, V dataValue, Node nextNode) {key = searchKey;value = dataValue;next = nextNode; } // end constructorprivate K getKey() {return key;} // end getKeyprivate V getValue() {return value;} // end getValueprivate void setValue(V newValue) {value = newValue;} // end setValueprivate Node getNextNode(){return next;} // end getNextNodeprivate void setNextNode(Node nextNode) {next = nextNode;} // end setNextNode} // end Node} // end UnsortedLinkedDictionary

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Java help.

The file UnsortedLinkedDictionary.java contains unimplemented methods for a dictionary based
on an unsorted linked list. Implement all these methods.
 
The java code is below:

import java.util.Iterator;
import java.util.NoSuchElementException;

public class UnsortedLinkedDictionary<K, V> {

public static void main(String args[])
{
// Add you tests here

}
public UnsortedLinkedDictionary() {

} // end default constructor

public V add(K key, V value) {

} // end add

public V remove(K key) {

} // end remove

public V getValue(K key) {

} // end getValue

public boolean contains(K key) {

} // end contains

public boolean isEmpty() {

} // end isEmpty

public int getSize() {

} // end getSize

public final void clear() {

} // end clear

private class Node {
private K key;
private V value;
private Node next;

private Node(K searchKey, V dataValue) {
key = searchKey;
value = dataValue;
next = null;
} // end constructor

private Node(K searchKey, V dataValue, Node nextNode) {
key = searchKey;
value = dataValue;
next = nextNode;
} // end constructor

private K getKey() {
return key;
} // end getKey

private V getValue() {
return value;
} // end getValue

private void setValue(V newValue) {
value = newValue;
} // end setValue

private Node getNextNode()
{
return next;
} // end getNextNode

private void setNextNode(Node nextNode) {
next = nextNode;
} // end setNextNode
} // end Node
} // end UnsortedLinkedDictionary



Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Linked List Representation
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education