Question: This file will be the main module that holds the main program. The purpose of this file is to test the implementation of the class.

This file will be the main module that holds the main program. The purpose of this file is to test the implementation of the class.
In the main module, write 3 lines of code that creates three InventoryItem objects with the following information:
Item Name Item Count Unit Cost Category
Python for All 1012.95 Book
Barbie 156.95 DVD
Uno 324.50 Game
HINTS:
o The program will be using 3 assignment statements.
o Each assignment statement will reference the class.
o The values from the table should be passed in when each object is created so the three objects represent the data from the table.
Print the 3 objects that were created by printing the objects directly. That means to not explicitly call __str__() but to just print the object.
After printing the 3 objects from the table, create one additional InventoryItem object with no fixed data.
For this additional InventoryItem object, use the method you created to ask the user for the item's information.
After creating this object from the user input, print that object directly.
Sample output:
Python for All
Count: 10, Cost: 12.95
Book
Barbie
Count: 15, Cost: 6.95
DVD
Uno
Count: 32, Cost: 4.50
Game
Enter the item name: Advanced Python
Enter the item count: 15
Enter the unit cost: 23.90
Enter the category: Book
Advanced Python
Count: 15, Cost: 23.90
Book

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