Question
Develop an application that should accept the details of the item like; the name of item ordered, quantity and unit price; from the user as
Develop an application that should accept the details of the item like; the name of item ordered, quantity and unit price; from the user as long as user has more items to order. Then it should compute charges for each ordered item (i.e. multiply quantity and unit price), the sub-total of the order (adding the charges of all the items), and the tax. The tax should be 13% of the sub-total. Display the bill for the customer with the name of store, date of sale, details of all the items, sub-total, taxes and net total (sub-total plus taxes) on the screen.Your solution should:
Create and use an item class where
oShould have proper attributes for an item
oItem class should have set methods for its instance variables and set the data only if is valid otherwise not
oItem class should have get methods for its instance variables
oItem class should have method to get item charges
oItem class should provide possible constructors
oValidate an item price to be greater than 0
oValidate an item quantity to be from 1 to 10
Provide validation for numeric values i.e. item ordered should be more than 0 and at the most, price of the item should be more than 0
Continue to accept the information till valid data is not entered.
Display the result in the proper format
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