Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need table ( test case , purpose , expected result ) Task 1 . 2 . Implementation of the class using python language. Write
I need table test case purpose expected result
Task Implementation of the class using python language.
Write a program called StockedItem with main method to test the IteminStock class.
PartI
Only of your total course grade
Capital Computer store in Oman sells different electronics products such as Computers, Laptops and accessories. The store Management requires an automated software to keep track of items in stock and prices. You as a software designer and developer are asked to develop a system for the store.
The first task you should carry out is to design and code a class related to stocked Items. You can name this class as IteminStock.
The class should consist of the following:
A data member Itemcode to store an item code eg C a data member to store item name, a data member to store item description, a data member to store quantity of items in stock and a data member itemprice to store price of an item. You must use the appropriate data types and access specifier for each data member.
An addItem method to add items in stock with a check that item stock does not exceed An appropriate message should be displayed if inserted item exceeds the limit
An itemSell member method to sell items, method should ask for quantity of selling item and then reduces the stock level accordingly.
A taxonItem method gives tax on items Tax is fixed at
A method to set item price without tax and get method to get item price both with and without tax
A method named getItemDetails that provides Item code, Item Category, Item name, Item description, quantity in stock, and price with and without tax.
Testing is an integral part of development. Write suitable test cases in the given format below for your class.
tableTost Case,Purpesc,Expoctod rosul
Example OUTPUT:
Adding more items
Item Details:
Item Code:
Item Name: Laptop
Item Description: Highperformance laptop
Quantity in Stock:
Price with Tax:
Price without Tax:
items added to stock.
Enter the quantity to sell:
items sold.
Updated Item Details:
Item Code:
Item Name: Laptop
Item Description: Highperformance laptop
Quantity in Stock:
Price with Tax:
Price without Tax:
Adding more Items
The error. Item stock must not exceed items
Item Details:
Item Code:
Item Name: Laptop
Item Description: Highperformance laptop
Quantity in Stock:
Price with Tax:
Price without Tax:
items added to stock.
Enter the quantity to sell:
Error: Insufficient stock to fulfill the sale. Updated Item Details:
Item Code:
Item Name: Laptop
Item Description: Highperformance laptop
Quantity in Stock:
Price with Tax:
Price without Tax: suolition pls
PartI
Only of your total course grade
Capital Computer store in Oman sells different electronics products such as Computers, Laptops and accessories.
The store Management requires an automated software to keep track of items in stock and prices. You as a software designer and developer are asked to develop a system for the store.
The first task you should carry out is to design and code a class related to stocked Items. You can name this class as IteminStock.
The class should consist of the following:
A data member Itemcode to store an item code eg a data member to store item name, a data member to store item description, a data member to store quantity of items in stock and a data member itemprice to store price of an item. You must use the appropriate data types and access specifier for each data member.
An addItem method to add items in stock with a check that item stock does not exceed An appropriate message should be displayed if inserted item exceeds the limit
An itemSell member method to sell items, method should ask for quantity of selling item and then reduces the stock level accordingly.
A taxonItem method gives tax on items Tax is fixed at
A method to set item price without tax and get method to get item price both with and without tax
A method named getItemDetails that provides Item code, Item Category, Item name, Item description, quantity in stock, and price with and without tax.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started