Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Helpmemakethis 100 Using Java's Built-in Methods in Java X Tasks >- Terminal ChangeCase.java 1 import java.util.Scanner; Program successfully uses tolowercase and touppercase Enter a string

image text in transcribedimage text in transcribed

Helpmemakethis 100 Using Java's Built-in Methods in Java X Tasks >- Terminal ChangeCase.java 1 import java.util.Scanner; Program successfully uses tolowercase and touppercase Enter a string or done when you want to quit. O 0.00 10.00 O out of 2 checks passed. Review the results below for more details. Checks Code Pattern. Incomplete Test for touppercase Description Searched your code for a specific pattern: touppercase (1) You can learn more about regular expressions here. Code Pattern. Incomplete Test for to Lowercase 3 public class changecase { 4 5 public static void main(String args[]) { 6 Scanner s = new Scanner(System.in); 7 String sample; 8 String result; 9 System.out.println("Enter a string or done when you want to quit."); 10 sample - S.nextLine(); 11 12 while (sample.compareTo("done") != ) { 13 14 // call () method here and print the result. 15 result = String.valueof(lower Arr(sample.tocharArray()); 16 System.out.println("Lowercase: " + result); 17 18 result = String.valueof(upperArr(sample.tocharArray()); 19 // call () method here and print the result. 20 System.out.println("uppercase: " + result); 21 System.out.println("Enter a string or done when you want to quit."); sample = s.nextLine(); } 25 System.exit(); 26 } // End of main() method. 27 28 private static char[] lowerArr(char[] charArray) { 29 for(int i=0; i Run Checks Submit 50% Helpmemakethis 100 Using Java's Built-in Methods in Java X Tasks >- Terminal ChangeCase.java 1 import java.util.Scanner; Program successfully uses tolowercase and touppercase Enter a string or done when you want to quit. O 0.00 10.00 O out of 2 checks passed. Review the results below for more details. Checks Code Pattern. Incomplete Test for touppercase Description Searched your code for a specific pattern: touppercase (1) You can learn more about regular expressions here. Code Pattern. Incomplete Test for to Lowercase 3 public class changecase { 4 5 public static void main(String args[]) { 6 Scanner s = new Scanner(System.in); 7 String sample; 8 String result; 9 System.out.println("Enter a string or done when you want to quit."); 10 sample - S.nextLine(); 11 12 while (sample.compareTo("done") != ) { 13 14 // call () method here and print the result. 15 result = String.valueof(lower Arr(sample.tocharArray()); 16 System.out.println("Lowercase: " + result); 17 18 result = String.valueof(upperArr(sample.tocharArray()); 19 // call () method here and print the result. 20 System.out.println("uppercase: " + result); 21 System.out.println("Enter a string or done when you want to quit."); sample = s.nextLine(); } 25 System.exit(); 26 } // End of main() method. 27 28 private static char[] lowerArr(char[] charArray) { 29 for(int i=0; i Run Checks Submit 50%

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 Basics Computer EngineeringInformation Warehouse Basics From Science

Authors: Odiljon Jakbarov ,Anvarkhan Majidov

1st Edition

620675183X, 978-6206751830

More Books

Students also viewed these Databases questions