John works in the customer service department. He is assigned a task where he has to store the details of an item purchased by a customer and produce a bill that holds all the details about the item. John had to manage all the records manually and produce a handwritten bill. It was a very time-consuming task, seeing this his manager reaches the development team to build a code to make john's work easier. imagine you are working in the development team and this task is assigned to you. Write a code that takes all the details of the item and produce the bill with the same details. Create a class Item in ‘Item.py’ with the following attributes. Data type Attribute str item_id str item_name str company_name int price Use _init_() constructor to initialize the variables with respect to class. Method Description display(self) : This method will print the details of the item. Get the input and create an object for ‘Item’ in ‘Main.py’ Input format: The first line of input is an integer indicating item id Followed by the strings indicating item name and company name respectively Followed by the integer indicating the price of the item. Output format: The output should display the details entered by the user. Note: Print the details in Item class and not in the Main class. Refer to sample output for the formatting specifications. Sample Input: AC8142017 Water Bottle Tupperware 280 Sample Output: Item Id: AC8142017 Item Name: Water Bottle Company Name: Tupperware Price of Item: 280 Rs

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

John works in the customer service department. He is assigned a task where he has to store the details of an item purchased by a customer and produce a bill that holds all the details about the item. John had to manage all the records manually and produce a handwritten bill. It was a very time-consuming task, seeing this his manager reaches the development team to build a code to make john's work easier. imagine you are working in the development team and this task is assigned to you. Write a code that takes all the details of the item and produce the bill with the same details.

Create a class Item in ‘Item.py’ with the following attributes.

Data type Attribute
str item_id
str item_name
str company_name
int price

Use _init_() constructor to initialize the variables with respect to class.
Method Description
display(self) :

This method will print the details of the item.

Get the input and create an object for ‘Item’ in ‘Main.py’

Input format:
The first line of input is an integer indicating item id
Followed by the strings indicating item name and company name respectively
Followed by the integer indicating the price of the item.

Output format:
The output should display the details entered by the user.
Note: Print the details in Item class and not in the Main class.

Refer to sample output for the formatting specifications.

Sample Input:
AC8142017
Water Bottle
Tupperware
280

Sample Output:
Item Id: AC8142017
Item Name: Water Bottle
Company Name: Tupperware
Price of Item: 280 Rs

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY