Question: in java Write a method called cleanQueue to be in a class called Queue App and has two parameters q1 and q2 of type ArrayQueue.
in java
Write a method called cleanQueue to be in a class called Queue App and has two parameters q1 and q2 of type ArrayQueue. The q1 data is of type integer, and q2 data is of type character. The method will remove from q1 those elements for which the corresponding elements of q2 are 'X'. It returns the number of elements removed from 21. Assume q1 and 42 have the same number of elements. Class ArrayQueue and all its methods, including iterator, are available for use. You can also create temporary queues. You are not allowed to use arrays. Example: Before the method call: rear front q1: 4 55 42: X E 6 2 9 54 90 12 89 X S B X X B G After method call: front rear
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
