Advertisement
Guest User

UASNO2

a guest
Jul 19th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.34 KB | None | 0 0
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6.  
  7. package uas_nomer2;
  8. import java.io.BufferedReader;
  9. import java.io.IOException;
  10. import java.io.InputStreamReader;
  11.  
  12. /**
  13. *
  14. * @author PC 11
  15. */
  16. public class UAS_Nomer2 {
  17.  
  18. /**
  19. * @param args the command line arguments
  20. */
  21. public static void main(String[] args) throws IOException {
  22. // TODO code application logic here
  23. BufferedReader input = new BufferedReader (new InputStreamReader(System.in));
  24. String code;
  25. String nama;
  26. String jenis;
  27. String tipe;
  28. String lisen;
  29. int pilihan;
  30.  
  31. /////////////////////////////////////////
  32.  
  33. Konsumen2 print = new Konsumen2 ("","", "");
  34. Konsumen2 $print = new Konsumen2 ("", "", "");
  35.  
  36. System.out.println("+++++Game Pertama+++++");
  37. System.out.println("----------------------");
  38.  
  39. System.out.println("Kode Game:");
  40. print.code = code = input.readLine();
  41. System.out.println("Nama :");
  42. print.namagame = nama = input.readLine();
  43. System.out.println("Jenis :");
  44. print.jenis = jenis = input.readLine();
  45. System.out.println("Type :");
  46. print.type = tipe = input.readLine();
  47. System.out.println("Lisensi :");
  48. print.lisensi = lisen = input.readLine();
  49. System.out.println("");
  50.  
  51. System.out.println("Lihat Data");
  52. System.out.println("1. Data Pertama\n"
  53. + "2. Data Kedua\n"
  54. + "0.Exit");
  55. System.out.println("Masukan Pilihan : ");
  56.  
  57. pilihan = Integer.parseInt(input.readLine());
  58.  
  59. /////////////////////////////////////////////
  60. // coding by denny-id.blogspot.co.id //
  61. while (pilihan != 0) {
  62. switch (pilihan) {
  63. case 1:
  64. System.out.println("Rincian Game" + print.getNama());
  65. System.out.println("==============================");
  66. System.out.println("Kode Game :" + print.getCod());
  67. System.out.println("-------------------------------");
  68. System.out.println("Nama Game :" + print.getNama());
  69. System.out.println("-------------------------------");
  70. System.out.println("Jenis Game :" + print.getJenis());
  71. System.out.println("-------------------------------");
  72. System.out.println("Type Game :" + print.getType());
  73. System.out.println("-------------------------------");
  74. System.out.println("Lisensi Game :" + print.getlis());
  75. System.out.println("-------------------------------");
  76. break;
  77.  
  78. default:
  79. }
  80. ////////////////////////////////////////////////////////////////////
  81. System.out.println("Lihat Data");
  82. System.out.println("1. Data Pertama\n"
  83. + "2. Data Kedua\n"
  84. + "0.Exit");
  85. System.out.println("Masukan Pilihan : ");
  86. pilihan = Integer.parseInt(input.readLine());
  87. }
  88. }
  89. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement