Java Reference
In-Depth Information
18.
Write a pseudocode algorithm that will produce the following figure as output:
+===+===+
| | |
| | |
| | |
+===+===+
| | |
| | |
| | |
+===+===+
19.
Use your pseudocode from the previous exercise to write a Java program that produces the preceding figure as
output. Use nested
for
loops to print the repeated parts of the figure. Once you get it to work, add a class constant
so that the size of the figure can be changed simply by changing the constant's value.
Programming Projects
1.
Write a program that produces the following output:
****** //////////// ******
***** //////////\\ *****
**** ////////\\\\ ****
*** //////\\\\\\ ***
** ////\\\\\\\\ **
* //\\\\\\\\\\ *
\\\\\\\\\\\\
2.
Write a program that produces the following output:
+------+
|
∧∧
|
|
∧∧
|
|
∧
|
|
∧∧
|
|
∧∧
|
|
∧
|
+------+
|v v|
| v v |
| vv |
|v v|
| v v |
| vv |
+------+
Search WWH ::
Custom Search