Postingan

Menampilkan postingan dari Oktober, 2018

UTS PWEB C

Gambar
1. tampilan index 2. menambahkan prestasi 3. list prestasi yang terdaftar 4. mengedit prestasi 5. setelah di edit Source code : 1. config.php <?php $server = "localhost"; $user = "root"; $password = ""; $nama_database = "siswa"; $db = mysqli_connect($server, $user, $password, $nama_database); if( !$db ){ die("Gagal terhubung dengan database: " . mysqli_connect_error()); } ?> 2. form-daftar.php <!DOCTYPE html> <html> <head> <title>Sistem Akademik</title> </head> <body> <header> <h3>Formulir Input Prestasi</h3> </header> <form action="proses-pendaftaran.php" method="POST"> <fieldset> <p> <label for="nama">Nama: </l...

e-parking system - PBO A

Gambar
SOURCE CODE : 1. Class epark(main) : import java.util.Scanner; public class epark { private static int price,durasi; private static String jenis,plat; public static void main() { Scanner scan= new Scanner(System.in); kendaraan vehicle; vehicle = new kendaraan(); System.out.println("Pilih jenis kendaraan (Motor/Mobil)"); jenis = vehicle.getJenis(); System.out.println("Masukkan nomor plat"); plat = vehicle.getNopol(); System.out.println("Masukkan durasi parkir yang di inginkan (Dalam jam)"); durasi = scan.nextInt(); if(jenis.contains("motor")){ price = durasi*100;} else if(jenis.contains("mobil")){ price = durasi*3000;} printTicket(); } public static void printTicket(){ System.out.println("\nTiket Parkir\n"); System.out.println("Jenis kendaraan : "+jenis); System.out.println("plat nomor : "+pl...

membuat form pendaftaran menggunakan php & mysql - PWEB C

Gambar
1. tampilan index 2. form pendaftaran 3. pendaftaran berhasil 4. list siswa yang terdaftar 5. menghapus data 6. mengedit  7. edit berhasil Source code : 1. config.php <?php $server = "localhost"; $user = "root"; $password = ""; $nama_database = "pendaftaran_siswa"; $db = mysqli_connect($server, $user, $password, $nama_database); if( !$db ){ die("Gagal terhubung dengan database: " . mysqli_connect_error()); } ?> 2. index.php <!DOCTYPE html> <html> <head> <title>Pendaftaran Siswa Baru | SMK Coding</title> </head> <body> <header> <h3>Pendaftaran Siswa Baru</h3> <h1>SMK Coding</h1> </header> <h4>Menu</h4> <nav> <ul> <li><a href="form-da...

form pembayaran - PWEB C

Gambar
source code : 1.index.php <?php session_start(); ?> <!DOCTYPE html> <head> <style type="text/css"> body { background:#3BB9FF; font-family:arial; } #wrapshopcart { width:70%; margin:3em auto; padding:30px; background:#fff; box-shadow:0 0 15px #ddd; } h1 { margin:0; padding:0; font-size:2.5em; font-weight:bold; } p { font-size:1em; margin:0; } table { margin:2em 0 0 0; border:1px solid #eee; width:100%; border-collapse: separate; border-spacing:0; } table th { background:#3BB9FF; border:none; padding:20px ; font-weight:normal; text-align:left; } table td { background:#fff; border:none; padding:12px 20px; font-weight:normal; text-align:left; border-top:1px solid #eee; } ...

program techsupport - PBO A

Gambar
Source Code : 1. Support System public class SupportSystem { private InputReader reader; private Responder responder; public SupportSystem() { reader = new InputReader(); responder = new Responder(); } public void start() { boolean finished = false; printWelcome(); while(!finished) { String input = reader.getInput(); if(input.startsWith("muleh")) { finished = true; } else { String response = responder.generateResponse(); System.out.println(response); } } printGoodbye(); } private void printWelcome() { System.out.println( "Welcome to the siri kw premium"); System.out.println(); System.out.println("Onok problem opo lur? "); System.out.println( "ketik o 'muleh' gae metu."); } private void printGoodbye() { System.out.println("ati ati rek."); } ...

Membuat program lelang - PBO A

Gambar
1. Enter Lot 2. Enter person 3. Start Bid 4. Close Bid Source Code : 1. Auction : import java.util.ArrayList; import java.util.Iterator; public class Auction { private ArrayList<Lot> lots; private int nextLotNumber; public Auction() { lots = new ArrayList<Lot>(); nextLotNumber = 1; } public void enterLot(String description) { lots.add(new Lot(nextLotNumber, description)); nextLotNumber++; } public void showLots() { for(Lot lot : lots){ System.out.println(lot.toString()); } } public void bidFor(int lotNumber, Person bidder, long value) { Lot selectedLot = getLot(lotNumber); if(selectedLot!=null){ boolean successful = selectedLot.bidFor(new Bid(bidder,value)); if (successful) { System.out.println("The bid for lot number ...

Membuat Form Registrasi menggunakan JavaScript

Gambar
Setelah kemarin membuat webpage berita, sekarang saya menambahkan fitur "Daftar" didalam webpage tersebut. Bisa dilihat : Lalu jika kita klik pada menu daftar, form pendaftaran nya akan muncul : Lalu jika ada kesalahan dalam pengisian akan muncul alert seperti contoh dibawah : Source code untuk form registrasi : <!DOCTYPE html> <html> <head> <title>Registrasi</title> <meta charset="utf-8"> <meta http-equiv="Content-type" content="text/html; charset=utf-8"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <style type="text/css"> body { background :#F87217 } font-family: sans-serif; } h2 { color: #fff; } .login { padding: 1em; margin: 2em auto; width: 20em; background: ...