예제 #1
0
 public static void cariMobil(MobilTersedia[] listMobil, int seatCount)
 {
     Console.WriteLine("Nama Mobil\tTersedia");
     for (int i = 0; i < 3; i++)
     {
         if (listMobil[i].SeatCount == seatCount)
         {
             Console.WriteLine("Mobil {0}\t{1}", listMobil[i].nama, listMobil[i].stock);
         }
     }
     Sewa.tampilkanPaket(listMobil);
 }
예제 #2
0
 public static void tampilkanPaket(MobilTersedia[] listMobil)
 {
     Console.WriteLine("==================================================================");
     Paket[] listPaket = new Paket[3];
     listPaket[0] = new Paket("Per jam", 200000);
     listPaket[1] = new Paket("Per hari", 190000);
     listPaket[2] = new Paket("Per minggu", 180000);
     Console.WriteLine("Jenis Paket\tTarif");
     for (int i = 0; i < listPaket.Length; i++)
     {
         Console.WriteLine("{0}\t{1}", listPaket[i].nama, listPaket[i].tarif);
     }
     Sewa.pilih(listMobil, listPaket);
 }