Posts

Showing posts from December, 2021

Program Aplikasi Warung Sederhana Menggunakan Method

Image
Nama : Rayhan Qalby Ramadhan NPM : 21082010008 Tampilan Program : Source Code :  package subprogram; import java.util.Scanner; public class AppWarung {     static int hitungHarga(int hargaSatuan, int jumlah) {         int harga = hargaSatuan * jumlah;         return harga;     }     static String[][] sort(String[] menu, int[] harga) {         String[][] hasilUrutan = new String[10][2];         for (int i = 0; i < menu.length; i++) {             for (int j = 0; j < menu.length - 1; j++) {                 if (menu[j].compareToIgnoreCase(menu[j + 1]) > 0) {                     String t = menu[j];                     menu[j] = menu[j + 1];                   ...

Aplikasi Kasir Kedai (Searching)

Image
Nama : Rayhan Qalby Ramadhan NPM : 21082010008 Tampilan Program :  Source Code :  package searching; import java.util.Scanner; public class AppWarungMakan {     public static void main(String[] args) {         Scanner sc = new Scanner(System.in);         //array         String menuMakanan[] = new String[10];         int harga[] = new int[10];         int jumlah[] = new int[5];         String beliMakan[] = new String[5];         int beliHarga[] = new int[5];         String cariMakan[] = new String[10];         int cariHarga[] = new int[10];         int jumlahBeli = 0;         int totalHarga = 0;         int subTotal[] = new int[10];         int inputUangTunai, uangKembalian;         //inisiali...