What you need for recording and displaying the details


Assignment

Classes and Object - Inventory Item as Object

In this assignment the idea is to use an Item class to capture what you need for recording and displaying the details of an order from an online store like Amazon. This is a Class and Object assignment.

For the assignment you must define and implement the Item class so that the code shown immediately below can produce the result shown below that. You will need to define the four private variables of the Item class for the price, weightInOunces , description, and quantity.

You are to include a constructor (__init__), that takes three input parameters for the price, weightInOunces, and description, but not quantity which should be set to a default value of 1

You will also need to create the remaining methods that are used in the code below the gets and sets. The contents of the main function and the output are shown below. Copy, and do not change, the code below. Pay close attention to the values in the output. If you do not match the details correctly, some of your values will not be the same as those shown. (Hint: There's a reason that the getOrderPrice() method is not called getPrice() and in the example it affects the order for glasses.) Name your main file youOrderReceipt.py, e.g. AjoyOrderReceipt.py.

Part B:

Create a second main file youOrderReceiptArray.py e.g. AjoyOrderReceiptArray.

Using anlist of item objects, instead of item1, item2, etc. Put item1 item2, item3 and item4 in the list.For each item in the list call __str__() and Use the list and the for loop to find the dTotalPrice and iTotalWeight as in part A.

The response should include a reference list. Double-space, using Times New Roman 12 pnt font, one-inch margins, and APA style of writing and citations.

Attachment:- Python-Assignment.rar

Solution Preview :

Prepared by a verified Expert
Python Programming: What you need for recording and displaying the details
Reference No:- TGS02952335

Now Priced at $70 (50% Discount)

Recommended (93%)

Rated (4.5/5)