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:When 'Gross Salary' button is clicked, Gross Salary should be calculated and displayed in the respective text field as per the given formula:Gross Salary = Salary+Commission |
|
Answer» Code to calculate and display Gross Salary: int sal,comm; sal = Integer.parseInt(jTextField2.getText()); comm = Integer.parseInt( TextField3.getText()); jTextField4.setText(" " + (sal +comm)); |
|