Breaking News

Sabtu, 22 November 2014

LISTING PROGRAM RESERVASI PEMESANAN KAMAR HOTEL



package reservasi_kamar;
import java.util.Scanner;
public class ReservasiKamarHotel {

       public static void main(String[] args) {
              // TODO Auto-generated method stub
              Scanner kamar=new Scanner(System.in);
              String nama,nomortelepon,tanggalpemesanan,tipekamar;
              int regular,economy,deluxe,VIP,VVIP,jumlah1,jumlah2,jumlah3,jumlah4,jumlah5,totalkamar,totalpembayaran;
             
              System.out.println("********************************************************");
              System.out.println("             RESERVASI KAMAR HOTEL JLK CARRIOT          ");
              System.out.println("********************************************************");
              System.out.println("Silahkan Memesan Kamar yang Anda Inginkan               ");
              System.out.println("");
              System.out.println("Tipe Kamar:");
              System.out.println("A. Regular           = @ Rp. 200.000,-/hari");
              System.out.println("B. Economy           = @ Rp. 300.000,-/hari");
              System.out.println("C. Deluxe            = @ Rp. 450.000,-/hari");
              System.out.println("D. VIP               = @ Rp. 600.000,-/hari");
              System.out.println("E. VVIP              = @ Rp. 800.000,-/hari");
              System.out.println("");
              System.out.println("Reservasi berlaku untuk pemesanan minimal 1 hari sebelumnya");
              System.out.println("");
              System.out.println("");
              System.out.println("Masukkan Data Pemesanan Kamar Anda");
              System.out.println("");
              System.out.println();
              regular = 200000;
              economy = 300000;
              deluxe  = 450000;
              VIP = 600000;
              VVIP = 800000;

              System.out.println("");
              System.out.print("Nama                 :");
              nama   = kamar.nextLine ();
              System.out.print("No.Telepon           :");
              nomortelepon = kamar.nextLine ();
              System.out.print("Tanggal Pemesanan    :");
              tanggalpemesanan = kamar.nextLine ();
              System.out.print("Tipe Kamar Regular   :");
              jumlah1 = kamar.nextInt ();
              System.out.print("Tipe Kamar Economy   :");
              jumlah2 = kamar.nextInt ();
              System.out.print("Tipe Kamar Deluxe    :");
              jumlah3 = kamar.nextInt ();
              System.out.print("Tipe Kamar VIP       :");
              jumlah4 = kamar.nextInt ();
              System.out.print("Tipe Kamar VVIP      :");
              jumlah5 = kamar.nextInt ();
              totalkamar = (jumlah1)+(jumlah2)+(jumlah3)+(jumlah4)+(jumlah5);
              System.out.print("Total Kamar          : "+ totalkamar +" , ");
              totalpembayaran = (jumlah1*regular)+(jumlah2*economy)+(jumlah3*deluxe)+(jumlah4*VIP)+(jumlah5*VVIP);
              System.out.println("Harga Total yang Harus Anda Bayar : Rp. "+ totalpembayaran +",-");
              System.out.println("");
              System.out.println("");
              System.out.print("Lihat Bukti Pemesanan Kamar Anda");
              System.out.println("");
              System.out.println("************************************************************");
              System.out.println("|                  Bukti Pemesanan Kamar                   |");
              System.out.println("|                    Hotel JLK CARRIOT                     |");
              System.out.println("***********************************************************|");
              System.out.println("| Nama             : "+nama.substring(0,7).toUpperCase()+"                               |");
              System.out.println("| No.Telepon       : "+nomortelepon.substring(0,12)+"                          |");
              System.out.println("| Tanggal Pemesanan: "+tanggalpemesanan.substring(0,8)+"                              |");
              System.out.println("| Total Kamar      : "+totalkamar+"                                    |");      
              System.out.println("| Total Pembayaran : "+totalpembayaran+"                              |");
              System.out.println("|                                                          |");
              System.out.println("|***********************TERIMAKASIH************************|");
                          
                          
                          
                          
                    
             
                          
             
                          
             
             
             
             
       }

}

Tidak ada komentar:

Posting Komentar

Designed By