Advertisement
Guest User

Untitled

a guest
Mar 30th, 2017
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. /* Write a complete Java program in a class named StarFigures that generates
  2. * the following output. Use static methods to show structure and eliminate
  3. * redundancy in your solution.
  4. * *****
  5. * *****
  6. * * *
  7. * *
  8. * * *
  9. *
  10. * *****
  11. * *****
  12. * * *
  13. * *
  14. * * *
  15. * *****
  16. * *****
  17. *
  18. * *
  19. * *
  20. * *
  21. * *****
  22. * *****
  23. * * *
  24. * *
  25. * * *
  26. */
  27. public class StarFigures {
  28. public static void main(String[] args) {
  29. printLines();
  30. ______________________;
  31. System.out.println();
  32. ____________________;
  33. printX();
  34. printLines();
  35. ____________________________;
  36. ____________________________;
  37. printLines();
  38. printX();
  39. }
  40.  
  41. public static void printLines() {
  42. ____________________________;
  43. System.out.println("*****");
  44. }
  45.  
  46. public static void printX() {
  47. System.out.println(" * *");
  48. ___________________________;
  49. System.out.println(" * *");
  50. }
  51.  
  52. public static void printThreeStars() {
  53. System.out.println(" *");
  54. System.out.println(" *");
  55. _____________________________;
  56. }
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement