Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- boolean quit = false;
- // Displaying Welcome Message
- // displayWelcomeMessage();
- // This will display the instructions on what to enter
- // when the user is done typing the names to sort
- displayString("When you are finished entering names, enter the word, quit");
- // This Do-While Loop will contain the Get String Function
- // It will also contain the Function that will determine which
- // strings qualify for the first name and last name
- do
- {
- String newValue = getString("Please enter a name.");
- // If statement to confirm if quit has been inputted to end loop
- if (newValue.equalsIgnoreCase("quit"))
- {
- quit = true;
- } // End of If Statement
- displayString(newValue);
- } while(quit != true);
- System.out.println("This will be where it calls the Module");
- System.out.println("to display the first & last.");
- // Displaying GoodBye Message
- // goodbyeMessage();
- System.out.println("");
- System.out.println(msg);
- System.out.println("");
- System.out.println(msg);
- String newValue = keyboard.nextLine(); //gets a the entire line as a String
- // Replaces all spaces with null and checks if entered value is null
- if (newValue.replace(" ", "").equals(""))
- {
- System.err.println("Error: No input. Ending Program.");
- System.exit(-1);
- }
- return newValue;
Add Comment
Please, Sign In to add comment