Question
Java programming(Please use dialog boxes for input and output. JOptionPane) Your company is selling product items at $100 each. The cost to customers then is
Java programming(Please use dialog boxes for input and output. JOptionPane)
Your company is selling product items at $100 each. The cost to customers then is simply the product of the number of items they purchase multiplied by this unit cost.
However, users can receive a volume discount using the following rules:
if the customer purchases... then their discount is
10-19 items $100
20-49 items $300
50-100 items $500
over 100 items $1000
Write a Java program that receives the numbe of items a user wishes to purchase and returns their totl cost( including the base cost minus the discount).
Include error-checking in the form of a while loop to validate that the number of items read in is in range of 0...200. Otherwise, "trap" the user in the loop until they produce an input vslue in the correct range.
Utilize dialog bix input and output exclusively for the user interface
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