Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please write it in Java. Thank you. Finish the code below so that it presents a dialog box that asks the user to enter the
Please write it in Java. Thank you.
Finish the code below so that it presents a dialog box that asks the user to enter the amount of a purchase, with a message of the form "How much was your purchase?" You will need to covert the amount entered with the Double.parse Double method., then calculate the amount of tax owed (multiply the user's amount by 0.06 to determine our six percent tax rate). Your program will then present a second dialog box that reports the amount of Michigan sales tax that is owed. The second dialog box will have a message of the form "The tax on that $10.00 purchase is $0.60" (your message should report the values accurately for any amount entered by the user -- it should not always report the tax for $10.00). import javax.swing. Joption Pane; public class Sales Tax public static void main(String[] args) ( 1/ WRITE THE CODE THAT SHOULD GO HEREStep 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