Starting from:

$25

Part 1 and 2 Solution

This assignment consists of two (2) sections:

· Java program file(s)

· A screenshot of the execution and source code of your Java program

Label each file name according to the section of the assignment for which it is written. Put both sections together in a single zip file, and submit the file.

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 (The interface should look like the image shown below):





This assignment consists of two (2) sections:

· Java program file(s)

· A screenshot of the execution and source code of your Java program

Label each file name according to the section of the assignment for which it is written. Put both sections together in a single zip file, and submit the file.

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 (The interface should look like the image shown below):



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.

Section 2: Screenshot of the Execution of the Implementation

· Create a screenshot of the execution and include a copy of source code of the implementation.

· Create a screenshot of the execution of the implementation of your Java program. Note: Click here if you need a tutorial on taking a screenshot.

· Submit a copy of source code of the implementation.

Section 1 and Section 2 will be graded based on the following:

1. The program must compile, execute, produce correct results, and meet all of the specifications stated in Section 1. Additionally, you must:

2. Organize the code for user readability.

3. Organize the code for reusability.

4. Organize the code for efficiency.

5. Provide documentation with embedded comments for reader understanding.

The specific course learning outcomes associated with this assignment are:

· Compare and contrast abstract and concrete data types.

· Apply the Java concepts of file input / output.

· Design programs that handle events from user-interface components.

· Use technology and information resources to research issues in Java programing.



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.

Section 2: Screenshot of the Execution of the Implementation

· Create a screenshot of the execution and include a copy of source code of the implementation.

· Create a screenshot of the execution of the implementation of your Java program. Note: Click here if you need a tutorial on taking a screenshot.

· Submit a copy of source code of the implementation.

Section 1 and Section 2 will be graded based on the following:

1. The program must compile, execute, produce correct results, and meet all of the specifications stated in Section 1. Additionally, you must:

2. Organize the code for user readability.

3. Organize the code for reusability.

4. Organize the code for efficiency.

5. Provide documentation with embedded comments for reader understanding.

The specific course learning outcomes associated with this assignment are:

· Compare and contrast abstract and concrete data types.

· Apply the Java concepts of file input / output.

· Design programs that handle events from user-interface components.

· Use technology and information resources to research issues in Java programing.

More products