Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Candle {
- private String color;
- private double height;
- private double price;
- protected String getColor() {
- return color;
- }
- protected void setColor(String color) {
- this.color = color;
- }
- protected double getHeight() {
- return height;
- }
- protected void setHeight(double height) {
- this.height = height;
- this.price = height*2;
- }
- protected double getPrice() {
- return price;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement