ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 3 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 09 May 2017 My Price 8.00

The QueueClass.java

Write the definitions of the method copyQueue and the copy constructor for the class QueueClass.

Write a program to test these operations.

 

What to submit:

  • The QueueClass.java that includes both new methods
  • The testClass.java

 

package queueclass;/*****/public class QueueClass {private int maxQueueSize;private int count;private int queueFront;private int queueRear;private DataElement[] list;//Array of references to the//objects that store queue elements//default constructor//Postcondition: Creates the array of references to the//objects that store queue elements.//maxQueueSize = 100;//count = 0; queueFront = 0;//queueRear = maxQueueSize1;public QueueClass(){maxQueueSize = 100;queueFront = 0;//initialize queueFrontqueueRear = maxQueueSize - 1;//initialize queueRearcount = 0;list = new DataElement[maxQueueSize];//create the array//to implement the queue}//constructor with a parameter//Postcondition: Creates the array of references to the//objects that store queue elements.//maxQueueSize = queueSize;//count = 0; queueFront = 0;//queueRear = maxQueueSize1;//If queueSize <= 0, maxQueueSize = 100;1public QueueClass(int queueSize){if(queueSize <= 0){System.err.println("The size of the array to implement "+ "the queue must be positive.");System.err.println("Creating an array of size 100.");

Answers

(11)
Status NEW Posted 09 May 2017 02:05 AM My Price 8.00

-----------

Not Rated(0)