Advertisement
Guest User

Untitled

a guest
Sep 26th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.90 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3.  
  4. public class hotel {
  5.  
  6.  
  7.     public static void main(String[] args) {
  8.        
  9.  
  10.         Scanner input = new Scanner (System.in);
  11.         room convObject = new room ();
  12.  
  13.  
  14.  
  15.         System.out.println("Hello");
  16.         System.out.println("How many people are in your party? ");
  17.  
  18.         int name = input.nextInt();
  19.        
  20.  
  21.        
  22.         convObject.simpleMessage(name);
  23.  
  24.  
  25.         room conv2Object = new room ();
  26.        
  27.        
  28.        
  29.         String kids = input.nextLine();
  30.  
  31.    
  32.  
  33.  
  34.     }
  35. }
  36.  
  37. ----------------------------------------------------------------------------------------------------------
  38.  
  39. public class room {
  40.    
  41.     public void simpleMessage(int name){
  42.  
  43.  
  44.     if (name > 2){
  45.     System.out.println("We do not have any rooms that are greater than 2 people");
  46.     }
  47.     else{ System.out.println("We have space for you!");
  48.           System.out.println("Do you have any kids with you?");
  49.           int lol = input.nextInt();
  50.          
  51.     }
  52.    
  53.     }
  54.    
  55.  
  56.    
  57.    
  58.  
  59.    
  60. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement