Practice reading and applying the API documentation, writing Javadocs, and developing using unit tests.
Your programming work for this assignment must be done in the
JavadocsAndUnitTesting
project inside Eclipse. Use the
SVN Repository Exploring
perspective to check out this project, then switch back to the
Java
perspective.
MoreWordGames
class.
MoreWordGames
.
MoreWordGamesTest
.
shout
,
whisper
, and
holleWerld
.
MoreWordGames
. Use the Java
String
API documentation to look for helpful methods. For
each
method below you must:
MoreWordGames.java
,
MoreWordGamesTest
,
main
to call the method and print the results.
String doubleSpeak(String input)
: This method returns two copies of the input string, separated by a space. For example, if the input were
"moo"
, the output would be
"moo moo"
String cartBeforeTheHorse(String input)
: This method returns a string consisting of the last half of the input, followed by the first half, with no intervening space. For example, if the input were
banana
, the output would be
anaban
. You can decide how to handle odd-length input, though one choice lets you avoid using an if-statement. (Recall that integer division truncates the fractional part.)
Written Problem: Draw your answers to this problem neatly on paper. Clearly label each part of the problem.
The
ObjectReferenceExamples
class contains several methods. For each method (except main()
):
We will grade your Wiki contributions using ANGEL. Turn-in your programming work by committing it to your SVN repository.