Minggu, 11 Juni 2017

PENGIRIMAN PAKET


#IKHWANNUDIN 1655201033

#TEKNIK INFORMATIKA

 FLOWCHART NYA:




















 @author IKHWANN
 */
import java.util.Scanner;
public class Biaya_pengiriman_paket 
{
    public static void main(String[]args)
    {
      
        String nama,alamat;
        int jarak = 0;
        int berat = 0;
        int biaya_per_Kg = 0;
        int biaya_per_Km = 0;
        int biaya_paket = 0;
        int total_biaya_Kg = 0;
        int total_biaya_Km = 0;
        int nilai_PPN = 0;
        int total_biaya = 0;
       
   
        Scanner sc = new Scanner (System.in);
      
        System.out.print("\tProgram Biaya Pengiriman Paket");
        System.out.print("\n####################################################");
        System.out.print("\nData Pelanggan");
        System.out.print("\n####################################################");
        System.out.print("\nMasukan Nama Pengirim      : ");        nama = sc.nextLine();
        System.out.print("\nMasukan Alamat pengirim    : ");
        alamat = sc.nextLine();
        System.out.print("\nTujuan Pengiriman");
        System.out.print("\n####################################################");
        System.out.print("\nMasukan Alamat Pengiriman  : ");
        String alamat_pengirim = sc.nextLine();
        System.out.print("\nMasukan Berat");
        System.out.print("\n####################################################");
        System.out.print("\n Per Kg                    : ");
        berat = sc.nextInt();
        System.out.print("\nMasukan Jarak ");
        System.out.print("\n####################################################");
        System.out.print("\n Per Km                    : ");
        jarak = sc.nextInt();
        System.out.print("\tPilihan Paket");
        System.out.print("\n####################################################");
        System.out.println("\n1. Paket Reguler");
        System.out.println("2. Paket Khusus");
        System.out.println("3. Paket VIP");
        System.out.print("");
        System.out.print("Masukan Pilihan Paket        : ");
        int pilih = sc.nextInt();
         if (pilih==1)
        {
            biaya_per_Kg = 10000;
            biaya_per_Km = 20000;
             nilai_PPN = (int) 0.1; //10%
        }
        else if(pilih==2)
        {
            biaya_per_Kg = 20000;
            biaya_per_Km = 35000;
            nilai_PPN = (int) 0.1; //10%
        }   
        else if (pilih==3)
        {
            biaya_per_Kg = 20000;
            biaya_per_Km = 35000;
            nilai_PPN = (int) 0.1; //10%
        }
        {
            total_biaya_Kg =(berat*biaya_per_Kg);
            total_biaya_Km =(jarak*biaya_per_Km);
            biaya_paket =(total_biaya_Kg+total_biaya_Km); 
            nilai_PPN = (biaya_paket*10)/100;
            total_biaya =(int) (biaya_paket+nilai_PPN);
           
    System.out.print("\nData Pengirim");
    System.out.print("\n####################################################");
    System.out.println("\nNama Pengirimin            = "+ nama);
    System.out.println("Alamat Pengirim            = "+ alamat);
    System.out.print("\nTujuan Pengiriman");
    System.out.print("\n####################################################");
    System.out.println("\nAlamat Pengiriman          = "+ alamat_pengirim);
    System.out.print("\nPerhitungan Biaya");
    System.out.print("\n####################################################");
    System.out.println("\nTotal Biaya per Kg         = "+ total_biaya_Kg);
    System.out.println("Total Biaya per Km         = "+ total_biaya_Km);
    System.out.println("Biaya Paket                = "+biaya_paket);
    System.out.println("PPN 10%                    = "+nilai_PPN);
    System.out.println("Total Biaya                = "+total_biaya);
    System.out.print("##########################");
    System.out.println("//IKHWANN485@GMAIL.//");
    }
    }

}

Tidak ada komentar:

Posting Komentar