[SOLVED] SOLVED:CS 121 01 Programming Assignment 04 Chapter 10

15.00 $

Programming resource
Digital learning resource
Category:
Practical programming resource
Suitable for guided study and reference
Tutor guidance available when needed

Description

5/5 - (1 vote)

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, units in inventory, and price. Be sure to include all necessary methods – __init__, __str__, accessors and mutators. Also, create a method that asks the user for a discount percentage and returns the sales price.
Next, write a program that uses the RetailItem class. Open the file retail.txt located in the I:\kopp\outbox\CS 121 01\Program Assignments\Chapter 10 folder. The data in this file is in the following format: itemDescription,units,priceThe program should create an object of RetailItem for each line of data in the file and store these in a list. The program should then ask the user which item they want to purchase (description) and if the item is on sale. The program should display the object’s data, whether or not the item is on sale, and what the new sale price is.

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.