Advertisement
avidris02

Lingkaran

Sep 27th, 2022
694
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.51 KB | Source Code | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package mainmenu;
  7.  
  8. /**
  9.  *
  10.  * @author Rae
  11.  */
  12. public class Lingkaran {
  13.     double  phi = 3.14;
  14.     double jari, luas;
  15.     public void setJari(double r) {
  16.         jari = r;
  17.     }
  18.     public void setLuas() {
  19.         luas = phi * jari * jari;
  20.     }
  21.     public double getLuas()
  22.     {
  23.         return luas;
  24.     }
  25. }
  26.  
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement