Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- Apps apps = new Apps();
- Boolean check = true;
- while (check){
- System.out.println("Pilih layanan");
- System.out.println("1. Barang Masuk");
- System.out.println("2. Barang Keluar");
- System.out.println("3. Cek Barang");
- System.out.println("4. Daftar Barang");
- System.out.println("5. Tambah Stok");
- System.out.println("6. Update Harga");
- System.out.println("7. Catatan Barang keluar");
- System.out.println("8. Hapus barang");
- System.out.println("0. Keluar\n\n");
- System.out.print("Masukan nomor pilihan: ");
- Integer menu = scanner.nextInt();
- switch (menu){
- case 1:
- apps.barangMasuk();
- break;
- case 2:
- apps.barangKeluar();
- break;
- case 3:
- apps.lihatBarang();
- break;
- case 4:
- apps.listBarang();
- break;
- case 5:
- apps.updateStok();
- break;
- case 6:
- apps.updateHarga();
- break;
- case 7:
- apps.catatanKeluar();
- break;
- case 8:
- apps.hapusBarang();
- break;
- case 0:
- System.out.println("Keluar dari program!!\n");
- check = false;
- break;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement