Question: Write a Java program that repeatedly prompts the user to enter strings, using the string X finish 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 " X finish" to indicate when finished. The user is assumed to only enter strings of the form "E name" or "U name". Output the names that had "E" indicated in the same order they were entered, preceded by the string "Employed:" and then do the same for the names that had " U " indicated, preceded by the string "Unemployed: ". Use two ArrayUnboundedQueue objects in your program. Sample Run: Enter string formated as M name or S name : U ali Enter string formated as M name or S name : U rami Enter string formated as M name or S name : E leen Enter string formated as M name or S name : E omar Enter string formated as M name or S name : U hadeel Enter string formated as M name or S name : E farha Enter string formated as M name or S name : X finish Employed: Teen omar farah Unemployed: ali rami hadeel

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!