Created
September 7, 2016 05:26
-
-
Save fahmidwi/a06674fada0d23ed7aa00da0b075bf25 to your computer and use it in GitHub Desktop.
Tugas PBO
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 com.produk.person; | |
import com.produk.detail.SmartPhone; | |
public class Pembeli { | |
public static void main(String[] args){ | |
//instance object | |
SmartPhone hpku = new SmartPhone(); | |
hpku.merek = "Xiomai"; | |
hpku.os = "Android 5.1"; | |
hpku.kapasitas = "16 GB"; | |
hpku.batrei = 4400; | |
hpku.sim = "Dual SIM"; | |
hpku.harga = 1400000; | |
//cetak data | |
System.out.println("Mereknya : "+hpku.merek); | |
System.out.println("Mereknya : "+hpku.merek); | |
System.out.println("Sistem Operasi : "+hpku.os); | |
System.out.println("Kapasitas : "+hpku.kapasitas); | |
System.out.println("Batrei : "+hpku.batrei); | |
System.out.println("SIM : "+hpku.sim); | |
System.out.println("Harga : "+hpku.harga); | |
} | |
} | |
/* | |
* pada line 2 : syntax impor seharusnya import | |
* pada line 5 : syntax statis seharusnya static | |
* pada line 5 : syntax mein seharusnya main | |
* pada line 5 : syntax string seharusnya String | |
* pada line 8 : syntax smartPhone hpku seharusnya SmartPhone hpku | |
* pada line 8 : syntax new smartPhone seharusnya new SmartPhone | |
* pada line 11: syntax hpmu seharusnya hpku | |
* pada line 18: syntax hpmu seharusnya hpku | |
* pada line 19: styntax prinln seharusnya println | |
* pada line 20: systax system seharusnya System | |
* pada line 21: syntax Println seharusnya println | |
* pada line 23: syntax System,out.println seharusnya System.out.println | |
*/ |
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 com.produk.detail; | |
public class SmartPhone { | |
//atribut smartphone | |
public String merek; | |
public int harga; | |
public String kapasitas; | |
public int batrei; | |
public String sim; | |
public String os; | |
} | |
/* | |
* pada line 1 : syntax kurang ; (titik koma) | |
* pada line 1 : syntax package com.produk,detail seharusnya package com.produk.detail | |
* pada line 3 : syntax Class seharusnya class | |
* pada line 6 : syntax string seharusnya String | |
* pada line 7 : syntax String diganti menjadi int | |
* | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment