Advertisement
Guest User

E

a guest
Dec 13th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. public class DVD implements RetailItem
  2. {
  3. private String title;
  4. private int runningTime;
  5. private double retailPrice;
  6. public DVD(String dvdt, int runTime, double dvdp) {
  7. title = dvdt; runningTime = runTime; retailPrice = dvdp;
  8. }
  9.  
  10. public String getTitle() {
  11. return title;
  12. }
  13.  
  14. public int getRunTime() {
  15. return runningTime;
  16. }
  17.  
  18. public double getRetailPrice() {
  19. return retailPrice;
  20. }
  21.  
  22. public void showPrice(DVD dvd) {
  23. System.out.println(dvd.getRetailPrice());
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement