Homework 3 : Grid
CMP12a Winter 2002
Thomas Raffill

Due on the evening of Monday, April 15 by midnight.

Note: This assignment is graded, so do your best on it.

Introduction

This program will print out a simple text box like homework 2., but the box will be in the form of a grid. The class name is Grid, so your Java source file name will be Grid.java and your class file name will be Grid.class.

Input

Number of columns, number of rows. Input will be by command-line arguments. You don't need to validate the input! In other words, you can assume the program will always be run with two command line arguments which are positive integers.

Output

A rectangular grid of the given dimensions marked off with dots(.), underscores(_), and pipes(|). A simple 1 x 1 unit box looks like this:
._.
| |
._.
Your program should draw a grid with as many boxes across as the number of columns, and as many boxes down as the number of rows, where the number of columns and number of rows come from the command line input.

The output will be to standard output.

Several examples of sample input and output