Question: c) Given the shoes and Queue ADTS: public class Shoes{ String type; String style; int size; //boots, sneakers, sandals //formal, casual //4, 5, 6,
c) Given the shoes and Queue ADTS: public class Shoes{ String type; String style; int size; //boots, sneakers, sandals //formal, casual //4, 5, 6, 7, 8 double price; //normal constructor //accessors: getType(), getStyle(), getSize(), getPrice() //toString() public class Queue public void enqueue (Object elem) () public Object dequeue () 0 public boolean isEmpty() {} // definition of other methods Assume that a queue named shoeQ has been inserted with 10 shoes information, write a program that perform the following tasks: i) Move all formal shoes into a queue named formal and casual shoes into a queue named casualQ. ii) (3 marks) Determine whether the number of formal shoes are more than the number of casual shoes. Display the appropriate message. (3 marks) Determine and display the biggest size available for formal shoes in formal. (4 marks)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
