Advertisement
Guest User

Untitled

a guest
Mar 16th, 2013
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.49 KB | None | 0 0
  1.  
  2. package bikeshop;
  3.  
  4.  
  5. public class obj {
  6.    
  7.     private int Order_Time;
  8.     private boolean Order_Tip;
  9.     public int Price;
  10.    
  11.         public  obj(int Order_Time, boolean Order_Tip){
  12.         this.Order_Time = Order_Time;
  13.         this.Order_Tip = Order_Tip;
  14.        
  15.         }
  16.        
  17.        
  18. //        public int calcTime( int orderAge){
  19. //            Order_Time = orderAge;
  20. //            return Order_Time;
  21. //        
  22. //        }
  23.        
  24.          public int calcTip( boolean orderType){
  25.             this.Order_Tip = orderType;
  26.             if(orderType){
  27.                 this.Price=12;
  28.             }else{
  29.             this.Price =15;
  30.             }
  31.             return this.Price;
  32.             }
  33.            
  34.          public void vypis(){
  35.      System.out.println(" Price is  " + this.Price);
  36.   }
  37.          
  38.          
  39.        //**************************************************************
  40.        //********************Getter\Setter*****************************
  41.     public int getOrder_Time() {
  42.         return Order_Time;
  43.     }
  44.  
  45.     public void setOrder_Time(int Order_Time) {
  46.         this.Order_Time = Order_Time;
  47.     }
  48.  
  49.     public boolean isOrder_Tip() {
  50.         return Order_Tip;
  51.     }
  52.  
  53.     public void setOrder_Tip(boolean Order_Tip) {
  54.         this.Order_Tip = Order_Tip;
  55.     }
  56.    
  57.     //**************************************************************
  58.     //**************************************************************    
  59.          
  60.          
  61.        
  62. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement