Penggunaan Library Code main import java.io.IOException; import java.util.Random; import java.util.Scanner; public class main { private static Scanner scanner; public static void main(String[]args) throws IOException { int ulang = 5; int start = 1; System.out.println("Selamat datang di game tebak kartu"); System.out.println("Dimana 0 = Tidak ada kartu ,1 = A , 11 = J , 12= Q , 13= K "); System.out.println("Dan kamu punya 5 kesempatan untuk menukar kartu"); System.out.println("Selamat Bermain!!"); Bukan_main [] playerCom = new Bukan_main[2]; Bukan_main [] player1 = new Bukan_main[2]; System.out.println("Lawan Mengambil kartu"); untuk_delay(playerCom); System.out.println("Kamu Mengambil Kartu"); untuk_delay(player1); System.out.println("Lawan Mengambil kartu");
Postingan
Menampilkan postingan dari Oktober, 2019
- Dapatkan link
- X
- Aplikasi Lainnya
Kode TiketAirPlane /** * Class TiketAirPlane */ import java.util.Scanner; public class TiketAirPlane { private String[] nomor_hp_ = new String[10]; private String[] nomor_identitas_ = new String[10]; private String bandara_keberangkatan_; private String bandara_tujuan_; private int kode_bandara_1_; private int kode_bandara_2_; private int jumlah_penumpang_; private int harga_; private String tanggal_keberangkatan_; Scanner scan = new Scanner(System.in); public void beliTiketPesawat() { System.out.println("Masukkan Jumlah Penumpang :"); jumlah_penumpang_ = scan.nextInt(); for(int i = 1; i <= jumlah_penumpang_; i++) { System.out.println("Masukkan Nomor Identitas Penumpang " + i + " :"); nomor_identitas_[i] = scan.next(); System.out.println("\n"); System.out.println(&qu
- Dapatkan link
- X
- Aplikasi Lainnya
Kode Shopping /** * Class Shopping */ import java.util.Scanner; public class Shopping { private int nominal_; private int kode_pesanan_; Scanner scan = new Scanner(System.in); public void bayarOlShop() { System.out.println("Masukkan Kode Pesanan :"); kode_pesanan_ = scan.nextInt(); System.out.println("\n"); System.out.println("Masukkan Nominal :"); nominal_ = scan.nextInt(); printNota(); } public void printNota() { System.out.println("\n"); System.out.println("I-Kios"); System.out.println("OLSHOP"); System.out.println("Kode Pesanan : " + kode_pesanan_); System.out.println("Nominal : " + nominal_); System.out.println("\n"); } }
- Dapatkan link
- X
- Aplikasi Lainnya
Kode Tiket Konser /** * Class Tiket Konser */ import java.util.Scanner; public class TiketReeva { private int harga_; private int kode_konser_; private int jumlah_tiket_; private String nama_konser_; private String tanggal_konser_; Scanner scan = new Scanner(System.in); public void beliTiketReeva() { System.out.println("Pilih Konser"); System.out.println(""); System.out.println("1. REEVA (60000)"); System.out.println("2. PARADIGM (65000)"); System.out.println("3. CIVEX (60000)"); kode_konser_= scan.nextInt(); switch(kode_konser_) { case 1: nama_konser_ = "REEVA"; harga_ = 60000; break; case 2: nama_konser_ = "PARADIGM"; harga_ = 65000; break; case
- Dapatkan link
- X
- Aplikasi Lainnya
Kode IDelivery /** * Class OnlineShop */ import java.util.Scanner; public class IDelivery { private String nama_pemesan_; private String barang_; private int harga_barang_; private int jumlah_barang_; private int kode_barang_; private String alamat_pengiriman_; private String nomor_hp_; Scanner scan = new Scanner(System.in); public void bayarIDelivery() { System.out.println("Masukkan Nama Pemesan :"); nama_pemesan_ = scan.next(); System.out.println("\n"); System.out.println("Masukkan Nomor HP :"); nama_pemesan_ = scan.next(); System.out.println("\n"); System.out.println("Masukkan Alamat Pengiriman :"); alamat_pengiriman_ = scan.nextLine(); System.out.println("\n"); System.out.println("Pilih Barang"); System.out.println("");
- Dapatkan link
- X
- Aplikasi Lainnya
Kode Pulsa /** * Class Pulsa */ import java.util.Scanner; public class Pulsa { private int nominal_pulsa_; private int kode_provider_; private String provider_; private String nomor_hp_; Scanner scan = new Scanner(System.in); public void beliPulsa() { System.out.println("Masukkan Provider"); System.out.println(""); System.out.println("1. Telkomsel"); System.out.println("2. Indosat"); System.out.println("3. 3"); System.out.println("4. XL"); kode_provider_= scan.nextInt(); switch(kode_provider_) { case 1: provider_ = "Telkomsel"; break; case 2: provider_ = "Indosat"; break; case 3: provider_ = "3"; break;
- Dapatkan link
- X
- Aplikasi Lainnya
Kode Tiket Kereta /** * Class TiketKereta */ import java.util.Scanner; public class TiketKereta { private String[] nomor_hp_ = new String[10]; private String[] nomor_identitas_ = new String[10]; private String stasiun_keberangkatan_; private String stasiun_tujuan_; private int kode_stasiun_1_; private int kode_stasiun_2_; private int jumlah_penumpang_; private int harga_; private String tanggal_keberangkatan_; Scanner scan = new Scanner(System.in); public void beliTiketKereta() { System.out.println("Masukkan Jumlah Penumpang :"); jumlah_penumpang_ = scan.nextInt(); for(int i = 1; i <= jumlah_penumpang_; i++) { System.out.println("Masukkan Nomor Identitas Penumpang " + i + " :"); nomor_identitas_[i] = scan.next(); System.out.println("\n");
- Dapatkan link
- X
- Aplikasi Lainnya
Evaluasi Tengah Semester PBO D IMPLEMENTASI I-KIOS DENGAN MENGGUNAKAN BLUEJ Tiket main kode /** * Class IntMain * Class berisi main untuk menjalankan program */ import java.util.Scanner; public class Main { public static void main(String args[]) { Scanner scan= new Scanner(System.in); int menu; System.out.println("Menu"); System.out.println(""); System.out.println("1. Pulsa"); System.out.println("2. Online Shop"); System.out.println("3. Tiket Kereta Api"); System.out.println("4. Tiket Pesawat"); System.out.println("5. Tiket Konser"); System.out.println("6. I-DELIVERY"); menu = scan.nextInt(); switch(menu) { case 1: Pulsa pulsa = new Pulsa(); pulsa.beliPulsa(); br