SHARE
TWEET

Untitled

a guest Nov 21st, 2019 88 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. public class Hotel extends Smjestaj {
  3.  
  4.    
  5.     private boolean imaBazen;
  6.     private boolean imaSpaCentar;
  7.    
  8.    
  9.     public boolean isImaBazen() {
  10.         return imaBazen;
  11.     }
  12.  
  13.     public void setImaBazen(boolean imaBazen) {
  14.         this.imaBazen = imaBazen;
  15.     }
  16.  
  17.     public boolean isImaSpaCentar() {
  18.         return imaSpaCentar;
  19.     }
  20.  
  21.     public void setImaSpaCentar(boolean imaSpaCentar) {
  22.         this.imaSpaCentar = imaSpaCentar;
  23.     }
  24.  
  25.     @Override
  26.     double racunanjeCijeneNocenja() {
  27.         // TODO Auto-generated method stub
  28.         double cijenaNocenja = super.getOsnovaZACijenuNocenja();
  29.         if(imaBazen)
  30.             cijenaNocenja = cijenaNocenja + 10;
  31.         if(imaSpaCentar)
  32.             cijenaNocenja = cijenaNocenja + 20;
  33.        
  34.         return cijenaNocenja;
  35.     }
  36.  
  37.     @Override
  38.     public String toString() {
  39.         return "Hotel [imaBazen=" + imaBazen + ", imaSpaCentar=" + imaSpaCentar + "]" + super.toString();
  40.     }
  41.    
  42.    
  43. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top