DESIGN MODUL 3
PROPERTIES
SOURCE CODE
// TODO add your handling code here:
int a,b,c;
a=Integer.parseInt(ebil1.getText());
b=Integer.parseInt(ebil2.getText());
c=a+b;
ehasil.setText(Integer.toString(c));
}
private void bkurangActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
int a,b,c;
a=Integer.parseInt(ebil1.getText());
b=Integer.parseInt(ebil2.getText());
c=a-b;
ehasil.setText(Integer.toString(c));
}
private void bbagiActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
int a,b,c;
a=Integer.parseInt(ebil1.getText());
b=Integer.parseInt(ebil2.getText());
c=a/b;
ehasil.setText(Float.toString(c));
}
private void bkaliActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
int a,b,c;
a=Integer.parseInt(ebil1.getText());
b=Integer.parseInt(ebil2.getText());
c=a*b;
ehasil.setText(Integer.toString(c));
}
private void bclearActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
ebil1.setText("");
ebil2.setText("");
ehasil.setText("");
ebil1.requestFocus();
}
private void bexitActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
dispose();
}
private void bmaxActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
int a, b;
a=Integer.parseInt(ebil1.getText());
b=Integer.parseInt(ebil2.getText());
if (a>b)
ehasil.setText(Integer.toString(a));
else
ehasil.setText(Integer.toString(b));
}
private void bminActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
int a, b;
a=Integer.parseInt(ebil1.getText());
b=Integer.parseInt(ebil2.getText());
if (a<b)
ehasil.setText(Integer.toString(a));
else
ehasil.setText(Integer.toString(b));
}
HASIL PROSES MODUL 3
0 komentar:
Posting Komentar