Notes![what is notes.io? What is notes.io?](/theme/images/whatisnotesio.png)
![]() ![]() Notes - notes.io |
import java.util.*;
public class Quiz123 {
private static Vector<String> BrKode = new Vector<String>();
private static Vector<String> BrNama = new Vector<String>();
private static Vector<Integer> BrHarga = new Vector<Integer>();
private static Vector<Double> TrNo = new Vector<Double>();
private static Vector<Integer> TrTanggal = new Vector<Integer>();
private static Vector<Integer> NotaJumlah = new Vector<Integer>();
private static Vector<String> NotaKodeBr = new Vector<String>();
private static Vector<String> NotaNamaBr = new Vector<String>();
private static Vector<Integer> NotaHargaBr = new Vector<Integer>();
private static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
public static void main (String[]args)throws IOException{
int menu=0;
do{
System.out.println("MENU");
System.out.println("1. Display Barang");
System.out.println("2. Input Transaksi");
System.out.println("3. Rekap Transaksi");
System.out.println("4. Keluar");
System.out.println("");
System.out.print("Pilihan :");
menu = Integer.parseInt(br.readLine());
simpanBarang();
if(menu == 1){
readBarang();
}else if(menu == 2){
readTransaksi();
}else if(menu == 3){
}else{
System.out.println("Keluar");
}
}while(menu<=3||menu>=5);
}
private static void simpanBarang(){
BrKode.add("BR01");
BrKode.add("BR02");
BrKode.add("BR03");
BrKode.add("BR04");
BrNama.add("Pensil ");
BrNama.add("Cryon ");
BrNama.add("Bulpoin");
BrNama.add("Spidol ");
BrHarga.add(2000);
BrHarga.add(25000);
BrHarga.add(2500);
BrHarga.add(8200);
}
private static void readBarang(){
System.out.println("KODE Nama Harga ");
System.out.println("====================================");
for(int i = 0 ; i<BrKode.size();i++){
System.out.println(BrKode.get(i)+" "+BrNama.get(i)+" "+BrHarga.get(i));
}
}
private static void readTransaksi()throws IOException{
double Notaku = Math.random()*10000;
System.out.println("No Transaksi :"+Math.round(Notaku));
TrNo.add(Notaku);
System.out.println("Tanggal :");
TrTanggal.add(Integer.parseInt(br.readLine()));
String KODES="";
boolean status = true;
do{
KODES=br.readLine();
if(KODES.equals("BR01")){
NotaKodeBr.add("BR01");
NotaNamaBr.add("Pensil");
NotaHarga.add(2000);
System.out.print("Jumlah : ");
NotaJumlah.add(Integer.parseInt(br.readLine()));
}else if(KODES.equals("BR02")){
NotaKodeBr.add("BR02");
NotaHarga.add(25000);
NotaNamaBr.add("Cryon");
System.out.print("Jumlah : ");
NotaJumlah.add(Integer.parseInt(br.readLine()));
}else if(KODES.equals("BR03")){
NotaKodeBr.add("BR03");
NotaHarga.add(2500);
NotaNamaBr.add("Bulpoin");
System.out.print("Jumlah : ");
NotaJumlah.add(Integer.parseInt(br.readLine()));
}else if(KODES.equals("BR04")){
NotaKodeBr.add("BR04");
NotaNamaBr.add("Spidol");
NotaHarga.add(8200);
System.out.print("Jumlah : ");
NotaJumlah.add(Integer.parseInt(br.readLine()));
}else{
System.out.println("KODE TIDAK ADA");
status = false;
}
System.out.println("tekan tombol X pada input kode barang jika tidak ada barang yang dipilih lagi");
}while(KODES.equals(!status));
}
private static void DetailTransaksi(){
System.out.println("KODE Nama Harga ");
System.out.println("====================================");
}
}
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team