Advertisement
Guest User

Untitled

a guest
Apr 25th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. public abstract class Camera {
  2.  
  3. private String brand;
  4. private String model;
  5. private String description;
  6.  
  7. public Camera(String brand, String description, String model) {
  8. this.brand = brand;
  9. this.description = description;
  10. this.model = model;
  11. }
  12.  
  13. public Camera(String brand, String model) {
  14. this(brand, "No description given.", model);
  15. }
  16.  
  17. public String getDescription() {
  18. return description;
  19. }
  20.  
  21. public String getModel() {
  22. return model;
  23. }
  24.  
  25. public String getBrand() {
  26. return brand;
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement