(This assignment is adapted from one that appears in A Computer Science Tapestry by Owen Astrachan)

( Latest Revision: October 7, 2014 )

THIRD CS 1500 SOLO PROGRAM
Column of Pumpkins Assignment: Writing A Simple Loop


OBJECTIVE:

The purpose of this programming assignment is to give you practice writing and using loops in your programs.


THE ASSIGNMENT:

Simply stated, your assignment is to write a program that gets an integer N from the user and then draws a column of N figures, with a "base" at the bottom.


INPUT, OUTPUT, AND PROCESSING:

The program must begin by writing some information explaining the purpose of the program and a general description of how to use the program.

The program must then prompt for and read the number N.

After getting N, the program must do some error-checking. If N is not between 2 and 7, inclusive, then the program must output an appropriate error message and stop. If N is within the legal range, then the program must draw the ascii pumpkin figure N times (with no blank lines in between). After drawing the pumpkin figures, it must draw a little "base" so that it looks like the column is standing on something.


EXAMPLE OUTPUT:

Examine the sample script to get an idea of how it should look when you run the program.


DESIGN:

I have prepared a shell program that you should use as a starting point for your solution to this programming problem.

The shell has three functions to fill in, including the main() function. You can create a program with a good design if you follow the directions found inside the shell.

You can examine this program and this script to get more hints about how your finished program should look.

Be sure to attend class to get additional information that will help you with this assignment.


TESTING:

I expect you to make a test script for the program that shows good data coverage. I will discuss that concept in class. The basic idea is: It is your responsibility to devise and carry out adequate tests. However, the sample script included with this assignment happens to do enough testing to achieve good data coverage. Therefore, if you do all the tests in the sample script, that will be adequate for this assignment.

You will lose significant credit if you do not perform adequate testing.


WHAT TO TURN IN:

You will be sending me two e-mail messages. Please follow these rules: Here is the list of things that 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.)