reyhanzo

Untitled

Dec 17th, 2019
21
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class DVD extends Item
  2. {
  3.     private String director;
  4.     public DVD(String title, int playingtime, String director) //constructor
  5.     {
  6.         super(title,playingtime);
  7.         this.director=director;
  8.     }
  9.     public void setComment(String comment) //method untuk memasukkan comment DVD
  10.     {
  11.         super.setComment(comment);
  12.     }
  13.     public void setGotIt(boolean gotit) //method untuk memasukkan nilai ketersediaan DVD
  14.     {
  15.         super.setGotIt(gotit);
  16.     }
  17.     public String getDirector() //method untuk return nama director
  18.     {
  19.         return director;
  20.     }
  21.     public void print() //method untuk mencetak nama director
  22.     {
  23.         System.out.println("Director: " + director);
  24.     }
  25. }
RAW Paste Data