Answered step by step
Verified Expert Solution
Link Copied!

Question

00
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

image text in transcribed

image text in transcribed

[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

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions