Skip to content

Instantly share code, notes, and snippets.

@eriwiana
eriwiana / KonversiReal
Created April 21, 2015 02:03
KonversiReal
package konversi;
public class KonversiReal {
private int ValueReal;
private double KonversiNilai;
private String KonversiInput;
public KonversiReal(){}
public KonversiReal(String KonversiInput){
}
@eriwiana
eriwiana / KonversiYen
Created April 21, 2015 02:02
KonversiYen
package konversi;
public class KonervsiYen {
private int ValueYen;
private double KonervsiNilai;
private String KonervsiInput;
public KonervsiYen(){}
public KonervsiYen(String KonervsiInput){
}
@eriwiana
eriwiana / KoversiDollar
Created April 21, 2015 02:02
KonversiDollar
package konversi;
public class KonversiDollar {
private int ValueDollar;
private double KonversiNilai;
private String KonversiInput;
public KonversiDollar(){}
public KonversiDollar(String KonversiInput){
}
@eriwiana
eriwiana / Konversi
Created April 21, 2015 02:01
Konversi
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();
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();
package hewan;
public class Ikan extends Hewan {
public void berenang(){
System.out.println("Ikan berenang");
}
}
package hewan;
public class Kucing extends Hewan {
public void bermain(){
System.out.println("Kucing bermain");
}
}
package hewan;
public class Hewan {
//int umur;
//int jumlahKaki;
//char[] nama;
public Hewan(){}
/*public void getJumlahKaki (int jumlahKakiHewan) {
jumlahKaki = jumlahKakiHewan;
}
package kendaraan;
public class Pesawat extends Kendaraan {
public void terbang(){
System.out.println("Pesawar mampu terbang");
}
}
package kendaraan;
public class Mobil extends Kendaraan {
public void berjalanMundur(){
System.out.println("Mobil mampu berjalan mundur");
}
}