/** Boston University, Department of Computer Science CS 112, Spring 2011 Lab 03: Linked data structures Teaching Fellow: Diane H. Theriault, deht@cs.bu.edu */ import java.util.* public class LinkedQueue{ class Node{ Node(int iValue) { mValue = iValue; mNext = null; } public int mValue; public Node mNext; } protected Node mHead; protected Node mTail; LinkedQueue() { mHead = null; } void enqueue(int iValue) { if(mHead == null) { mHead = new Node(iValue); mTail = mHead; return; } else { mTail.mNext = new Node(iValue); mTail = mTail.mNext; } } //implement this function by using the mNext links to move through the linked list. void print() { System.out.println(mHead.mValue); } }