Code a queue data structure to store the Grocery, Meat, and Produce object instances created during…

Code a queue data structure to store the Grocery, Meat, and
Produce object instances created during program execution.
Transform your code to use the queue instead of the array. It is
recommended to create a new class file, however, to retain the
prior version of your course project. You can copy your code from
the prior module into your new class file to get started. Leverage
your file-processing code from the prior Module. Include
appropriate package import declarations as needed. Output: to the
console while executing the program: Use System.out.printf to echo
back to the user the data they input once validated. Other console
output as needed. Output: Save to the .txt file: Headings: A
greeting. Your Name. Your Class, Module/Week, and Assignment.
Date/Time stamps. Output generated by polymorphic calls to the
toString() method during queue processing. After the user has
signaled the termination of input and prior to exiting the program,
process the queue by serving its contents and writing them to the
output .txt file using a polymorphic call to the toString() method.
The final totals and average cost.

Grocery – name :String – quantity int cost do ub le -extendedCost double groceryObjectID: int groceryobiectCounter: int totalQuantity: int ExtendedC ub > Grocery() Grocery(name: String, quantity : int, cost double) + setName(name: String): vo id +getName String setQuantity(quantity: int) : void +getQuantity: int + setCost(cost double): void + getCost() double + getExtendedCost() : dou ble +getGroceryOb jectlDO int +getTotalQu antity() int +getTotalExtendedCost :double +getTotalsAndAverage(): String +toStringl): String Meat Produce – co okingTemp: int – co okin gTime String – cooked: boolean Meat > Meat(cookingTemp: int, cookingTime: String, cooked: boolean) + setCookingTemp(cooking Tem p: int) void +getCookingTemp): int + setCookingTime(cooking Time: Strin g) void +getCookingTime(): String + setCooked(cooked: boolean) void +getCooked0 boolean toString0 String – needsPeeling boolean – peeled: boolearn > Produce( Produce(need sPeeling: boolean, peeled: boolean) + setNeedsPeeling(needsPeeling: boolean) + getNeedsPeeling() boolean + setPeeled(peeled: boolean) +getPeeled boolean +toStringl): String