Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Assignment

Your assignment is to create and test a class for a queue of objects. You may use any object class of your choice as the data for the queue. The instances of the class should have at least one field that distinguishes each instance from other instances of the class (key property, also called a key field).

You should complete the software to implement and test your queue and submit the software along with a project report.

Your queue class should maintain a head pointer to the first element in the queue, a tail pointer to the last element in the queue, and the size of the queue as queue properties.

We will add elements to the tail of the queue and remove elements from the head of the queue. The head pointer points to the spot from which elements are deleted from the queue, and the tail pointer points to the end of the queue where elements are added to the queue.

Note that elements move though the queue in the opposite direction of the pointers from one element to the next. Head points to the first element in the queue. Head.next points to the element that will become the head when the head is removed (de-queue method) - the pointers point back in the queue.

You should have methods to:

• instantiate a null queue
• enqueue - add an element to the queue
• dequeue - remove an element from the queue
• size - return the size of the queue
• a boolean isEmpty method

You will need to create a class of nodes for the data in the queue, which we call a queueElement.

Each queueElement should have data and a pointer to the next queueElement.

We need:

• A null constructor (default)
• An initializing constructor (instantiates a queueElement from a data element)

and methods to :

• set the data in a queue element
• return the data in a queue element
• set the pointer to the next element
• return the pointer to the next element

This assignment requires four classes - Queue, QueueElement, the data object class, and a class for your test project. Each class should be a separate file in your NetBeans project, all in the same source directory.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92503621
  • Price:- $25

Priced at Now at $25, Verified Solution

Have any Question?


Related Questions in Computer Engineering

A mixture of 499 mol of n2 and 3090 g of no is heated in a

A mixture of 4.99 mol of N2 and 30.90 g of NO is heated in a closed vessel to 2000 °C. After heating, the total pressure of the mixture at equilibrium is 3.14 atm. N2(g) + O2(g) 2NO(g) Kp= .101 at 2000 C In which directi ...

Tests can determine with some degree of accuracy whether a

Tests can determine, with some degree of accuracy, whether a subject indeed has the disease for which s/he is being tested. For instance, a new screening procedure for heart disease was tested on 100 patients with heart ...

Using the following dataa sex- 7 males 1 female height-

Using the following data, A.) (Sex)- 7 males, 1 female. (Height)- 72,67,72,64,66,68,68,70. (Left or right handed)- 7 right handed, 1 left handed. Let's assume our class is truly representative of the population at large. ...

Select one of the discussion topics and respond begin your

Select one of the discussion topics and respond. Begin your response by indicating which question you chose. Discussion topics: Section 1 Can we distinguish between knowing someone in the sense of knowing the habits or t ...

Why hasnt health care in australia been entirely privatised

Why hasn't health care in Australia been entirely privatised, according to Boxall and Gillespie? Should health care (in Australia) be wholly privatised? Do you think it will be in the future?

Question 1 where to be careful when using cloud services2

Question: 1. Where to be careful when using cloud services? 2. What are those cloud essential characteristics in "The U.S. NIST Definition of Cloud Computing"? The response must be typed, single spaced, must be in times ...

Computer sciencewhat is required of an organization to

Computer Science What is required of an organization, to implement and maintain IT Governance? What outside resources are available to assist technology managers in the implementation and maintenance process?

Give examples of how dominos has adapted its global

Give examples of how Domino's has adapted its global marketing mix to meet the needs of local consumers. Are you their customer? If so, why?

Suppose i the cable company represents the channels your tv

Suppose I the cable company represents the channels your TV has access to with a 64- bit integer. Each channel from 0 to 63 is represented by one bit, where 1 means the channel is enabled and 0 means the channel is disab ...

Part 1whats the importance of a documentation plan please

Part 1: What's the importance of a Documentation Plan? Please provide an example of a Documentation Plan that you would use. Part 2: How do you calculate how long a project will take? These questions are for my Introduct ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As