subject

A. Prompt the user for a string that contains two strings separated by a comma. Examples of strings that can be accepted: Jill, Allen Jill, Allen Jill, Allen Ex: Enter input string: Jill, Allen b. Report an error if the input string does not contain a comma. Continue to prompt until a valid string is entered. Note: If the input contains a comma, then assume that the input also contains two strings. Ex: Enter input string: Jill Allen Error: No comma in string Enter input string: Jill, Allen
c. Extract the two words from the input string and remove any spaces. Store the strings in two separate variables and output the strings. Ex: Enter input string: Jill, Allen First word: Jill Second word: Allen
d. Using a loop, extend the program to handle multiple lines of input. Continue until the user enters q to quit. Ex: Enter input string: Jill, Allen First word: Jill Second word: Allen Enter input string: Golden, Monkey First word: Golden Second word: Monkey

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:00
Write a program that uses a widgetviewer object to do the following: generate two random integers between 1 and 9 (inclusive). name one of them x, the other y. display them to the user using jlabel objects. create a jlabel object displaying the text "enter an operation number." create a jtextfield for the user's input. create a jbutton displaying the text "press here when you've entered your operation." use addandwait to add it to the widgetviewer object. when the user clicks the jbutton, evaluate operation in the following order to determine the one and only mathematical operation to perform on x and y. use a jlabel to display the result. if operation is between 1 and 10 inclusive, add x and y. if operation is evenly divisible by 4, subtract y from x. if operation is evenly divisible by 5, use integer division to divide y into x. if operation is an even number, use floating point division to divide y into x. if none of the other tests on operation apply, multiply x and y. note: operation can be negative or zero.
Answers: 2
question
Computers and Technology, 23.06.2019 01:30
Negative methods of behavior correction include all but this: sarcasm verbal abuse setting an example for proper behavior humiliation
Answers: 1
question
Computers and Technology, 23.06.2019 07:00
You need a quick answer from a coworker. the most effective way to reach your coworker is through a. cloud server b. instant message c. teleconference d. telepresence
Answers: 1
question
Computers and Technology, 23.06.2019 14:30
Open this link after reading about ana's situation. complete each sentence using the drop-downs. ana would need a minimum of ato work as a translator. according to job outlook information, the number of jobs for translators willin the future.
Answers: 3
You know the right answer?
A. Prompt the user for a string that contains two strings separated by a comma. Examples of strings...
Questions
question
Mathematics, 30.03.2021 22:20
question
Mathematics, 30.03.2021 22:20
question
Social Studies, 30.03.2021 22:20
question
Biology, 30.03.2021 22:20
question
Mathematics, 30.03.2021 22:20
Questions on the website: 13722367