0% found this document useful (0 votes)
17 views3 pages

PQ 1 Switchst

Uploaded by

Eshu Jain
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)
17 views3 pages

PQ 1 Switchst

Uploaded by

Eshu Jain
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
You are on page 1/ 3

{

double billamount=0;

double gstamount=0;

double billpayable=0;

billamount=Double.parseDouble(jTextField1.getText());

switch(jComboBox1.getSelectedIndex())

case 0:gstamount=billamount+billamount*0.88;

break;

case 1:gstamount=billamount+billamount*0.90;

break;

case 2:gstamount=billamount+billamount*0.95;

break;

case 3:gstamount=billamount+billamount*0.97;

break;

case 4:gstamount=billamount;

break;

default:gstamount=billamount;

}
jLabel5.setText(Double.toString(gstamount));

billamount=Double.parseDouble(jTextField1.getText());

gstamount=Double.parseDouble(jLabel5.getText());

switch(jComboBox1.getSelectedIndex())

case 0:billpayable=billamount+gstamount;

break;

case 1:billpayable=billamount+gstamount;

break;

case 2:billpayable=billamount+gstamount;

break;

case 3:billpayable=billamount+gstamount;

break;

case 4:billpayable=billamount+gstamount;

break;

default:billpayable=billamount+gstamount;

jLabel6.setText(Double.toString(billpayable))

You might also like