wiley_pastebin

Abstract Classes 2

Mar 18th, 2019
2,248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.37 KB | None | 0 0
  1. public abstract class Item {
  2.  private String title;
  3.  private double playTime;
  4.  private boolean ownIt;
  5.  private String comment;
  6.  
  7.  public Item(String title, double playTime,
  8.            boolean ownIt, String comment) {
  9.  //...
  10. }
  11.  
  12.  public String getTitle() {
  13.   return title;
  14.  }
  15.  
  16.  //... other accessors
  17.  
  18.  public abstract String getDescription();
  19. }
Add Comment
Please, Sign In to add comment