Question: CSE 110 Assignment 8 Can't figure out the useDelimiter method. Any ideas? // Date: the date you programmed Part 1: Writing Exercise (5 pts) Consider

CSE 110 Assignment 8

Can't figure out the useDelimiter method. Any ideas?

CSE 110 Assignment 8 Can't figure out the useDelimiter method. Any ideas?

// Date: the date you programmed Part 1: Writing Exercise (5 pts) Consider the following code snippet. It uses" A-Za-z]+" for the input of useDelimiter method. Write the output when using each regular expression, a) -d) below. The regular expression is explained in out Textbook Chapter 7 File f new File("CSE110A8.txt" Scanner in - new Scanner (f) in. useDe limiter (" [ ^A-Za-z] +") ; while ( in.hasNext) CSE110A8.txt - Notepad ile Edit Format Yiew Help Rectx 0 y 0 Width 10 Height 20 Rectx 100.5 y 125.2 Width 20.7 Height 10.0 String s-in.next ) System.out.print (s + "") in.close () a. in.useDellmi ter ("["A-Za-z]+") b. in.useDelimiter ("[0-9]") c. in.useDelimiter ("0-9]*") d. in.useDelimiter "[0-9] +") e. Write the regular expression in the delimiter method to generate the following output: in.useDelimiter "???") 0 0 10 20 100.5 125.2 20.710.0 Note: The answers to the 5 questions (a through e) above should be typed in the block of comments in the Dungeon.java file such as; e. in.useDelimiter ("XXXXX")

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!