- This quiz has 4 sections.
- fundamentals
Calculator
StringUtils
- arrays
ArrayUtils
- object orientation - Difficult
Account
BankAccount
Bank
Transactable
Employee
Worker
- collections
WordCounter
Food
- DifficultCurry
Pepper
Spice
Ginger
- 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
- Description
- The purpose of this class is to create a model of an
Account
.
- The purpose of this class is to create a model of an
- Methods to Complete
Long getId()
void setId(Long id)
- Description
- The purpose of this class is to create a subclass of an
Account
which implementsTransactable
.
- The purpose of this class is to create a subclass of an
- Methods to Complete
void setBalance(Double double)
- Description
- The purpose of this class is to create an encapsulation of a
Collection
ofBankAccount
objects.
- The purpose of this class is to create an encapsulation of a
- Methods to Complete
BankAccount removeBankAccountByIndex(Integer indexNumber)
void addBankAccount(BankAccount bankAccount)
Boolean containsBankAccount(BankAccount bankAccount)
- Description
- The purpose of this class is to create an implementation of a
Worker
andTransactable
which candeposit
,withdrawal
, andgetBalance
, of its compositeBankAccount
.
- The purpose of this class is to create an implementation of a
- Methods to Complete
BankAccount getBankAccount()
void setBankAccount(BankAccount bankAccount)
- Description
- The purpose of this interface is to ensure a class can
deposit
,withdrawal
, andgetBalance
.
- The purpose of this interface is to ensure a class can
- Methods to Complete
void deposit(Double amountToIncreaseBy)
void withdrawal(Double amountToDecreaseBy)
Double getBalance()
- Description
- The purpose of this interface is to ensure a class has
BankAccount
- The purpose of this interface is to ensure a class has
- Methods to Complete
BankAccount getBankAccount()
void setBankAccount(BankAccount bankAccount)
- Description
- The purpose of this class is to manage a mapping of
String
toInteger
. - The class should be able to identify the number times a word has occurred in a given
String
array- A word is a series of characters delimited by spaces
- The purpose of this class is to manage a mapping of
- Methods to Complete
Map<String, Integer> getWordCountMap()
- Description
- The purpose of this class is to manage a mapping of
Spice
toInteger
. - The class should be able to identify the number of a specific spice-type applied to an instance of a food.
- The purpose of this class is to manage a mapping of
- Methods to Complete
List<Spice> getAllSpices()
<SpiceType extends Class<? extends Spice>> Map<SpiceType, Integer> getSpiceCount()
void applySpice(Spice spice)
- Description
- The purpose of this class is to create a concrete implementation of a
Spice
- The purpose of this class is to create a concrete implementation of a
- Methods to Complete
String getName()