Question: reate a NetBeans project named WeekI ILab Yourld. Include the following interfaces and classes Interface Measurable, as defined in your lecture - Class Data, as
reate a NetBeans project named WeekI ILab Yourld. Include the following interfaces and classes Interface Measurable, as defined in your lecture - Class Data, as defined in your lecture Add to your Data class two more methods: o A static method max to get the Measurable object with the largest measure in an array of Measurable objects o A static method min to get the Measurable object with the smallest measure in an array of Measurable objects Class Item that defines an item in terms of its ID, name, price and quantity. Include the following for this class o A constructor to initialize an item data o Get methods for all item data o Set methods for all item data o toString method that returns an Item object information as shown in the sample run. o Item class should implement interface Measurable o Item class should implement interface Comparable Class Shop that maintains a shop catalog as an array of Items, catalog capacity and catalog current size. Include the following for this class: A constructor to construct the catalog array for a given capacity, and initialize the capacity and the current size o A method to add an item to the catalog given item information(i.e.id, name,price,quantity o A method to add get an item in the catalog given its index o A method to get the most expensive item using method Data.max(.). o A method to get the cheapest item using method Data.min) o A method to sort catalog items using Arrays.sort(...) o toString method that returns an Item object information as shown in the sample rurn o A method that returns the capacity of the catalog o A method that returns the size of the catalog o A method that returns a boolean value indicating if the catalog is full or not Class Gift Shop application that creates a Shop object, prompts the user to enter item information and add therm to the shop object. Then it prints the current items in the shop catalog in a sorted form. It also prints the most expensive item and the cheapest item. (See the sample run) reate a NetBeans project named WeekI ILab Yourld. Include the following interfaces and classes Interface Measurable, as defined in your lecture - Class Data, as defined in your lecture Add to your Data class two more methods: o A static method max to get the Measurable object with the largest measure in an array of Measurable objects o A static method min to get the Measurable object with the smallest measure in an array of Measurable objects Class Item that defines an item in terms of its ID, name, price and quantity. Include the following for this class o A constructor to initialize an item data o Get methods for all item data o Set methods for all item data o toString method that returns an Item object information as shown in the sample run. o Item class should implement interface Measurable o Item class should implement interface Comparable Class Shop that maintains a shop catalog as an array of Items, catalog capacity and catalog current size. Include the following for this class: A constructor to construct the catalog array for a given capacity, and initialize the capacity and the current size o A method to add an item to the catalog given item information(i.e.id, name,price,quantity o A method to add get an item in the catalog given its index o A method to get the most expensive item using method Data.max(.). o A method to get the cheapest item using method Data.min) o A method to sort catalog items using Arrays.sort(...) o toString method that returns an Item object information as shown in the sample rurn o A method that returns the capacity of the catalog o A method that returns the size of the catalog o A method that returns a boolean value indicating if the catalog is full or not Class Gift Shop application that creates a Shop object, prompts the user to enter item information and add therm to the shop object. Then it prints the current items in the shop catalog in a sorted form. It also prints the most expensive item and the cheapest item. (See the sample run)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
