Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem: Haggling ElectronicsHaggling Electronics is a new store that just opened where customers can haggle to get the best deal possible for each item they

Problem: Haggling ElectronicsHaggling Electronics is a new store that just opened where customers can haggle to get the best deal possible for each item they buy.The owner of the store, which just opened this year, heard you are taking a course on foundations in computing, and asks you to assist with some inquiries they have.The store sells electronics and they have the list of all items they sell in a file calledtransactions_Products.csvwhere each line in the file consists of product ID, name of the product and price per unit in dollars separated by a comma. The first line of this file is the header of the three columns mentioned above respectively. Here is a sample from the file:transactions_Products.csvProduct_ID,Product_Name,PriceP1,2-in-1 Laptop,1500P2,Game Laptop,2000P3,Titan Laptop,2100 Each time a customer comes to the store they can haggle and obtain a special discount.The store keeps another file calledtransactions_Sales.csvto record transactions. Each line in this file consists of the transaction ID, a date for the transaction, a product ID, the number of items, and the obtained percentage of discount after haggling, all separated by a comma. The first line of this file is the header of these five columns. Here is a sample from the file:transactions_Sales.csvtransaction_id,date,product_id,quantity,discount1,1/2/2024,P10,1,0.032,1/2/2024,P1,2,0.133,1/2/2024,P15,2,0.13 The store has a policy of full refund if a purchased item is returned. In this case, all items under the transaction ID are returned, meaning the entire transaction is cancelled and refunded. To keep track of the returns, the store keeps a third file calledtransactions_Returns.csv. Each line in this file consists of the transaction ID that was cancelled, and the date of the return, separated by a comma. The first line of this file is the header of these two columns. Here is a sample of the file:transactions_Returns.csvtransaction_id,date12,1/3/202423,1/3/202455,1/3/2024 The owner of\table[[Product_ID,Product_Name,Price],[P1,2-in-1 Laptop,1500],[P2,Game Laptop,2000],[P3,Titan Laptop,2100],[P4,Folding Smartphone,500],[P5,Smart Smartphone,800],[P6,T headphones,100],[P7,Cordless Headphones,110],[P8,13' Tablet,300],[P9,e-ink Tablet,300],[P10,10' Tablet,200],[P11,Colour Printer,200],[P12,Laser Printer,250],[P13,Mega MP3,100],[P14,Flat screen,200],[P15,Gaming Monitor,250]]
\table[[transaction_id,date],[12,20241?3
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

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

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

More Books

Students also viewed these Databases questions