Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Zinnformatics Products, Inc. is selling a web-design software package that retails for $99.00. Quantity discounts are given according to the following table: Quantity 10-19
Zinnformatics Products, Inc. is selling a web-design software package that retails for $99.00. Quantity discounts are given according to the following table: Quantity 10-19 20-49 50-99 100 or more Discount 20% 30% 40% 50% Write a Java program that performs the following tasks: Have the user input the company name. Have the user input the number of packages that they would like to order. Output a final "invoice" through a message box, using the format indicated in the sample below: 0 Thank you for your order Great Neck South High School! You have ordered 40 packages, at a 30 % discount. Your final cost will be $2772.00. Note: Keep in mind that the dollar value should be formatted, according to the above example. Your program must contain methods with the following signatures: public static double zinnformatics (int quantity) //returns cost public static double discount (int quantity) //return decimal value, not percent For Zinnformatics, the discount method returns the discount as a decimal value based upon the quantity (in other words, 0.2 instead of 20%). The zinnformatics method returns the total cost (based upon quantity and discount). Neither method returns a String. Sample run: Input What is the name of your company? APPLESAUCE Cancel Input Message How many packages would you like to order? 12 OK Cancel OK Thank you for your order APPLESAUCE. You ordered 12 packages at a 20.0% discount. Your final cost will be $950.40 OK
Step by Step Solution
There are 3 Steps involved in it
Step: 1
STEP BY STEP CODE import javautil class Hello ...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