Advertisement
mcnealk

Book

Sep 18th, 2014
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.08 KB | None | 0 0
  1. public class Project8
  2. {
  3.  
  4. public static void main(String args[])
  5. {
  6. System.out.print(" ");
  7. line();
  8. System.out.println();
  9. box();
  10. line2();
  11. System.out.println();
  12. text();
  13. line();
  14. }
  15. public static void line()
  16. {
  17. int j=10;
  18. System.out.print("+");
  19. for (int dash=1; dash<=j*3; dash++)
  20. {
  21. System.out.print("-");
  22. }
  23. System.out.print("+");
  24. }
  25. public static void box()
  26. {
  27. int j=10;
  28. for (int i=1; i<=j; i++) //line number
  29. {
  30. for (int k=1; k<=j-i; k++)//number of spaces over to begin with
  31. {
  32. System.out.print(" ");
  33. }
  34. System.out.print("/");
  35. for (int space=1; space<=3*j-3*i; space++)
  36. {
  37. System.out.print(" ");
  38. }
  39. for (int three=1; three<=3; three++)
  40. {
  41. System.out.print("_");
  42. }
  43. System.out.print("/");
  44. for (int two=1; two<=i-1; two++)
  45. {
  46. System.out.print("__/");
  47. }
  48. for (int slashtwo=1; slashtwo<=i-1; slashtwo++)
  49. {
  50. System.out.print("/");
  51. }
  52. System.out.println();
  53. }
  54. }
  55. public static void line2()
  56. {
  57. int j=10;
  58. System.out.print("+");
  59. for (int dash=1; dash<=29; dash++)
  60. {
  61. System.out.print("-");
  62. }
  63. System.out.print("+");
  64. for (int slash=1; slash<=j; slash++)
  65. {
  66. System.out.print("/");
  67. }
  68. }
  69. public static void text()
  70. {
  71. int j=10;
  72. for (int i=1; i<=5; i++)
  73. {
  74. for (int wordstwo=1; wordstwo<=1; wordstwo++)
  75. {
  76. System.out.print("| Building Java Programs |");
  77.  
  78. }
  79. for (int slash=1; slash<=12-2*i; slash++)
  80. {
  81. System.out.print("/");
  82. }
  83. System.out.println();
  84. }
  85.  
  86. }
  87. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement