This assignment is due Tuesday, September 4.
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 show the structure of your code and to reduce redundant code. For example, the pattern
***** ***** * * * * *
appears three times in the picture, so there should be a method (call it method1
) for this pattern. But the pattern
***** *****
appears within the first pattern and it also appears in two other places in the original picture. So it should have a method (call it method2
) that draws it and which is called by both method1
and by the main
method.
Your program should end up with three static methods besides the main
method.
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 4.