code a class named sllqueue that uses a double-ended singly linked list to implement a queue as described in this chapter. provide a driver program that demonstrates the constructor, enqueue and dequeue methods function properly

Respuesta :

Answer:

See attached file please.

Explanation:

See attached file for detailed explanation and code.

import java.util.*;

class LinklistImplementQueue {  

public static void main(String[] args)

{

Scanner scan = new Scanner(System.in);

/* Creating object of class SLLQueue */    

SLLQueue lq = new SLLQueue();

char ch;

do

{

System.out.println("\nQueue Operations");

System.out.println("1. ENQUEUE");

System.out.println("2. DEQUEUE");

int choice = scan.nextInt();

.

.

.

.

See attached file for complete code.

Ver imagen abdullahfarooqi