Question: In the retail store scenario, let's look at the portion of customer purchasing items from the retail store. Write a python program to implement the

In the retail store scenario, let's look at the portion of customer purchasing items from the retail store. Write a python program to implement the class diagram given below.Class Description: Bill class:Initialize static variable counter to 1000generate_bill_amount(item_quantity,items): Calculate bill amount based on the items purchased by the customerAccept a dictionary, item_quantity which contains the item id (key) of the items purchased along with the quantity (value)Accept a list, items which contains the list of Item objects available in the storeGenerate bill id starting from 1001 prefixed by "B" and initialize attribute, bill_id. Ex."B1001","B1002" etc.Calculate bill amount based on the quantity and price of the items purchased by the customerSet attribute, bill_amount with the calculated bill amountAssume that values in item_quantity and items are always valid. Customer class:pays_bill(bill): Pay bill based on the bill amountAccept Bill object which contains the details of the bill to be paid by the customerUpdate attribute, payment_status to "Paid"Display customer name, bill id and bill amountNote: Perform case insensitive string comparisonFor testing:Create objects of Customer class, Item class and Bill classInvoke generate_bill_amount(item_quantity,items) on Bill object by passing the dictionary containing item_id and quantity of items purchased by the Customer and list of Item objectsInvoke pays_bill() on Customer object by passing the Bill object

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 Programming Questions!