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

  Common to perform loops that vary the loop control

When an application contains an array and you want to use every element of the array in some task, it is common to perform loops that vary the loop control variable from 0 to one less than the size of the array.

  Java gui application

Assume the existence of the following Java GUI application. There are two text fields for user input. The first JTextField variable is named radius and is used to input a radius value.

  Develop a java based gui application

Develop a Java based GUI application(using swing) that allows the user to enter Charity/Fund information and display them in a JTable

  Write a java gui application index2 java

Write a Java GUI application Index2.java based on the program in Step 1 that inputs several lines of text and uses String method indexOf to determine the total number of occurrences of each letter of the alphabet in the text

  Write a program to test your class myrectangle.

Compile and run your program until it works and the output looks nice. Add the necessary documentation as described in Course Documents, and then attach your .java file to this assignment. Do not attach the .class file, attach only the .java sourc..

  Write a program that evaluates the day of the week for new

write a program that evaluates the day of the week for new years day in the year 3000. to do this you must create your

  Write a void function this passed three integers

1. Write a void function this passed three integers by reference. The function should rearrange the parameter values so that the first parameter will get the smallest value; the second parameter the middle value; and the third parameter the largest v..

  Computing the time complexity using the big-o notation

You are required to calculate the time complexity using the big-O notation of the Algorithm_2 given by the following methods defined by the following Java code.

  Create a controller class that implements an fcfs schedule

Create a controller class that implements an FCFS schedule and instantiates 5 objects of each class and runs each object - write to the system out a number of times.

  Create servlet that display form when doget method is invoke

Create a Servlet that displays a form when the doGet method is invoked. The form will contain a post action that directs the form post back to the same servlet, which in doPost method will append the form data to a random access file.

  Inheritance involves the concept of super class

Inheritance involves the concept of super class (parent class) and sub class (derived class). What is a super class in Java? What is a sub or derived class in Java?

  This is a client server monitoring system project

this is a client server monitoring system project design.first in the server side the 1a program is my own and i have

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