Thanks To :

Kamis, 27 Juni 2013

Tugas Pemrograman Berbasisi Object Ibu Suryaningrum

Dibawah adalah listing Program Kasir 


Open ->>

import java.util.Scanner;
public class Kasir{
public static void main(String[] args) {
int jlh_data,pilihan,total,bayar,total1,harga = 0;//deklarasi integer

String jenisservice;
Scanner input = new Scanner(System.in);
System.out.println("==================");//mencetak nilai dari objek
System.out.println("===Menu Service===");//mencetak nilai dari objek
System.out.println("| 1. Gunting |");//mencetak nilai dari objek
System.out.println("| 2. CreamBath |");//mencetak nilai dari objek
System.out.println("| 3. MakeUp |");//mencetak nilai dari objek
System.out.println("| 4. Facial |");//mencetak nilai dari objek
System.out.println("| 5. Lulur |");//mencetak nilai dari objek
System.out.println("| 6. Coloring |");//mencetak nilai dari objek
System.out.println("==================");//mencetak nilai dari objek
System.out.println(" ");
System.out.println(" ");
System.out.println(" ");
System.out.println(" RismalahSalon ");
System.out.println(" Jl.GrahaPrima Raya ");
System.out.println(" Tambun Selatan ");
System.out.println(" Telp [021] 88369492");
System.out.println(" ");
System.out.println(" ");
System.out.println(" ");

System.out.println(" ******************************** ");
System.out.println(" ");
System.out.println(" ");
System.out.print("NoService ");
System.out.println(" ");
pilihan = input.nextInt();
if(pilihan == 1){
harga = 15000;

}else if(pilihan == 2){
harga = 35000;
System.out.println("CreamBath Rp. " + harga);
}else if(pilihan == 3){
harga = 150000;
System.out.println("MakeUp Rp. " + harga);
}else if(pilihan == 4){
harga = 45000;
System.out.println("Facial Rp. " + harga);
}else if(pilihan == 5){
harga = 85000;
System.out.println("Lulur Rp. " + harga);
}else if(pilihan == 6){
harga = 60000;
System.out.println("Coloring Rp. " + harga);

}else {
System.out.println("Maaf Pilihan yang Anda Pilih Salah !");
}
System.out.print("Jumlah Service ");
jlh_data = input.nextInt();
total = harga * jlh_data;
System.out.println("Total Rp. " + total);
System.out.print("Bayar Rp. ");
bayar = input.nextInt();
total1 = (int) (bayar - total);
System.out.println("Kembalian Rp. " +total1);
System.out.println(" ");
System.out.println(" ");
System.out.println(" ******************************** ");
System.out.println(" Terima Kasih Atas Kunjungan Anda ");
System.out.println(" ******************************** ");
return;
}
}


Output dari program nya ~



 Link Blog Teman Satu Kelompok :
-- Risma Blog's


Tidak ada komentar:

Posting Komentar