(Latest Revision: Sat Oct 31, 2009 )
MakeWallFnPlan.txt
Make Wall Function Plan
A Design for a Program That Makes Brick Walls
A Breakdown of Responsibilities Given to Each Function
- MakeMortar makes: "*"
- MakeMortarForBrick makes: "***************"
- MakeEdge makes: "---------------"
- MakeSidesOfWhole makes: "| |"
(half of the middle part of a brick.)
- MakeMortarForCourse makes all the mortar to go above a course of
bricks. For example, in the portion of a wall depicted below:
***********************************************
---------------*---------------*---------------
| |*| |*| |
| |*| |*| |
---------------*---------------*---------------
MakeMortarForCourse would be responsible for making the row of
asterisks at the top of the figure. (The rest of the figure would be
made by MakeCourse.)
MakeMortarForCourse requires a parameter, the number of bricks in a
course.
- MakeEdges makes upper and lower edges for a course of bricks. For
example, in the figure above, MakeEdges would make the parts that look
like this:
---------------*---------------*---------------
Like MakeMortarForCourse, MakeEdges requires a parameter.
- MakeSides makes middle sections of a course of bricks. For
example, in the figure above, MakeSides would make the parts that look
like this:
| |*| |*| |
Like MakeMortarForCourse and MakeEdges, MakeSides also requires a
parameter.
- MakeCourse makes a course of bricks. For example, if it made a
course of 3 bricks, the output of MakeCourse would look like this:
---------------*---------------*---------------
| |*| |*| |
| |*| |*| |
---------------*---------------*---------------
MakeCourse also requires a parameter.
- MakeWall makes a wall like this:
---------------*---------------*---------------
| |*| |*| |
| |*| |*| |
---------------*---------------*---------------
***********************************************
---------------*---------------*---------------
| |*| |*| |
| |*| |*| |
---------------*---------------*---------------
***********************************************
---------------*---------------*---------------
| |*| |*| |
| |*| |*| |
---------------*---------------*---------------
***********************************************
---------------*---------------*---------------
| |*| |*| |
| |*| |*| |
---------------*---------------*---------------
It makes whatever size wall is desired. MakeWall requires two
parameters, one to determine the width of the wall, and another to
determine its height.