Write a class named RetailItem that holds data about an item in a retail store. The class should store the following data in attributes: item description, brand, units in inventory, and price. 2. Make sure you have getter and setter methods (accessor and mutator methods) for the class created. 3. The class is to have a method that properly displays object data when/if object is passed to the print function. Hint:__str__ 4. Create a program that creates three RetailItem objects and stores their information. 5. The information for the 3 objects you need to create is listed below: Description Brand Units in Inventory Unit Price Item #1 Jacket REI 12 130.95 Item #2 Designer Jeans Levi 40 34.95 Item #3 Shirt Nike 20 24.95 6. After storing the items as objects, calculate the total price for each item (units x unit price) then display the items as shown in the table above but with an additional column titled “Total Price” that displays the total price the program has calculated for each item. Image below shows how information is to be displayed   PYTHON CODE FULL NO ERRORS

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter10: Introduction To Inheritance
Section: Chapter Questions
Problem 2PE
icon
Related questions
Question

Write a class named RetailItem that holds data about an item
in a retail store. The class should store the following data in
attributes: item description, brand, units in inventory, and price.
2. Make sure you have getter and setter methods (accessor and
mutator methods) for the class created.
3. The class is to have a method that properly displays object data
when/if object is passed to the print function. Hint:__str__
4. Create a program that creates three RetailItem objects and
stores their information.
5. The information for the 3 objects you need to create is listed
below:
Description Brand Units in Inventory Unit Price
Item #1 Jacket REI 12 130.95
Item #2 Designer Jeans Levi 40 34.95
Item #3 Shirt Nike 20 24.95
6. After storing the items as objects, calculate the total price for each
item (units x unit price) then display the items as shown in the
table above but with an additional column titled “Total Price” that
displays the total price the program has calculated for each item.
Image below shows how information is to be displayed

 

PYTHON CODE FULL NO ERRORS

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage