Advertisement
Guest User

Untitled

a guest
Mar 31st, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.95 KB | None | 0 0
  1. package oop;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class OOP {
  6.  
  7. public static void main(String[] args) {
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14. Scanner imr = new Scanner(System.in);
  15.  
  16. System.out.println(" Selamat datang di Gojek kawe! ");
  17. System.out.println(" Semoga anda puas menggunakan aplikasi ini! ");
  18. System.out.println("============================================");
  19.  
  20.  
  21. System.out.println("LOGIN");
  22.  
  23. System.out.print("Masukkan user : ");
  24.  
  25. String username=imr.nextLine();
  26.  
  27.  
  28.  
  29. System.out.print("Masukkan pass : ");
  30.  
  31. int password = imr.nextInt();
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39. System.out.println("Silahkan pilih menu :");
  40.  
  41. System.out.println(" 1.Goride goride an ");
  42.  
  43. System.out.println(" 2.Gofood gofood an ");
  44.  
  45. System.out.println(" 3.Gosend gosend an ");
  46.  
  47. System.out.print("Masukkan pilihan : ");
  48.  
  49. int pilih = imr.nextInt();
  50.  
  51. switch(pilih){
  52.  
  53. case 1:
  54.  
  55. System.out.println("Anda memilih menu Goride silahkan pilih");
  56.  
  57. System.out.println("1.Kumaha maneh - Atuh weh");
  58.  
  59. System.out.println("2.Serah lu - Dah atur bae");
  60.  
  61. System.out.println("3.Karepmu - Gas gak rewel");
  62.  
  63. System.out.print("Masukkan pilihan : ");
  64.  
  65. int pilih1 = imr.nextInt();
  66.  
  67. switch(pilih1){
  68.  
  69. case 1:
  70.  
  71. Goride a =new Goride(" Kumaha maneh " , " Atuh weh " , 2000,7);
  72.  
  73. a.tampilGoride();
  74.  
  75. break;
  76.  
  77. case 2:
  78.  
  79. Goride b =new Goride(" Serah lu " , " Dah atur bae " , 2000 , 5);
  80.  
  81. b.tampilGoride();
  82.  
  83. break;
  84. case 3:
  85.  
  86. Goride c = new Goride(" Karepmu " , " Gas gak rewel " , 2000 , 3);
  87.  
  88. c.tampilGoride();
  89.  
  90. break;
  91. }
  92. break;
  93.  
  94. case 2:
  95.  
  96. System.out.println(" Anda memilih menu Gofood silahkan pilih : ");
  97. System.out.println( " 1.Chicken Honey Mustard " );
  98. System.out.println( " 2.Spaghetti Aglio Olio " );
  99. System.out.println( " 3.Roasted Quail Stuffed with Egg risotto " );
  100. System.out.print("Masukkan pilihan : ");
  101.  
  102. int pilih2 = imr.nextInt();
  103. switch(pilih2){
  104. case 1:
  105. Gofood a =new Gofood( " Chicken Honey Mustard " , 55000);
  106. a.tampilGofood();
  107. break;
  108.  
  109. case 2:
  110.  
  111. Gofood b =new Gofood( " Spaghetti Aglio Olio " , 59000);
  112. b.tampilGofood();
  113. break;
  114. case 3:
  115. Gofood c =new Gofood( " Roasted Quail Stuffed with Egg risotto " , 70000);
  116. c.tampilGofood();
  117. break;
  118. }
  119. break;
  120.  
  121. case 3:
  122.  
  123. System.out.println("Anda memilih menu Goride silahkan pilih");
  124. System.out.println( "1.Barang Aku ");
  125. System.out.println( "2.Barang Kamu ");
  126. System.out.println( "3.Barang Kita ");
  127. System.out.print("Masukkan pilihan : ");
  128.  
  129.  
  130. int pilih3 = imr.nextInt();
  131. switch(pilih3){
  132. case 1:
  133. Gosend a =new Gosend(" Barang Aku " , 5.5 , 1.28);
  134. a.tampilGosend();
  135. break;
  136. case 2:
  137. Gosend b =new Gosend(" Barang Kamu ", 5.5 , 2);
  138. b.tampilGosend();
  139. break;
  140. case 3:
  141. Gosend c =new Gosend(" Barang Kita ", 5.5 , 3.5);
  142. c.tampilGosend();
  143. break;
  144. }
  145. System.out.println("Terima Kasih telah menggunakan aplikasi ini :) ");
  146.  
  147.  
  148.  
  149.  
  150. }
  151. }
  152. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement