ch1sec3prob11.java. Worth 10pts. Do not
output any values of 2^N. When using Math.log(N)
immediately cast down to an int type.
| Input: | $ java ch1sec3prob11 | |||||||||||||||||||||||||||||||||||||||||||||
| Output: | ||||||||||||||||||||||||||||||||||||||||||||||
|
ch1sec3prob27.java. Worth 20pts. Take N as a
command-line argument.
| Input: | $ java ch1sec3prob27 4 |
| Output: | |
* *
|
| Input: | $ java ch1sec3prob27 5 |
| Output: | |
* *
|
String (no spaces) from
standard input. First, your program should remove all duplicate letters
(Hint: use substring() to decompose a string and concatenation
to recompose it). Second, your program should reverse the String (Hint:
convert the String to a char[] with
toCharArray()). Last, output the modified string. Name the file
and program ch1sec4prob00.java. Worth 30pts. You cannot use the
Java class/utility StringBuilder. Also note that
'e' is NOT a duplicate of
'E'.
| Input: | $ java ch1sec4prob00 |
| Output: | (user enters string after prompt...) |
Enter a string without spaces: Hello
|
| Input: | $ java ch1sec4prob00 |
| Output: | (user enters string after prompt...) |
Enter a string without spaces: elephAntwalk
|
ch1sec4prob30.java. Worth 40pts. Take M,
N, and p as command-line arguments in
that order. Hint: you only need a single multidimensional array of booleans
to solve this problem, the output is analysis of those booleans.
| Input: | $ java ch1sec4prob30 3 5 0.2 |
| Output: | |
.*.*.
|
| Input: | $ java ch1sec4prob30 8 3 0.5 |
| Output: | |
***
|
ch1sec5prob19bonus.java.
| Input: | $ java ch1sec5prob19bonus 20 .33 |
| Output: | |
|