import java.io.*;
class Barang
{
mhs(String nama,String jenis,int harga)
{
System.out.println("Nama Barang :"+ nama);
System.out.println("Jenis Barang :"+ jenis);
System.out.println("Harga Barang :"+ harga);
}}
public class BarangDagangan
{
public static void main(String args[])throws IOException
{
BufferedReader input=new BufferedReader(new InputStreamReader(System.in));
System.out.println("Masukkan Nama Barang : ");
String nama=input.readLine();
System.out.println("Masukkan Jenis Barang : ");
String jenis=input.readLine();
System.out.println("Masukkan Harga Barang: ");
String no_pokok=input.readLine();
int harga = Integer.parseInt(no_pokok);
barang barang1 = new barang(nama,jenis,harga);
}
}
class Barang
{
mhs(String nama,String jenis,int harga)
{
System.out.println("Nama Barang :"+ nama);
System.out.println("Jenis Barang :"+ jenis);
System.out.println("Harga Barang :"+ harga);
}}
public class BarangDagangan
{
public static void main(String args[])throws IOException
{
BufferedReader input=new BufferedReader(new InputStreamReader(System.in));
System.out.println("Masukkan Nama Barang : ");
String nama=input.readLine();
System.out.println("Masukkan Jenis Barang : ");
String jenis=input.readLine();
System.out.println("Masukkan Harga Barang: ");
String no_pokok=input.readLine();
int harga = Integer.parseInt(no_pokok);
barang barang1 = new barang(nama,jenis,harga);
}
}
0 comments:
Posting Komentar