CIS 260 C++ Programming

Program Requirements: Print Rectangle

B Project (worth 90 points)

Design and code a C++ program that reads in the height and width of a rectangle and then prints a  rectangle of that size out of asterisks. The rectangle may be up to 20 units high and up to 50 units wide. The program should check for invalid input and handle it appropriately.  

Example:

     Enter the height and width of a rectangle: 7 12

     ************
     ************
     ************
     ************
     ************
     ************
     ************


A Project (worth 100 points)

Design and code a C++ program that reads in the height and width of a rectangle and then prints a hollow rectangle of that size out of asterisks and blanks. The rectangle may be up to 20 units high and up to 50 units wide. The program should check for invalid input and handle it appropriately.  

Example:

     Enter the height and width of a rectangle: 7 12

     ************
     *          *
     *          *
     *          *
     *          *
     *          *
     ************
 


Final Program: 

Problem Description
Algorithm
Code Design
Test Set Design
Source Code
Sample Output