Question: (JAVA) Write a Cookie class, where each cookie has an id number, flavor name and price. Construct all the needed accessor methods and mutator methods.
(JAVA) Write a Cookie class, where each cookie has an id number, flavor name and price. Construct all the needed accessor methods and mutator methods. Write a program that will construct an array of Cookie objects (size 10 and instantiate every object), implement a method that will take the array as input and return the cookie id and flavor of the cookie with the highest price.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
