Question: c) Given the Shoes and Queue ADTS: public class Shoes{ size; String type; //boots, sneakers, sandals String style; //formal, casual int //4, 5, 6,
c) Given the Shoes and Queue ADTS: public class Shoes{ size; String type; //boots, sneakers, sandals String style; //formal, casual int //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 () {} boolean isEmpty() () of other methods public // definition } (5 marks) 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 formalQ and casual shoes into a queue named casualQ. ii) Determine whether the number of formal shoes are more than the number of casual shoes. Display the appropriate message. ii) Determine and display the biggest size available for formal shoes in formal.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
