Question: Create a class that will have the following static methods as exercises a. Public static boolean isSorted(String s) i. Checks whether a string is in

Create a class that will have the following static methods as exercises a. Public static boolean isSorted(String s) i. Checks whether a string is in alphabetical order. Each letter in the string must not precede any letters that appear before it in the alphabet. e.g., bdfjk is in alphabetical order bdcfjk is not ii. It would be a good idea to look at the String and Character API in the Java docs for what methods to use. Specifically that Character.compare() methods, and combine this with the String charAt() method. b. public static void border(int N, int M) i. Using a double nested for loop, print a NxM rectangle where the border is filled with symbol and the center has o. Rest of the rectangle is blank. (Note: The spacing is not symmetrical in MS Word with line vs space differences but it will be when just printing+ symbols & spaces when used in your Java program) 4 c. public static void N (int n) i. Using a double nested loop (a for loop and while loop), print an 'N' of asterisks where n is the height (or number of asterisks in vertical direction). You can choose any appropriate value for width
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
