Find Us On: Facebook Twitter Rss Feed Blog
Need To Register? Sign Up Login

Java - JInsurance

dickersonka
dickersonka 


Write an application that allows the user to choose insurance options in JCheckBoxes. Use a ButtonGroup to allow the user to select only one of two insurance types—HMO (health maintenance organization) or PPO (preferred provider organization). Use regular (single) JCheckBoxes for dental insurance and vision insurance options; the user can select one option, both options, or neither option. As the user selects each option, display its name and price in a text field; the HMO costs $200 per month, the PPO costs $600 per month, the dental coverage adds $75 per month, and the vision care adds $20 per month. When a user deselects an item, make the text field blank. Save the file as JInsurance.java. Attachments
Tags Clarifications

Answers

Java - JInsurance - Solution

dickersonka
dickersonka 



Attached is the solution to the Java - JInsurance assignment including source and comments Attachments
JInsurance_screenshot.png (10 K) Download Preview

JInsurance.java (2 K) Download Preview
chckbxDental = new JCheckBox("Dental"); private final JCheckBox chckbxVision = new JCheckBox("Vision"); private final JLabel lblAdditionalServiceOptions = new JLabel("Additional Service Options:"); private final JTextField txtOptions = new JTextField(); private final JLabel lblOptions = new JLabel("Options:"); private final JLabel lblTotal = new JLabel("Total:"); private final JTextField

Screenshots
Screenshot
Purchase Answer

JInsurance Project

sudheer488
sudheer488 



Find the output of a program as shown in the screenshots.

Attached the code that exactly works as you mentioned.
Attachments
JInsurance.java (2 K) Download Preview
only"); public JInsurance() { super("Insurance Price Estimator"); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JPanel pane = new JPanel(); ButtonGroup insGroup = new ButtonGroup(); insGroup.add(hmoBox); insGroup.add(ppoBox); pane.add(hmoBox); pane.add(ppoBox); pane.add(additLabel); pane.add(additBox); pane.add(insOptionsLabel); pane.add(optionExplainLabel); pane.add(optionExplainLabel2); pane.add(totPrice); pane.add(message); totPrice.setText("$" + totalPrice); hmoBox.add

1.JPG (24 K) Download Preview

2.JPG (27 K) Download Preview

3.JPG (28 K) Download Preview

Screenshots
Screenshot
Screenshot
Screenshot
Purchase Answer