Obtain principal amount and time and then calculate simple interest as per following specification if the principal is greater than or more than Rs. 10000the rate of interest is 6% otherwise it is 5%
Hi Friends welcome to The Enchanting Team and in this blog I am going to show you How to Make a program to get simple Interest as per following specification if the principal is greater than or more than Rs. 10000, then the rate of interest is 6 % otherwise it is 5 %. So Lets Begin........... 1.First of all design a layout of your program like this........ 2. Now by Double clicking on the Calculate Button. You will enter to the backend of your program. And then enter this code after the line // TO DO ADD YOUR HANDLING CODE HERE. double principal, time, rate; String txt = PrincipalTF.getText(); String txt1 = TimeTF.getText(); principal = Double.parseDouble(txt); time = Double.parseDouble(txt1); if(princial >=10000) { RateLabel.setText("6%); rate = 0.06; } else { RateLabel.setText("5%"); rate = 0.05; } double intr = principal * time* rate ; InterLabel.setText(" " + intr) ; -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- 3.Your program is ready now