Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package BiodataMahasiswa;
- import BiodataMahasiswa.DataTinggiBadan;
- public class BioMahasiswa {
- public void namaMahasiswa(){
- System.out.println("Nama Mahasiswa");
- System.out.println(DataTinggiBadan.bbideal(65.5));
- }
- }
- class Fauzi extends BioMahasiswa {
- public void Fauzi(){
- System.out.println("Nama : Akhmad Fauzi");
- System.out.println("Berat Badan : "+DataTinggiBadan.bbideal(65.5)+" Kg");
- }
- }
- class Fajrin extends BioMahasiswa {
- public void Fajrin(){
- System.out.println("Nama : Fajrin Nurhakim");
- System.out.println("Berat Badan : "+DataTinggiBadan.bbideal(48)+" Kg");
- }
- }
- class main{
- public static void main(String[] args) {
- Fauzi mahasiswa1 = new Fauzi();
- mahasiswa1.Fauzi();
- Fajrin mahasiswa2 = new Fajrin();
- mahasiswa2.Fajrin();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement