Advertisement
avidris02

persegiPanjang

Sep 27th, 2022 (edited)
733
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.55 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.  * @author Rae
  10.  */
  11. public class persegiPanjang {
  12.     int panjang, lebar, luas;
  13.     public void setPanjang(int p) {
  14.         panjang = p;
  15.     }
  16.     public void setLebar(int l) {
  17.         lebar = l;
  18.     }
  19.     public void setLuas() {
  20.         luas = panjang * lebar;
  21.     }
  22.     public int getLuas()
  23.     {
  24.         return luas;
  25.     }
  26. }
  27.  
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement