SOURCE FILE: tileShell.cpp
/*
This program makes tile patterns -- diagrams like the one below. The
diagrams represent a tiled surface. The user tells how many tiles long and
wide s/he wants the pattern to be, and the program makes the diagram.
==========================
||&&&&||*||&&&&||*||&&&&||
||&&&&||*||&&&&||*||&&&&||
||&&&&||*||&&&&||*||&&&&||
||&&&&||*||&&&&||*||&&&&||
==========================
||&&&&||*||&&&&||*||&&&&||
||&&&&||*||&&&&||*||&&&&||
||&&&&||*||&&&&||*||&&&&||
||&&&&||*||&&&&||*||&&&&||
==========================
||&&&&||*||&&&&||*||&&&&||
||&&&&||*||&&&&||*||&&&&||
||&&&&||*||&&&&||*||&&&&||
||&&&&||*||&&&&||*||&&&&||
==========================
||&&&&||*||&&&&||*||&&&&||
||&&&&||*||&&&&||*||&&&&||
||&&&&||*||&&&&||*||&&&&||
||&&&&||*||&&&&||*||&&&&||
==========================
*/
#include <iostream>
using namespace std ;
/* PROTOYPE */
void printInformation(void) ;
/* Tell the user about the program. */
/* PROTOYPE */
void getDimensions (int & length_x, int & width_x) ;
/* Write a prompt to cin for two dimensions and
put the values into the parameters. */
/* PROTOYPE */
void makePattern (int p_length, int p_width) ;
/* Make a diagram representing a tiled surface "p_length" tiles down the
screen and "p_width" tiles across the screen. */
int main()
{
int length, width ;
printInformation() ;
getDimensions (length, width) ;
makePattern (length, width) ;
return 0;
}
void printInformation(void)
{
cout << endl ;
/* Put Code Here That Writes The Information */
cout << endl ;
}
/* ************************* */
/* GET DIMENSIONS */
/* ************************* */
void getDimensions (int & length_z, int & width_z)
{
/* Put Code Here That Gets The Dimensions */
}
/* PROTOYPE */
void makeHorizBorder (int b_width) ;
/* Function makeHorizBorder makes parts like this:
==========================
that fit into patterns like this:
==========================
||&&&&||*||&&&&||*||&&&&||
||&&&&||*||&&&&||*||&&&&||
||&&&&||*||&&&&||*||&&&&||
||&&&&||*||&&&&||*||&&&&||
==========================
b_width is the number of tiles across that the
pattern extends.
*/
/* PROTOYPE */
void makeTileRow (int b_width) ;
/* Function makeTileRow makes parts like this:
||&&&&||*||&&&&||*||&&&&||
||&&&&||*||&&&&||*||&&&&||
||&&&&||*||&&&&||*||&&&&||
||&&&&||*||&&&&||*||&&&&||
that fit into patterns like this:
==========================
||&&&&||*||&&&&||*||&&&&||
||&&&&||*||&&&&||*||&&&&||
||&&&&||*||&&&&||*||&&&&||
||&&&&||*||&&&&||*||&&&&||
==========================
b_width is the number of tiles across that the
pattern extends.
*/
/* ************************* */
/* MAKE PATTERN */
/* ************************* */
void makePattern (int p_length, int p_width)
{
int rowNum ;
cout << endl ;
/* Put Code Here That First Calls makeHorizBorder To Make The
First Horizontal Border. Use p_width As The Argument.
Next Put Code Here That Runs A Loop That Iterates (Repeats)
p_length Times, And Calls makeTileRow And makeHorizBorder
In Each Iteration (Also Using p_width As The Argument). */
cout << endl ;
return ;
}
/* ************************* */
/* MAKE HORIZ BORDER */
/* ************************* */
void makeHorizBorder (int b_width)
{
/* Here Put Code That First Makes A Group Of Eight Equal Signs
Like This:
========
And Then Runs A Loop That Makes b_width-1
Runs Of Nine Equal Signs In Each Run.
Include Code At The Very End That Writes A Newline.
*/
}
/* PROTOYPE */
void makeCourseInteriorStrand (int b_width) ;
/* Function makeCourseInteriorStrand makes parts like this:
||&&&&||*||&&&&||*||&&&&||
that fit into patterns like this:
==========================
||&&&&||*||&&&&||*||&&&&||
||&&&&||*||&&&&||*||&&&&||
||&&&&||*||&&&&||*||&&&&||
||&&&&||*||&&&&||*||&&&&||
==========================
b_width is the number of tiles across that the
pattern extends.
*/
/* *************************** */
/* MAKE TILE ROW */
/* *************************** */
void makeTileRow (int b_width)
{
/*
Put Code In Here That Just Calls makeCourseInteriorStrand
Four Times. Use b_width As The Argument.
*/
}
/* *************************** */
/* MAKE COURSE INTERIOR STRAND */
/* *************************** */
void makeCourseInteriorStrand (int b_width)
{
/* Here Put Code That First Makes This Pattern:
||&&&&||
And Then Runs A Loop That Makes b_width-1
Runs Of This Pattern:
*||&&&&||
In Each Run.
Include Code At The Very End That Writes A Newline.
*/
}