( Latest Revision: 10/31/2009 )

FIFTH CS 1500 SOLO PROGRAM: Laying Bricks


OBJECTIVE: The purpose of this programming assignment is to get more practice writing and using loops.


THE ASSIGNMENT:

Your assignment is to write a program that "makes a brick wall" for the user.


INPUT:

The program prompts the user for a width and a number of courses. These numbers are the width and height of the wall, measured in numbers of whole bricks. In this exercise, there will be no provision for partial brick widths or heights.


OUTPUT:

The program "outputs a brick wall" having the dimensions given by the user. Look at the sample runs of my solution program to see what the appearance the brick wall must be.

For this exercise, your output must be just like the output of the sample. In particular, your bricks must be the same size and shape as the bricks in the sample, and your walls must contain single layers of mortar (asterisks) in the appropriate locations just as the sample shows. Also, your walls are not allowed to have mortar anywhere on the periphery. (The periphery is the top, bottom, and the sides.)


THE DESIGN OF THE PROGRAM:

If you wish, you may use this structure chart and this function plan guidelines for your program design.

I expect you to employ good principles of top-down design. Substantial credit will be withheld if you do not create a program that uses functions appropriately.

I'll discuss some things in class that I think will help you in your efforts to design a solution to this problem.

Also, you can look at the programs stars.cpp and varStars.cpp to see C++ code with some similarities to the code you need to write.


FORM AND FORMATTING REQUIREMENTS:

Write appropriate function declaration comments for each of your functions. These are comments placed under each function declaration to explain the purpose of the function, and to explain what the function does. Read the comments in the example programs in your book, and write similar comments for your functions.

At the beginning of your program file put a header comment like this:

  /* PROGRAM Brick Wall Maker */

  /*

  Name:          Gordon Goodguy
  User Name:     goodge
  Course:        CS 1500, Computer Programming I
  Instructor:    John Sarraille
  Date:          January 01, 1970

  */
Of course, in place of "Gordon Goodguy," you must put your own full name. In place of "goodge" put your user (login) name. In place of "January 01, 1970" put the date that you finished the program. Note that the comment delimiters /* and */ are important. They need to be placed correctly or you will get compiler errors.


WHAT TO TURN IN:

You will be sending me two e-mail messages. Please follow these rules: Here is the list of things you have to turn in: Note that there are no spaces in the subject lines given. It is important that you do not insert any spaces. My e-mail address is:

john@ishi.csustan.edu



WHEN IS THIS ASSIGNMENT DUE?

Look for the due date in the class schedule. (It's at the top level of the class directory.)