Advertisement
BlackBoY_

Eksekusi

Jul 7th, 2021
359
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package Tugas;
  2.  
  3. public class Eksekusi {
  4.     public static void main(String[] args) {
  5.         Kalkulator hitung = new Kalkulator();
  6.         hitung.setKali(20, 5);
  7.         hitung.setBagi(10, 5);
  8.         hitung.setKurang(30, 70);
  9.         hitung.setTambah(-70, 100);
  10.        
  11.         System.out.println("hasil kali = "+hitung.getKali());
  12.         System.out.println("hasil bagi = "+hitung.getBagi());
  13.         System.out.println("hasil kurang = "+hitung.getKurang());
  14.         System.out.println("hasil tambah = "+hitung.getTambah());
  15.     }
  16.    
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement