This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package konversi; | |
public class KonversiReal { | |
private int ValueReal; | |
private double KonversiNilai; | |
private String KonversiInput; | |
public KonversiReal(){} | |
public KonversiReal(String KonversiInput){ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package konversi; | |
public class KonervsiYen { | |
private int ValueYen; | |
private double KonervsiNilai; | |
private String KonervsiInput; | |
public KonervsiYen(){} | |
public KonervsiYen(String KonervsiInput){ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package konversi; | |
public class KonversiDollar { | |
private int ValueDollar; | |
private double KonversiNilai; | |
private String KonversiInput; | |
public KonversiDollar(){} | |
public KonversiDollar(String KonversiInput){ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package konversi; | |
public class Konversi { | |
public static void main(String[] args) { | |
KonversiDollar dollar = new KonversiDollar(); | |
KonervsiYen yen = new KonervsiYen(); | |
KonversiReal real = new KonversiReal(); | |
dollar.getKonversiInput("Mata Uang United States Dollar (USD) "); | |
dollar.setValueDollar(1); | |
dollar.getValueDollar(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package hewan; | |
public class Main { | |
public static void main(String[] args) { | |
Hewan hewan1 = new Hewan(); | |
hewan1.makan(); | |
hewan1.berjalan(); | |
Kucing kucing1 = new Kucing(); | |
kucing1.bermain(); | |
kucing1.makan(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package hewan; | |
public class Ikan extends Hewan { | |
public void berenang(){ | |
System.out.println("Ikan berenang"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package hewan; | |
public class Kucing extends Hewan { | |
public void bermain(){ | |
System.out.println("Kucing bermain"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package hewan; | |
public class Hewan { | |
//int umur; | |
//int jumlahKaki; | |
//char[] nama; | |
public Hewan(){} | |
/*public void getJumlahKaki (int jumlahKakiHewan) { | |
jumlahKaki = jumlahKakiHewan; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package kendaraan; | |
public class Pesawat extends Kendaraan { | |
public void terbang(){ | |
System.out.println("Pesawar mampu terbang"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package kendaraan; | |
public class Mobil extends Kendaraan { | |
public void berjalanMundur(){ | |
System.out.println("Mobil mampu berjalan mundur"); | |
} | |
} |
NewerOlder