Answer to Question #328096 in Java | JSP | JSF for Hussain

Question #328096

You should create two methods for a data structure implementing a Queue as a



circular array. Your data structure should have the class name MyArrayQueue. The



two methods that should be implemented are:



a) Adding element to the queue:



public void enqueue(Object theElement) {…}



[20 marks]



(Functionality: 15, Design: 2, Ease of use: 2, Presentation: 1)



b) Deleting an element from the queue and return the deleted element:



public Object dequeue() {…}



[10 marks]



(Functionality: 6, Design: 2, Ease of use: 1, Presentation: 1)



In both methods errors should be handled properly. For example what happens



when adding an element to a full queue?



There will be skeleton code for MyArrayQueue available on Learning central that



contains the MyArrayQueue class with the following fully implemented methods:



constructor, isEmpty(), getFrontElement(), getRearElement() methods. It also



includes signatures of two methods that you should implement: enqueue(Object



theElement) & dequeue().

0
Service report
It's been a while since this question is posted here. Still, the answer hasn't been got. Consider converting this question to a fully qualified assignment, and we will try to assist. Please click the link below to proceed: Submit order

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS