Dear Students these are the following practice questions. please solve them and paste this assignment in your registers.
private void
jButton4ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
String msg1="";
int n=0;
msg1=jTextField1.getText()+"
";
if(jCheckBox1.isSelected())
{
msg1=msg1+"Passport Copy,
";
n++;
}
if(jCheckBox2.isSelected())
{
msg1=msg1+"Driving Licence
Copy, ";
n++;
}
if(jCheckBox3.isSelected())
{
msg1=msg1+"Aadhar Card Copy
";
n++;
}
if(n==0)
jTextArea1.setText(msg1+"
pl.submit any of the 3 documents\n"
+ "to process the
loan.");
else
jTextArea1.setText(msg1+ "
submitted. your loan is processed.");
}
private void
jButton3ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
System.exit(0);
}
private void
jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
int
t=0, r=0;
double dis=0,
rate=0,amt=0,payamt=0,instal=0;
amt=Double.parseDouble(jTextField2.getText());
if(jRadioButton4.isSelected())
{
dis=amt*2/100;
jTextField5.setText("2%");
}
else if(jRadioButton5.isSelected())
{
dis=0;
jTextField5.setText("No
discount");
}
if(jComboBox1.getSelectedIndex()==0)
{
rate=8;
jTextField6.setText("8%");
}
else
if(jComboBox1.getSelectedIndex()==1)
{
rate=10;
jTextField6.setText("10%");
}
else
if(jComboBox1.getSelectedIndex()==2)
{
rate=12;
jTextField6.setText("12%");
}
else
JOptionPane.showMessageDialog(null,"Please select the type of
Loan");
if(jRadioButton1.isSelected())
t=5;
else if(jRadioButton2.isSelected())
t=10;
else if(jRadioButton3.isSelected())
t=15;
else
JOptionPane.showMessageDialog(null,"Please select the time");
amt=amt-dis;
//jTextField7.setText(""+amt);
//payamt=amt*Math.pow(r,t);
payamt=amt+(amt*rate*t)/100;
jTextField3.setText(""+payamt);
r=0;
r=t*12;
instal=payamt/r;
jTextField4.setText(""+instal);
}
No comments:
Post a Comment