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

implementing an ADT called SHOPPING-SET. Below is the description of the ADT

[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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!