Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a Java program that repeatedly prompts the user to enter strings, using the string x done to indicate when finished. The user is

image text in transcribed

Write a Java program that repeatedly prompts the user to enter strings, using the string " x done" to indicate when finished. The user is assumed to only enter strings of the form "CS-stName", "SE-stName", "CCCstName" or "DSAI-stName". Output the names that had "CS" indicated in the same order they were entered, preceded by the string "CS students: ", and then do the same for the names that had "SE" indicated, preceded by the string "SE students:". Do the same to the names that had "CCC" indicated, preceded by the string "CCC students ", , and for the names that had "DSAI" indicated, preceded by the string "DSAI students: " Use four ArravUnboundedQueue objects in your program. Sample Run: Output - Queue hw (run) \#2 zun: Enter a name (CS, SE, CCC, or DSAI) or x-done to finish: CS-Akram Enter a name (CS, SE, CCC, or DSAI) or x-done to finish: SE-Sami Enter a name (CS, SE, CCC, or DSAI) or x-done to finish: DSAI-Aktham Enter a name (CS, SE, CCC, or DSAI) or -done to finish: CCC-Asal Enter a name (CS, SE, CCC, or DSAI) or -done to finish: DSAI-Zahran Enter a name (CS, SE, CCC, or DSAI) or x-done to finish: CS-Hala Enter a name (CS, SE, CCC, or DSAI) or x-done to finish: SE-Basel Enter a name (CS, SE, CCC, or DSAI) or x-done to finish: x-done cS students: Akram Hala SE students: Sami Basel cCC students: Asal DSAI students: Aktham Zahran BUILD succESSFUL (total time: 47 seconds)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases In Networked Information Systems 6th International Workshop Dnis 2010 Aizu Wakamatsu Japan March 2010 Proceedings Lncs 5999

Authors: Shinji Kikuchi ,Shelly Sachdeva ,Subhash Bhalla

2010th Edition

3642120377, 978-3642120374

More Books

Students also viewed these Databases questions

Question

Find the cost of goods sold for Inventory Table B.

Answered: 1 week ago