Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I'm having trouble implement this without using arrays and splits, anyone have any tips. Method name: lowestAlphabetically Parameter(s): A String of lower-case words separated by
I'm having trouble implement this without using arrays and splits, anyone have any tips.
- Method name: lowestAlphabetically
- Parameter(s): A String of lower-case words separated by spaces and made up of the letters a-z. The String will have at least one word. Return value: A String containing the lowest alphabetical word. The String method compareTo() does a lexicographic comparison between two strings, which allows you to test for the lowest alphabetical word. Read documentation on compareTo() in order to understand how to use it. Example: lowestAlphabetically("cat dog apple fish") would return "apple".
- Method name: curveScores Parameter(s): A String containing numbers from 0 to 100. Each number is separated by a space. There must be at least one number in the String. Return value: A String of numbers scaled so that the highest number in the parameter String becomes 100 and all the other numbers are moved up by the same amount. This String should also be numbers separated by spaces with no additional characters. The order of the numbers should stay the same, so that a number in the original string has the equivalent scaled number in the returned string in the same place. Example: curveScores("45 85 90") would return "55 95 100".
The program language is is Java
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