Design programs that handle events from user-interface

Assignment Help JAVA Programming
Reference no: EM131317864

Assignment

This assignment consists of two 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.

Reference no: EM131317864

Questions Cloud

Projects have positive npv : Consider the following projects, X and Y where the firm can only choose one. Project X costs $600 and has cash flows of $400 in each of the next 2 years. Project Y also costs $600, and generates cash flows of $500 and $275 for the next 2 years, re..
Investment should the firm choose : Project Y also costs $600, and generates cash flows of $500 and $275 for the next 2 years, respectively. Which investment should the firm choose if the cost of capital is 10 percent?
Calculate the times interest earned and comment on results : Calculate the operating ratio and comment on the results.- Calculate the times interest earned and comment on the results.
What elements are necessary for a valid contract to exist : What elements are necessary for a valid contract to exist? Define what constitutes a "valid offer." Evaluate each proposal and discuss whether each of the offers constitutes a valid offer. Why or why not? Each proposal involves a different count..
Design programs that handle events from user-interface : 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.
Expected rate of return on the market : Stock A has a beta of 0.4 and investors expect it to return 5%. Stock B has a beta of 1.6 and investors expect it to return 14%. Use the CAPM to find the market risk premium and the expected rate of return on the market.
Expected rate of return on a security : According to the CAPM, would the expected rate of return on a security with a beta less than zero be more or less than the risk-free interest rate? Why would investors be willing to invest in such a security? (Hint: Look back to the auto and gold ..
Prepare an income statement for jackson construction company : Assuming that the company pays income tax a the 40 percent rate, prepare an income statement for Jackson Construction Company.
Develop and test a small procedural java program : ITECH1000 Programming - develop and test a small application that mimics a fortune teller and tells the user what ‘Federation University' star sign their birth year represents and Identify and use the correct syntax of a common programming language

Reviews

Write a Review

JAVA Programming Questions & Answers

  Write a program to store in a 2-d boolean array

Write a program to store in a 2-D boolean array of size 5 and 10 a true value if a random value is less than 0.5 else false. Print only the indexes of cells with true value.

  Natural sympathies

Discussed the "natural sympathies" and equality that exist between Jane and Mr. Rochester and that challenge the rigid class structure of English society.

  Create a class called point

Create a class called Point that has the following private members: float x - the x-coordinate of the point. float y - the y-coordinate of the point

  How to compile and debug your work

You will be writing a Java program to allow people to play the 24-puzzle (the obvious variant where the frame is 5x5) puzzle) in a text based context. My goal is that you recall how to enter programs (probably using jGrasp), how to write a small/s..

  Use of width and height attributes in an element

Which of the following will occur if you do not use the width and height attributes in an element?

  Class named showstudent that instantiates a student object

Write a class named ShowStudent that instantiates a Student object from th eclass and then display all the vlaues associated with the Student. Save as ShowStudent.java

  Write a java program to simulate a die

Write a Java program to simulate a die. A die has values of either 1, 2, 3, 4, 5 or 6 on the face. You should use the Math.Random() or the java.util.Random() class to generate the values on the die.

  To report the amount of the fine

To report the amount of the fine, which is $25 for the first hour or pan of an hour that the car is illegally parked, plus $10 for every additional hour or part of an hour that the car is illegally parked

  Write a java program that asks the user for his/her gender

According to researchers at Stanford Medical School, the ideal weight for a woman is found by multiplying her height in inches by 3.5 and subtracting 108.

  What is object-oriented programming

What is object-oriented programming? What are the differences between a class and an object

  Write a java program to demonstrate the use of inheritance

Write a Java program to demonstrate the use of inheritance, polymorphism, interfaces and transaction processing. This program will also use the Vector class.

  What are the benefits of using the bean-style accessor

Add a constructor to your preferred version, that takes two String parameters and initializes first and last.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd