Question: [10] In this problem, you will design the data structure for implementing an ADT called SHOPPING-SET. Below is the description of the ADT Objects: A
![[10] In this problem, you will design the data structure for](https://s3.amazonaws.com/si.experts.images/answers/2024/08/66cc8c58672d9_30366cc8c57dbb62.jpg)

[10] In this problem, you will design the data structure for implementing an ADT called SHOPPING-SET. Below is the description of the ADT Objects: A collection of items objects for sale. Each item object obj has the following attributes: obj.name: a string which is the name of the item. Each item has a unique name, i.e., no two items have the . obj.price: a decimal value such as 12.99. For simplicity, assume that the each item's price is unique, i.e., no . obj.rating: a decimal value between 0.0 and 5.0, e.g., 0.012, 3.1415926. For simplicity, assume that each same name. two items have the same price. item's rating value is unique, i.e., no two items have the same rating value. Operations: GET-ITEM(S, name): returns the item object with name name if it exists in the SHOPPING-SET S; returns NIL if the item does not exist in S. [10] In this problem, you will design the data structure for implementing an ADT called SHOPPING-SET. Below is the description of the ADT Objects: A collection of items objects for sale. Each item object obj has the following attributes: obj.name: a string which is the name of the item. Each item has a unique name, i.e., no two items have the . obj.price: a decimal value such as 12.99. For simplicity, assume that the each item's price is unique, i.e., no . obj.rating: a decimal value between 0.0 and 5.0, e.g., 0.012, 3.1415926. For simplicity, assume that each same name. two items have the same price. item's rating value is unique, i.e., no two items have the same rating value. Operations: GET-ITEM(S, name): returns the item object with name name if it exists in the SHOPPING-SET S; returns NIL if the item does not exist in S
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
