0% found this document useful (0 votes)
16 views1 page

Java App for Customer Data Management

This document provides instructions to create a Java desktop application with two JPanels. JPanel1 contains radio buttons to select a shape (circle, rectangle, or square). JPanel2 contains checkboxes to select calculations (area, perimeter, circumference). The code should show/hide fields based on shape selection and perform calculations when a calculate button is clicked, then exit when an exit button is clicked. It also provides SQL commands to create a CUSTOMER table, insert sample records, update names, and add an email column.

Uploaded by

Swastik Tripathi
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views1 page

Java App for Customer Data Management

This document provides instructions to create a Java desktop application with two JPanels. JPanel1 contains radio buttons to select a shape (circle, rectangle, or square). JPanel2 contains checkboxes to select calculations (area, perimeter, circumference). The code should show/hide fields based on shape selection and perform calculations when a calculate button is clicked, then exit when an exit button is clicked. It also provides SQL commands to create a CUSTOMER table, insert sample records, update names, and add an email column.

Uploaded by

Swastik Tripathi
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Q1.

Create a Java Desktop application to find the area of circle, rectangle, circumference of
circle and area of square. Design the IDE and programming logic with two JPanel containers
contains the following
- JPanel1. Add three JRadioButtons and set the buttons as : Circle, Rectangle and Square
- JPanel2. Add four JCheckBoxes and set the buttons as :Area, Perimeter, Circumference

When you select an option from JPanel1, it automatically hide the facilities which is not
appropriate for
selected option. Similarly, apply the same for JTextfield controls also.
(i)Write the code for circle JRadioButton to make available the display controls which are
appropriate for Circle operation.
(ii)Write the code for Rectangle JRadioButton to make available the display controls which are
appropriate for Rectangle operation.
(iii)Write the code for Square JRadioButton to make available the display controls which are
appropriate for Square operation.
(iv)Write the code for Calculate button to calculate the desired operations which you choose
from JRadioButtons.
(v)Write the code for Exit button to exit application.

Q2. Write and Execute the SQL command for the following
1. Create table CUSTOMER as per following Table structure.
Column Name CustID CustName CustAdd CustCity CustPhone
Data Type NUMBER VARCHAR VARCHAR VARCHAR VARCHAR
Length 7 30 40 30 10
Constraints Primary Not Null

2. Insert 5 records with relevant information in the Customer table.


3. Update all the records as add ‘Mr.’ with CustName.
4. Add one column Email of data type VARCHAR and size 30 to table Customer.

You might also like