CIS 1068 - Homework 3

Handed out: 02/02/10
Due: by 10pm on 02/08/10

You will write a Java class called TheLinc that must be saved into a file called TheLinc.java. Your program should produce the diagram displayed below, which is meant to be an ASCII representation of Lincoln Financial Field (and the parking lots), where the Eagles play.

You should exactly reproduce the format of this output. This includes having identical spacing and punctuation. You may include blank lines at the end of the output, if you like.

You should at the very least have two static methods, one for drawing the parking lots, and one for drawing the stadium.

          _________________
         |________|________|
         |________|________|
         |________|________|
         |________|________|
         |________|________|
         |________|________|
         |________|________|
         |________|________|
         |________|________|
         |________|________|
         |________|________|
         |________|________|
         |________|________|
         |________|________|
         |________|________|
         |________|________|
                 __                
               _/..\_              
             _/......\_            
           _/..........\_          
         _/..............\_        
       _/..................\_      
     _/......................\_    
   _/..........................\_  
 _/..............................\_
  \_............................_/ 
    \_........................_/   
      \_...................._/     
        \_................_/       
          \_............_/         
            \_........_/           
              \_...._/             
                \__/               
You should use a class constant, called LINC SIZE, that determines the size of the drawing. The LINC SIZE for the drawing above is 4. A complete solution to the problem will be able to produce a proportionally larger drawing, simply by changing the value of the LINC SIZE, recompiling, and rerunning. It should work for any LINC SIZE greater than 2. The sizes for the various structures should be determined as follows:
  1. Each of the two parking lots should have width (number of underscores) equal to 2 * LINC SIZE.
  2. The dividing line between the two parking lots should be centered above the stadium.
  3. In order to provide enough parking for everyone, the number of lines of the parking lots should be proportional to the square of the LINC SIZE. So, for a LINC SIZE of 4, there should be 16 lines inside the parking lots.
  4. The top and the bottom lines of the stadium diagram consist of two underscores.
Include a comment at the beginning of your program with some basic information and a description of the program.

If you find the drawing of the stadium too difficult, make sure that you do correctly at least the parking lot.

Email your file TheLinc.java to your TA.