Object-Oriented Programming · Okta · Medium
Requirements You are given an initial set of inventory records, each structured as [shop, cd, price]. A record means that a specific shop stocks a particular CD and sells it for the listed price. Implement the following operations: List search(int cd) — return the IDs of all shops that currently have this CD in stock. The list must be sorted first by ascending price, and then by ascending shop ID when prices are equal. void rent(int shop, int cd) — rent the CD from the given…
Checking your access…