class Queue  {        private static int front, rear, capacity;        private static int queue[];            Queue(int size)         {                front = rear = 0;                capacity = size;                queue = new int[capacity];            }         // insert an element into the queue       static void queueEnqueue(int item)     {            // check if the queue is full           if (capacity == rear)          {                System.out.printf("\nQueue is full\n");                return;            }                  // insert element at the rear            else {                queue[rear] = item;                rear++;            }            return;        }              //remove an element from the queue       static void queueDequeue()       {            // check if queue is empty            if (front == rear)         {                System.out.printf("\nQueue is empty\n");                return;            }                  // shift elements to the right by one place uptil rear            else {                for (int i = 0; i < rear - 1; i++) {                    queue[i] = queue[i + 1];                }                          // set queue[rear] to 0               if (rear < capacity)                    queue[rear] = 0;                      // decrement rear                rear--;            }            return;        }              // print queue elements        static void queueDisplay()        {            int i;            if (front == rear) {                System.out.printf("Queue is Empty\n");                return;            }                  // traverse front to rear and print elements            for (i = front; i < rear; i++) {                System.out.printf(" %d , ", queue[i]);            }            return;        }              // print front of queue        static void queueFront()        {            if (front == rear) {                System.out.printf("Queue is Empty\n");                return;            }            System.out.printf("\nFront Element of the queue: %d", queue[front]);            return;        }    }    class QueueArrayImplementation {       public static void main(String[] args) {            // Create a queue of capacity 4            Queue q = new Queue(4);                  System.out.println("Initial Queue:");          // print Queue elements            q.queueDisplay();                  // inserting elements in the queue            q.queueEnqueue(10);            q.queueEnqueue(30);            q.queueEnqueue(50);            q.queueEnqueue(70);                  // print Queue elements            System.out.println("Queue after Enqueue Operation:");           q.queueDisplay();                  // print front of the queue            q.queueFront();                        // insert element in the queue            q.queueEnqueue(90);                  // print Queue elements            q.queueDisplay();            q.queueDequeue();            q.queueDequeue();            System.out.println("\nQueue after two dequeue operations:");                  // print Queue elements            q.queueDisplay();                  // print front of the queue            q.queueFront();        }    }   Please create a PSEUDOCODE not a code for this java program the pseudocode with START AND END  a simple type of pseudocode not a sentence type I ask so many questions in this site but you provide the same answer over and over again even if its wrong

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
100%

class Queue 
{   
    private static int front, rear, capacity;   
    private static int queue[];   
        Queue(int size)
        {   
            front = rear = 0;   
            capacity = size;   
            queue = new int[capacity];   
        }   
     // insert an element into the queue  
    static void queueEnqueue(int item)
    {   
        // check if the queue is full  
        if (capacity == rear) 
        {   
            System.out.printf("\nQueue is full\n");   
            return;   
        }   
     
        // insert element at the rear   
        else {   
            queue[rear] = item;   
            rear++;   
        }   
        return;   
    }   
     
    //remove an element from the queue  
    static void queueDequeue()  
    {   
        // check if queue is empty   
        if (front == rear)
        {   
            System.out.printf("\nQueue is empty\n");   
            return;   
        }   
     
        // shift elements to the right by one place uptil rear   
        else {   
            for (int i = 0; i < rear - 1; i++) {   
                queue[i] = queue[i + 1];   
            }   
     
         
      // set queue[rear] to 0  
            if (rear < capacity)   
                queue[rear] = 0;   
     
            // decrement rear   
            rear--;   
        }   
        return;   
    }   
     
    // print queue elements   
    static void queueDisplay()   
    {   
        int i;   
        if (front == rear) {   
            System.out.printf("Queue is Empty\n");   
            return;   
        }   
     
        // traverse front to rear and print elements   
        for (i = front; i < rear; i++) {   
            System.out.printf(" %d , ", queue[i]);   
        }   
        return;   
    }   
     
    // print front of queue   
    static void queueFront()   
    {   
        if (front == rear) {   
            System.out.printf("Queue is Empty\n");   
            return;   
        }   
        System.out.printf("\nFront Element of the queue: %d", queue[front]);   
        return;   
    }   
}   
class QueueArrayImplementation {  
    public static void main(String[] args) {   
        // Create a queue of capacity 4   
        Queue q = new Queue(4);   
     
        System.out.println("Initial Queue:");  
       // print Queue elements   
        q.queueDisplay();   
     
        // inserting elements in the queue   
        q.queueEnqueue(10);   
        q.queueEnqueue(30);   
        q.queueEnqueue(50);   
        q.queueEnqueue(70);   
     
        // print Queue elements   
        System.out.println("Queue after Enqueue Operation:");  
        q.queueDisplay();   
     
        // print front of the queue   
        q.queueFront();   
           
        // insert element in the queue   
        q.queueEnqueue(90);   
     
        // print Queue elements   
        q.queueDisplay();   
        q.queueDequeue();   
        q.queueDequeue();   
        System.out.println("\nQueue after two dequeue operations:");   
     
        // print Queue elements   
        q.queueDisplay();   
     
        // print front of the queue   
        q.queueFront();   
    }   
}  

Please create a PSEUDOCODE not a code for this java program the pseudocode with START AND END  a simple type of pseudocode not a sentence type I ask so many questions in this site but you provide the same answer over and over again even if its wrong

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY