Guest User

Untitled

a guest
Jul 12th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.10 KB | None | 0 0
  1. cabinet
  2.  
  3.  
  4. import java.util.Scanner;
  5.  
  6. public class cabinet {
  7.    
  8.      
  9.    
  10.    
  11.    
  12.    
  13.     static int wineinbottle = 8;
  14.     static int wineinglass = 0;
  15.     static int choice = 0;
  16.  
  17.     public static void main(String args[]){
  18.        
  19.         bottle bottleObject = new bottle();
  20.        
  21.        
  22.         Scanner input = new Scanner(System.in);
  23.        
  24.        
  25.        
  26.         System.out.println("Enter 1 to pour the wine from the bottle into the glass");
  27.         System.out.println("Enter 2 to drink wine");
  28.         System.out.println("Enter 3 to drink wine");
  29.        
  30.         choice = input.nextInt();
  31.        
  32.        
  33.         if(choice == 1){
  34.            
  35.             bottle.pourwine(wineinbottle, wineinglass, choice);
  36.            
  37.         }
  38.        
  39.        
  40.         System.out.println(wineinbottle);
  41.         System.out.println(wineinglass);
  42.        
  43.        
  44.        
  45.        
  46.     }
  47. }
  48.  
  49.  
  50. bottle
  51.  
  52.  
  53.  
  54. public class bottle {
  55.    
  56.     public static int wineinbottle = 8;
  57.     public static int wineinglass = 0;
  58.    
  59.     public static void pourwine(int wineinbottle, int wineinglass, int choice){
  60.        
  61.        
  62.         wineinbottle --;
  63.         wineinglass ++;
  64.        
  65.     }
  66.    
  67.     public static void drink(int wineinglass){
  68.        
  69.        
  70.        
  71.         switch(wineinglass){
  72.        
  73.         case 1:
  74.        
  75.        
  76.         }
  77.        
  78.     }
  79.    
  80.    
  81.    
  82.    
  83. }
Add Comment
Please, Sign In to add comment