Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Write a complete Java program in a class named StarFigures that generates
- * the following output. Use static methods to show structure and eliminate
- * redundancy in your solution.
- * *****
- * *****
- * * *
- * *
- * * *
- *
- * *****
- * *****
- * * *
- * *
- * * *
- * *****
- * *****
- *
- * *
- * *
- * *
- * *****
- * *****
- * * *
- * *
- * * *
- */
- public class StarFigures {
- public static void main(String[] args) {
- printLines();
- ______________________;
- System.out.println();
- ____________________;
- printX();
- printLines();
- ____________________________;
- ____________________________;
- printLines();
- printX();
- }
- public static void printLines() {
- ____________________________;
- System.out.println("*****");
- }
- public static void printX() {
- System.out.println(" * *");
- ___________________________;
- System.out.println(" * *");
- }
- public static void printThreeStars() {
- System.out.println(" *");
- System.out.println(" *");
- _____________________________;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement