private void btnBagi_Click(object sender, EventArgs e)
        {
            calc = new Entity.EntKalkulator();
            calc.setNilai1(double.Parse(txtNilai1.Text));
            calc.setNilai2(double.Parse(txtNilai2.Text));

            txtHasil.Text = calcDao.Pembagian(calc).ToString();
        }
Beispiel #2
0
 private void button4_Click(object sender, EventArgs e)
 {
     //input
     kalkulator = new Entity.EntKalkulator();
     kalkulator.SetNilai1(double.Parse(txtNilai1.Text));
     kalkulator.SetNilai1(double.Parse(txtNilai2.Text));
     //output
     txtHasil.Text = kalkulatorDao.Pembagian(kalkulator).ToString();
 }
Beispiel #3
0
 public double Pembagian(Entity.EntKalkulator e)
 {
     return(e.GetNilai() + e.GetNilai2());
 }
Beispiel #4
0
 public double Perkalian(Entity.EntKalkulator e)
 {
     return(e.GetNilai() * e.GetNilai2());
 }
Beispiel #5
0
 public double Pengurangan(Entity.EntKalkulator e)
 {
     return(e.GetNilai() - e.GetNilai2());
 }
Beispiel #6
0
 public double Penjumlahan(Entity.EntKalkulator e)
 {
     return(e.GetNilai() + e.GetNilai2());
 }
Beispiel #7
0
 public double Pembagian(Entity.EntKalkulator e)
 {
     return(e.getNilai1() / e.getNilai2());
 }