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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!