Answered You can hire a professional tutor to get the answer.
How do I incorporate a selective statement in the code below?
How do I incorporate a selective statement in the code below?
Clarification
- Demonstrate your understanding of GUI.
- Use selection and repetition statements in this program.
import java.text.DecimalFormat;
import javax.swing.JOptionPane;
public class module3case {
public static void main(String[] args) {
String choice = null;
do {
DecimalFormat formatter = new DecimalFormat("#,##0.00");
double propertyTaxRate;
double actualValue;
double assessmentValue;
double tax;
actualValue = Double.valueOf(JOptionPane.showInputDialog("What is the value of your property?"));
propertyTaxRate = Double.valueOf(JOptionPane.showInputDialog("What is the property tax of the locality?"));
tax = actualValue * propertyTaxRate/100;
assessmentValue = actualValue +tax;
JOptionPane.showMessageDialog(null, "Your assessment value is $"
+ formatter.format(assessmentValue)+"n"
+"The local real estate property tax rate: "+propertyTaxRate+"n"
+ "Property tax based on the assessment is $"
+ formatter.format(tax) + ".");
choice =JOptionPane.showInputDialog("Press E to terminate the program ");
}while(!"E".equalsIgnoreCase(choice));
}
}