キューでの操作の作成と実行を含む割り当てがあります...指示の中で、彼は次のように言い始めます...
Node Class: You will extend the following class for (some of) the questions below.
public class Node<T>{
protected T data;
protected Node<T> next;
}
Implement the QUEUE (FIFO) abstract data type. For this, you will create a class called Queue that extends Node<T>. Your class should have the following methods:
public void enqueue(Node<T> item)
// Purpose: adds item to the queue
// Preconditions: item should exists (not be null)
// Postconditions: item is added to the end of the queue
// the size of the queue is increased by 1
...など、さらに数ページの要件などがあります...
わからないことがいくつかあります... とはpublic class Node<T>
どういう意味ですか? (斜体部分)。
また、エンキュー以外にも多くの方法があるため、適切な設計では、この方法の外でキューを作成する必要があると思いますか?
前もって感謝します!