0% found this document useful (0 votes)
40 views6 pages

Program Java: Biodata dan Pesanan

The document contains code for a Java program that gets user input for personal biodata including name, student ID, gender, address, and phone number. It displays the collected biodata in a formatted table. It also contains code for another Java program that gets user input for a food order including name, selected dish, and quantity. It calculates and displays the total price of the order based on the selected dish and quantity.

Uploaded by

IyanAntoniuz
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views6 pages

Program Java: Biodata dan Pesanan

The document contains code for a Java program that gets user input for personal biodata including name, student ID, gender, address, and phone number. It displays the collected biodata in a formatted table. It also contains code for another Java program that gets user input for a food order including name, selected dish, and quantity. It calculates and displays the total price of the order based on the selected dish and quantity.

Uploaded by

IyanAntoniuz
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

/*

* To change this license header, choose License Headers in Project Properties.

* To change this template file, choose Tools | Templates

* and open the template in the editor.

*/

package javaapplication6;

import [Link]; // import scanner untuk inputannya

/**

* @author msi gaming

*/

public class JavaApplication6 {

public static void main(String[] args) {

// TODO code application logic here

Scanner input = new Scanner([Link]);

String nama, nim, jeniskelamin, alamat, nope, def

="Masukan ";

[Link]("| Contoh Program Java Biodata |");

[Link]("| =========================== |");

[Link](def + "Nama \t\t: ");

nama = [Link]();
[Link](def + "Nim \t\t: ");

nim = [Link]();

[Link](def + "Jenis Kelamain \t\t: ");

jeniskelamin = [Link]();

[Link](def + "Alamat \t\t: ");

alamat = [Link]();

[Link](def + "Nomor Handphone \t\t: ");

nope = [Link]();

[Link]("");

//tampilan datanya

[Link]("+------------------------+");

[Link]("| Biodata |");

[Link]("|Nama \t\t\t: + " + nama );

[Link]("|NIM \t\t\t: " +nim);

[Link]("|Jenis Kelamoin \t\t: " + jeniskelamin );

[Link]("|Alamat \t\t: " + alamat);

[Link]("|Nomor Hp \t\t: "+ nope);

[Link]("-------------------------- ");
}

/**

* @param args the command line arguments

*/

}
/*

* To change this license header, choose License Headers in Project Properties.

* To change this template file, choose Tools | Templates

* and open the template in the editor.

*/

package javaapplication6;

import [Link];

/**

* @author msi gaming

*/

public class NewClass {

public static void main (String[] args) {

Scanner input = new Scanner([Link]);

int pesan,pilih;

String nama;

[Link]("Masukan Nama :");

nama = [Link]();

[Link]("Pilihan:\n 1. nasi Goreng (Rp.15.000.00)\n 2. Mie Ayam (Rp.10.000.00) \n 3. Bakso


(Rp.13.000.00)");

pilih = [Link]();

[Link]("Jumlah Pesan :");

pesan = [Link]();

[Link]("============== :");

switch(pilih){
case 1:

[Link]("Nama Pemesan :"+nama);

[Link]("Pesanan : Nasi Goreng");

[Link]("Harga Pesanan : 15.000");

[Link]("Jumlah Pesan :"+pesan);

[Link]("Total Bayar :"+pesan*15.000);

break;

case 2:

[Link]("Nama Pemesan :"+nama);

[Link]("Pesanan : Mie Ayam");

[Link]("Harga Pesanan : 10.000");

[Link]("Jumlah Pesan :"+pesan);

[Link]("Total Bayar :"+pesan*10.000);

break;

case 3:

[Link]("Nama Pemesan :"+nama);

[Link]("Pesanan : Bakso");

[Link]("Harga Pesanan : 13.000");

[Link]("Jumlah Pesan :"+pesan);

[Link]("Total Bayar :"+pesan*13.000);

break;

default:

[Link]("Salah Pilih ! (");

}
}

You might also like