Computers and Technology

6.6 parsing strings (java) (1) prompt the user for a string that contains two strings separated by a comma. (1 pt) examples of strings that can be accepted: jill, allen jill , allen jill, allen ex: enter input string: jill, allen (2) 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. (2 pts) ex: enter input string: jill allen error: no comma in string enter input string: jill, allen (3) extract the two words from the input string and remove any spaces. store the strings in two separate variables and output the strings. (2 pts) ex: enter input string: jill, allen first word: jill second word: allen (4) using a loop, extend the program to handle multiple lines of input. continue until the user enters q to quit. (2 pts) ex: enter input string: jill, allen first word: jill second word: allen enter input string: golden , monkey first word: golden second word: monkey enter input string: washington, dc first word: washington second word: dc enter input string: q lab

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 15:40, qhenley
Most networking media send data using in which data is represented by only two discrete states: 0s and 1s. a. digital signals b. contiguous signals c. ramp signals d. exponential signals
Answers: 1
image
Computers and Technology, 21.06.2019 18:00, kimmosley80
Which if the following allows you to view and access important information about your documents all in one location
Answers: 3
image
Computers and Technology, 21.06.2019 19:40, queenskyyt
Write the quartstogallons java class that declares a named constant to hold the number of quarts in a gallon (4). also declare a variable to represent the number of quarts needed for a painting job, and assign an appropriate value—for example, 18. compute and display the number of gallons and quarts needed for the job. display explanatory text with the values, for example:
Answers: 2
image
Computers and Technology, 22.06.2019 14:20, capo9972
Cengagenowv2 is a comprehensive online learning tool. using cengagenowv2, you may access all of the following except: 2. each time you log in, cengagenowv2 automatically performs a system check and informs you if your computer does not meet the cengagenowv2 system requirements. 3. which tab/page allows you to easily track your assignment scores, number of submissions, time spent, as well as the ability view assign
Answers: 3
Do you know the correct answer?
6.6 parsing strings (java) (1) prompt the user for a string that contains two strings separated by a...

Questions in other subjects:

Konu
Social Studies, 16.09.2019 22:50