Question: QUESTION 4 (15 MARKS) The split method in the String class returns an array of strings consisting of the substrings split by the delimiters. However,

 QUESTION 4 (15 MARKS) The split method in the String class
returns an array of strings consisting of the substrings split by the

QUESTION 4 (15 MARKS) The split method in the String class returns an array of strings consisting of the substrings split by the delimiters. However, the delimiters are not returned. Implement the following new method that returns an array of strings consisting of the substrings split by the matching delimiters, including the matching delimiters. public static String[] split(Strings, String regex) For example, split("ab#12#453", "#") returns ab, #, 12, #, 453 in an array of String, and split("a?b?gf#e", "[?#1") returns a, ?, b, ? gf, #, and e in an array of String Write a test program to show that your split method works properly. Assignment Marking Scheme 1/3 marks - Proper documentation and readability of the program - Header documentation includes: Course Name, Student name, Student number, Assignment number and date completed. - There must be a general description of the purpose of the method/function used. - Appropriate comments: where necessary, within the method function, there should be inline comment descriptions of declaration of variables, statements, control structures and etc. to improve the readability of the program. - Properly named variables: well-chosen descriptive variable names make it easier for readers or analysts to understand what the intent of the variable or what the system is doing. Example: payRate =5.0 as oppose to x=5. Properly named variable can also avoid naming collision. - Properly named method/function: method name should imply the intent of the method and what the method is doing. - All identifier names should follow standard naming convention in Java. - Proper indentation and spacing in program improves readability. 1/3 marks - Programming language knowledge and skills - Demonstrate the use of concepts in Java such as: object-orientation, interface, package, class, exception and etc., learnt in the class. - Demonstrate the use of basic programming concepts. - Use of features not presented in the class must be relevant and properly commented. - Program shows a clear understanding of programming concepts in general. - Good programming practices and skills 1/3 marks - Program compile and run with correct output

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!