Question: Write a Java program that repeatedly prompts the user to enter strings, using the string E end to indicate when finished. The user is
Write a Java program that repeatedly prompts the user to enter strings, using the string " E end" to indicate when finished. The user is assumed to only enter strings of the form "firstname lastname". Output the first names in the same order they were entered, preceded by the string "First Name Queue: " and then do the same for the last names, preceded by the string "Last Name Queue ". Use ArrayUnboundedQueue objects in your program. Sample Run: W run: W Enter a String formatted as firstname and lastname : Yusef Alqasrawi Enter a String formatted as firstname and lastname : Mahmoud Jawarneh Enter a String formatted as firstname and lastname : Said Elaiwat Enter a String formatted as firstname and lastname : Mohamned Khader Enter a String formatted as firstname and lastname : E end First Mame Queue: Yusef Mahmoud Said Mohamed Last Name queue: Alqasraw1 Jawarneh Elaiwat Khader BurLD successeUL (total time: 1 minute or seconds)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
