Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class hotel {
- public static void main(String[] args) {
- Scanner input = new Scanner (System.in);
- room convObject = new room ();
- System.out.println("Hello");
- System.out.println("How many people are in your party? ");
- int name = input.nextInt();
- convObject.simpleMessage(name);
- room conv2Object = new room ();
- String kids = input.nextLine();
- }
- }
- ----------------------------------------------------------------------------------------------------------
- public class room {
- public void simpleMessage(int name){
- if (name > 2){
- System.out.println("We do not have any rooms that are greater than 2 people");
- }
- else{ System.out.println("We have space for you!");
- System.out.println("Do you have any kids with you?");
- int lol = input.nextInt();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement