= === ===== ******* * * ******* +++++ +++ + = === ===== ******* * * ******* +++++ +++ + ******* * * ******* = === ===== +++++ +++ + ******* * * ******* = === =====
This assignment is due Tuesday, September 3.
This assignment makes use of the files contained in this zip file. This assignment is based on Sections 1.4 and 1.5 from the textbook.
Write a Java program called Hw2.java
that prints the following picture.
= === ===== ******* * * ******* +++++ +++ + = === ===== ******* * * ******* +++++ +++ + ******* * * ******* = === ===== +++++ +++ + ******* * * ******* = === =====
The output of your program should exactly match this picture (which is in the zip file as hw2_picture.txt
). Your program should use static methods to reduce redundant (that is, repeated) code. For example, the pattern
= === =====
appears four times in the picture, so there should be a method for this pattern. And the pattern
+++++ +++ +
appears three times in the picture, so it should also have a method. The pattern
= === ===== ******* * * ******* +++++ +++ +
appears twice in the picture, so it should have its own method, but this pattern includes inside of it the previous two patterns, so this pattern's method should call the methods for the previous two patterns.
Your program should end up with five static methods in addition to the main
method (make sure you see each of the five repeated patterns in the picture). Three of your static methods should have println
statements in them. The other two static methods, along with the main
method, should not have any println
statements, instead they should only have method calls in them.
Turn in a zip file called CS123Hw2Surname.zip
(where Surname
is your last name) containing your version of Hw2.java
.
This assignment is due Tuesday, September 3.