Unit 2 Project

In this project you have the opportunity to demonstrate your knowledge of for loops and nested for loops to create and ASCII art version of the Space Needle. Using the already created file named SpaceNeedle.java write a program that outputs an ASCII art version of the Space Needle of varying size (based on the Class Constant SIZE). The goal of this project is to use ONLY what we have learned in Unit 2 (and prior) to create the Space Needle. Your code must be broken up into methods as appropriate and have comments describing what each method does.

For those of you who have dabbled in coding before, try to contain your code to just what we have discussed in this (and previous) unit.

Sample Output

SIZE=2

      ||
      ||
   __/||\__
__/:::||:::\__
|""""""""""""|
\_/\/\/\/\/\_/
  \_/\/\/\_/
      ||
      ||
     ||||
     ||||
     ||||
     ||||
   __/||\__
__/:::||:::\__
|""""""""""""|

SIZE=3

         ||
         ||
         ||
      __/||\__
   __/:::||:::\__
__/::::::||::::::\__
|""""""""""""""""""|
\_/\/\/\/\/\/\/\/\_/
  \_/\/\/\/\/\/\_/
    \_/\/\/\/\_/
         ||
         ||
         ||
       |%||%|
       |%||%|
       |%||%|
       |%||%|
       |%||%|
       |%||%|
       |%||%|
       |%||%|
       |%||%|
      __/||\__
   __/:::||:::\__
__/::::::||::::::\__
|""""""""""""""""""|

SIZE=4

            ||
            ||
            ||
            ||
         __/||\__
      __/:::||:::\__
   __/::::::||::::::\__
__/:::::::::||:::::::::\__
|""""""""""""""""""""""""|
\_/\/\/\/\/\/\/\/\/\/\/\_/
  \_/\/\/\/\/\/\/\/\/\_/
    \_/\/\/\/\/\/\/\_/
      \_/\/\/\/\/\_/
            ||
            ||
            ||
            ||
         |%%||%%|
         |%%||%%|
         |%%||%%|
         |%%||%%|
         |%%||%%|
         |%%||%%|
         |%%||%%|
         |%%||%%|
         |%%||%%|
         |%%||%%|
         |%%||%%|
         |%%||%%|
         |%%||%%|
         |%%||%%|
         |%%||%%|
         |%%||%%|
         __/||\__
      __/:::||:::\__
   __/::::::||::::::\__
__/:::::::::||:::::::::\__
|""""""""""""""""""""""""|

Hints

  • Your String should end with one newline character.
  • We have provided you with a couple of tests that you can check your program with. To run these tests right click on the 'test' folder under your project, go down to 'Run As' and select 'JUnit Test'
  • If there are errors in these tests you can see the differences of what we expect vs. what you output by clicking on the failing test, then double clicking on the first line in the 'Failure Trace' window.

Learning Targets

  • I can demonstrate an understanding of procedural decomposition by writing static method declarations and calling them within other methods.
  • I can show my understanding of legal identifiers within the bounds of style guides discussed in class so far.
  • I can produce a text output in the console using strings while understanding the proper way to display special string characters.
  • I can show my understanding of for loops and nested for loops by using them to reduce repetition in my program.

Rubric (20 pts)

Category 4 3 2 1
Demonstrates Learning Targets (10pts) Meets all targets Meets only 3 Meets only 2 Meets only 1 or doesn't show any attempt at the learning targets
Style (5pts) Demonstrates a strong understanding with flawless style Minor style errors Demonstrates low understanding of style Code is unreadable
Executes Properly (5pts) Runs without any errors and output is correct for all sizes Compiles and runs, but output is incorrect in 1 or more sizes Doesn't compile but due to minor errors Large syntax errors left in the code