Answered step by step
Verified Expert Solution
Question
1 Approved Answer
[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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started