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.