Guest User

Untitled

a guest
Jul 21st, 2019
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.30 KB | None | 0 0
  1. public class ScentedCandle extends Candle {
  2.     private String scent;
  3.  
  4.     protected String getScent() {
  5.         return scent;
  6.     }
  7.  
  8.     protected void setScent(String scent) {
  9.         this.scent = scent;
  10.     }
  11.  
  12.     @Override
  13.     protected void setHeight(double height) {
  14.         super.setHeight(height);
  15.         this.price = height*3;
  16.     }
  17. }
Add Comment
Please, Sign In to add comment