InterviewSolution
Saved Bookmarks
| 1. |
Mr. Pawan works as a Programmer in "ABC Marketing Company" where he has designed a Salary generator software to generate the salary of salesman in which Name and Salary are entered by the user. A screenshot of the same is shown below :Help him in writing the code to do the following:After selecting appropriate Radio Button, when 'Commission' button is clicked, commission should be displayed in the respective text field as each Salesman will get a commission based on the units sold according to the following criteria:Unit SoldCommission(in Rs)1 to 2050020 to 401000>402000 |
|
Answer» Code to calculate and display commission: int com = 0; if(jRadioButton1.isSelected()) com = 500; else if(jRadioButton2.isselected()) com = 1000; else if(jRadioButton3.isSelected()) com = 2000; iTextField3.setText("" + com); |
|