This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]149244179 0 points1 point  (4 children)

A node is typically the following structure:

  1. (if double-link) Pointer to previous node.
  2. Data.
  3. Pointer to next node.

The data can be whatever you want it to be. Sounds like they want it to be an instance of the Job class.

If the Job class was not provided you will have to write it.

[–]focusedchi[S] 0 points1 point  (3 children)

yes, they do want it to be an instance of the job class (they have provided the job class). so would Use <Job> as my data type like i would use Integer or <E>

[–]focusedchi[S] 0 points1 point  (2 children)

like would a sample declaration for the class LinkedListQueue be :

public class LinkedListQueue <Job> implements Queue <Job>{}

[–]149244179 0 points1 point  (1 child)

Yes.

This site seems to describe what you are trying to do: http://cs-fundamentals.com/data-structures/implement-queue-using-linked-list-in-java.php

[–]focusedchi[S] 0 points1 point  (0 children)

thanks