- This quiz has 2 sections.
- fundamentals
Calculator
StringUtils
- arrays
ArrayUtils
- fundamentals
- Description
- The purpose of this class is to create a simple calculator.
- Methods to Complete
Double add(Double val1, Double val2)
- return the sum of
val1
andval2
- return the sum of
Double subtract(Double val1, Double val2)
- return the difference of
val1
andval2
- return the difference of
Double divide(Double val1, Double val2)
- return the quotient of
val1
andval2
- return the quotient of
Double squareRoute(Double value)
- return the square root of
value
- return the square root of
Double square(Double value)
- return the square of
value
- return the square of
Double[] squareRoutes(Double[] values)
- return an array of
Double
, containing the square root of each of the elements invalues
.
- return an array of
Double[] squares(Double[] values)
- return an array of
Double
, containing the square of each of the elements invalues
.
- return an array of
- Description
- The purpose of this class is to create utility
String
methods
- The purpose of this class is to create utility
- Methods to Complete
String getMiddleCharacter(String string)
- return character at index
string.length()/2
asString
.
- return character at index
String capitalizeMiddleCharacter(String string)
- return near-identical
String
with character at indexstring.length()/2
capitalized.
- return near-identical
String lowercaseMiddleCharacter(String string)
- return near-identical
String
with character at indexstring.length()/2
lowercased.
- return near-identical
String invertCasing(String string)
- return near-identical
String
with each character's casing inverted: Capital letters become lowercase, lowercase letters become lowercase.
- return near-identical
Boolean hasDuplicateConsecutiveCharacters(String string)
- return
true
ifstring
contains two identical characters in adjacent indices.
- return
Boolean removeDuplicateConsecutiveCharacters(String string)
- return near-identical
String
with each occurrence of duplicate-adjacent characters removed.
- return near-identical
Boolean isIsogram(String string)
- return
true
if eachCharacter
instring
occurs exactly 1 time.
- return
- Description
- The purpose of this class is to create a utility for manipulating arrays.
- Methods to Complete
String getMiddleElement(String[] values)
- return the element at index
values.length/2
- return the element at index
String[] removeMiddleElement(String[] values)
- return near-identical array with element at index
values.length/2
removed.
- return near-identical array with element at index
String getLastElement(String[] values)
- return element at index
values.length-1
- return element at index
String[] removeLastElement(String[] values)
- return near-identical array with element at index
values.length-1
removed.
- return near-identical array with element at index