Advertisement
Guest User

Untitled

a guest
Jul 21st, 2019
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.43 KB | None | 0 0
  1. public class Candle {
  2.     private String color;
  3.     private double height;
  4.     private double price;
  5.  
  6.     protected String getColor() {
  7.         return color;
  8.     }
  9.  
  10.     protected void setColor(String color) {
  11.         this.color = color;
  12.     }
  13.  
  14.     protected double getHeight() {
  15.         return height;
  16.     }
  17.  
  18.     protected void setHeight(double height) {
  19.         this.height = height;
  20.         this.price = height*2;
  21.     }
  22.  
  23.     protected double getPrice() {
  24.         return price;
  25.     }
  26.  
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement