This assignment is a modification of Assignment 1. The main difference is that instead of using the System.in.* and System.out.* methods, your will be using the JOptionPane class for all the inputs / outputs. Section 1: Java Program File(s) Modify the Java program that you created from Assignment 1. According to your design, the program must: •Use the JOptionPane class to create a driver program to test your Assignment 1 InsuranceAgentApp Java application. •Display a new driver test program’s user interface Insurance Agent App The new driver test program’s user interface from Question 1b must: •Include a loop to display the user interface until the user clicks the Quit button. •Instantiate a PropertyInsurance object and use the JOptionPane.showInputDialog() method to capture the type and riskAmount when the user clicks the Property button. •Instantiate an AutomobileInsurance object and use the JOptionPane.showInputDialog() method to capture the type and riskAmount when the user clicks the Automobile button. •Instantiate a TravelInsurance object and use the JOptionPane.showInputDialog() method to capture the type and riskAmount when the user clicks the Travel button. •Display the quote (totalPremium in the InsuranceAgentApp class) when the user clicks the “Get a Quote” button. •End when the user clicks the “Quit” button.

This assignment builds upon Assignment 1 and introduces the use of JOptionPane class for all inputs and outputs, replacing the System.in.* and System.out.* methods. The objective is to modify the Java program created in Assignment 1 to meet the following requirements:

1. Use the JOptionPane class to create a driver program that will test the InsuranceAgentApp Java application.

2. The driver program’s user interface should be labeled as “Insurance Agent App”.

3. The user interface should be displayed in a loop until the Quit button is clicked by the user.

4. When the Property button is clicked, the driver program should instantiate a PropertyInsurance object and use the JOptionPane.showInputDialog() method to capture the type and riskAmount.

5. When the Automobile button is clicked, the driver program should instantiate an AutomobileInsurance object and use the JOptionPane.showInputDialog() method to capture the type and riskAmount.

6. When the Travel button is clicked, the driver program should instantiate a TravelInsurance object and use the JOptionPane.showInputDialog() method to capture the type and riskAmount.

7. When the “Get a Quote” button is clicked, the driver program should display the quote, which is the totalPremium in the InsuranceAgentApp class.

8. The program should end when the Quit button is clicked by the user.

In summary, the main focus of this modification is to implement a driver program using the JOptionPane class to interact with the user and instantiate the appropriate insurance objects based on the buttons clicked. The program will continue to display the user interface until the Quit button is clicked, and will provide a quote when the “Get a Quote” button is clicked.

This assignment aims to enhance the user experience by using a more user-friendly interface through the JOptionPane class. By making these modifications, the program will be more intuitive and interactive, allowing the user to easily navigate through the options and obtain a quote for their desired insurance type.

Need your ASSIGNMENT done? Use our paper writing service to score better and meet your deadline.


Click Here to Make an Order Click Here to Hire a Writer