Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class DVD extends Item
- {
- private String director;
- public DVD(String title, int playingtime, String director) //constructor
- {
- super(title,playingtime);
- this.director=director;
- }
- public void setComment(String comment) //method untuk memasukkan comment DVD
- {
- super.setComment(comment);
- }
- public void setGotIt(boolean gotit) //method untuk memasukkan nilai ketersediaan DVD
- {
- super.setGotIt(gotit);
- }
- public String getDirector() //method untuk return nama director
- {
- return director;
- }
- public void print() //method untuk mencetak nama director
- {
- System.out.println("Director: " + director);
- }
- }
Add Comment
Please, Sign In to add comment