Advertisement
BlackBoY_

BioMahasiswa

Jun 23rd, 2021
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package BiodataMahasiswa;
  2.  
  3. import BiodataMahasiswa.DataTinggiBadan;
  4.  
  5. public class BioMahasiswa {
  6.     public void namaMahasiswa(){
  7.         System.out.println("Nama Mahasiswa");
  8.         System.out.println(DataTinggiBadan.bbideal(65.5));
  9.     }
  10. }
  11.  
  12. class Fauzi extends BioMahasiswa {
  13.     public void Fauzi(){
  14.         System.out.println("Nama : Akhmad Fauzi");
  15.         System.out.println("Berat Badan : "+DataTinggiBadan.bbideal(65.5)+" Kg");
  16.     }
  17. }
  18. class Fajrin extends BioMahasiswa {
  19.     public void Fajrin(){
  20.         System.out.println("Nama : Fajrin Nurhakim");
  21.         System.out.println("Berat Badan : "+DataTinggiBadan.bbideal(48)+" Kg");
  22.     }
  23. }
  24.  
  25. class main{
  26.     public static void main(String[] args) {
  27.         Fauzi mahasiswa1 = new Fauzi();
  28.         mahasiswa1.Fauzi();
  29.         Fajrin mahasiswa2 = new Fajrin();
  30.         mahasiswa2.Fajrin();
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement