Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.96 KB | None | 0 0
  1. package id.ac.its.nico.CDDVD;
  2.  
  3. public class MenuAkses
  4. {
  5.     public static void main(String[]args){
  6.         Database database = new Database();
  7.         Catridge koleksi1, koleksi2;
  8.         DVD game1, game2;
  9.        
  10.         koleksi1 = new Catridge("Sonic", "Origin Games", 134, 5);
  11.         koleksi1.setOwn(true);
  12.         koleksi1.setComment("Good!");
  13.         koleksi2 = new Catridge("Fire Rescue Day!", "Moonton", 153, 2);
  14.         koleksi2.setComment("Not Bad");
  15.         koleksi2.setOwn(false);
  16.         game1 = new DVD("American Pie", "Acshool", 100, 1000000);
  17.         game1.setOwn(true);
  18.         game1.setComment("Incridible");
  19.         game2 = new DVD("Final Destination", "Matscul", 123, 550000);
  20.         game2.setOwn(false);
  21.         game2.setComment("Recommended");
  22.        
  23.         database.addItem(koleksi1);
  24.         database.addItem(koleksi2);
  25.         database.addItem(game1);
  26.         database.addItem(game2);
  27.         database.cetakList();
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement