Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I'm posting this question 3 times. can you please solve it correctly? 22. Methods in Java Your coding style ( 10 points). Prepare a method

I'm posting this question 3 times. can you please solve it correctly?
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
22. Methods in Java Your coding style ( 10 points). Prepare a method and call it methodSeparator. The methodSeparator should return a string array with a parametric separator between them. There should be no separator before the first or after the last element. The methodSeparator should have two input parameters. The first one is a string array, and the second input is a string value which will be used as a separator. Please check to be sure that the input array and the separator are not empty. If any input value is empty, immediately terminate the method (10 points). Sample output +1444+2,b+ Exanple for the First Input : [y, a,v,u,z,s,e,1,i,m,h,i,n,d,i,s,t,a,n] methodSeparator with = meparator :y avuzseIishindistan Prepare another method and call it methodCase. The methodCase should return a string value and have two input parameters. The first input parameter is a string variable, and the second is a boolean variable. The methodCase should change the case of the first input value according to the second input. When the second input is true, the methodCase changes the case of the first input to uppercase, otherwise to lowercase (10 Points). Sample output HW4.2.cm Example for the First Input :THIS is A TEST for the METHOOCASE methodcase with "true" input :THIS DS A TEST FOR THE METHODCASE methodcase with "false" input :thils is a test for the methodcase Example for the First Input :everyting is lowercase methodcase with "true" input :EVERYTENG ES LOWERCASE methodcase with "false" input :everyting is lowercase d) Prepare the last method and call it methodSeparatorCase. The purpose of this method is to create a combination of methodSeparator and methodCase. The methodSeparatorCase should return a string array with a parametric separator between items. There should be no separator before the first or after the last element. In this method, there should be three input parameters. The first one is a string array, and the second input is a string value which will be used as a separator. The third input is a boolean variable. When the third input is true, the methodSeparatorCase changes the case of the items of the first input array to uppercase, otherwise to lowercase. Please check to be sure that the input array and the separator are not empty. If any input value is empty, then immediately terminate the method. Please do not write again the methodCase codes. Instead, call the methodCase for each array item in a loop in this method (10 points). Sample output - =14i4, 2.den nethodSaparaterCase with "no* segarater and with "true" nethodSeparatercast with "*.." segarator and with "true*" twample for the pirst Input IfM, 3,5,1,0,3,6,3,1,1,2,a2,2,2] e) Prepare a test case and show the test result. The test case table columns are "Test Case", "Expected Result", "Explanation", and "Test Result". You should test the following cases, you can add more cases: - Lower and upper case of your name and surname. - Empty input value cases. - methodSeparator, methodCase, and methodSeparatorCase should be tested separately (10 point

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

Step: 3

blur-text-image

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

Database And Expert Systems Applications Dexa 2021 Workshops Biokdd Iwcfs Mlkgraphs Al Cares Protime Alsys 2021 Virtual Event September 27 30 2021 Proceedings

Authors: Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil ,Bernhard Moser ,Atif Mashkoor ,Johannes Sametinger ,Anna Fensel ,Jorge Martinez-Gil ,Lukas Fischer

1st Edition

3030871002, 978-3030871000

More Books

Students also viewed these Databases questions

Question

Is it clear what happens if an employee violates the policy?

Answered: 1 week ago