Kamis, 23 Oktober 2014
Bentor Java
20.51
No comments
Kls : a
Becak
/*
* To
change this license header, choose License Headers in Project Properties.
* To
change this template file, choose Tools | Templates
* and
open the template in the editor.
*/
package testbentor;
/**
*
*
@author suhardi
*/
public interface Becak {
public void Memuat();
}
Bentor
/*
* To
change this license header, choose License Headers in Project Properties.
* To
change this template file, choose Tools | Templates
* and
open the template in the editor.
*/
package testbentor;
/**
*
*
@author suhardi
*/
public class Bentor implements Becak,Motor{
@Override
public void Memuat() {
System.out.println("mengangkut banyak penumpang"); //To change
body of generated methods, choose Tools | Templates.
}
@Override
public void MelajuCepat() {
System.out.println("Mesin Baru"); //To change body of
generated methods, choose Tools | Templates.
}
}
Motor
/*
* To
change this license header, choose License Headers in Project Properties.
* To
change this template file, choose Tools | Templates
* and
open the template in the editor.
*/
package testbentor;
/**
*
*
@author suhardi
*/
public interface Motor {
public void MelajuCepat();
}
Tesbentor
/*
* To
change this license header, choose License Headers in Project Properties.
* To
change this template file, choose Tools | Templates
* and
open the template in the editor.
*/
package testbentor;
/**
*
*
@author suhardi
*/
public class TestBentor {
/**
*
@param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
Bentor d = new Bentor();
d.MelajuCepat();
d.Memuat();
}
}
Langganan:
Postingan (Atom)