Java Reference
In-Depth Information
10. Write a Java program that generates the following output. Use static methods to show structure and eliminate
redundancy in your solution. Note that there are two rocket ships next to each other. What redundancy can you
eliminate using static methods? What redundancy cannot be eliminated?
/\ /\
/ \ / \
/ \ / \
+------+ +------+
| | | |
| | | |
+------+ +------+
|United| |United|
|States| |States|
+------+ +------+
| | | |
| | | |
+------+ +------+
/\ /\
/ \ / \
/ \ / \
11. Write a Java program that generates the following output. Use static methods to show structure and eliminate redun-
dancy in your solution.
*****
*****
* *
*
* *
*****
*****
* *
*
* *
*****
*****
*
*
*
*****
*****
* *
*
* *
Search WWH ::




Custom Search