Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The Maximum Character. Using the provided method header, write a method to determine the character with the highest ASCII value within a string. Your main
The Maximum Character. Using the provided method header, write a method to determine the character with the highest ASCII value within a string. Your main program must ask for the string. You can use the example executions below to test your work, but your code should work for different values. public static char maximumChar(String str, char max) Examples: maximumChar("Data Structures", ^\\0') returns the character 'u' maximumChar("Algoma U", "\\0') returns the character 'o' sole, 23W maximumChar("COSC2006", \\\\0') returns the character 'S' maximumChar("1234", \\\\0') returns the character '4' Reverse Number. Using the provided method header, write a method to reverse a number, In your reverse method, if the number is negative, reverse the number and put the negative sign after the reversed number. (this check is not in main) Your main program must ask for the number. HINT: you will need to use the divide operation and the modulus operator for this question. You can use the example executions below to test your work, but your code should also work for different values. You are not allowed to use any string operations here. public static void reverse(int number) Examples: Reverse(12345) prints 54321 Reverse(-12345) prints 54321- Prof. Your methods for this lab must be recursive - if they are not, you will receive a zero for that question. Your method headers must match the ones provided, and you must use all parameters. If you do not, you will receive a grade of zero for that question. Do not use any static variables in any of your programs. Doing so will result in a grade of zero for the entire lab
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started