Page 354 - Introduction to Programming with Java: A Problem Solving Approach
P. 354
320 Chapter 8 Software Engineering
}
// end class Square
//*****************************************************
private void drawBorderSquare()
{
drawHorizontalLine();
drawSides();
drawHorizontalLine();
// end drawBorderSquare
//*****************************************************
}
private void drawSolidSquare()
{
}
// end drawSolidSquare
}
// end drawHorizontalLine
}
// end drawSides
for (int i=0; i<this.width; i++)
{
}
drawHorizontalLine();
//*****************************************************
private void drawHorizontalLine()
{
i<Athpisa.wgidoth; Pi+D+)F System.out.print("*");
Enhancer
for (int i=0;
{
}
System.out.println();
//*****************************************************
private void drawSides()
{
for (int i=1; i<(this.width-1); i++)
{
}
System.out.print("*");
for (int j=1; j<(this.width-1); j++)
{
}
System.out.print(" ");
System.out.println("*");
Figure 8.9b Square class: final version—part B (a fleshed-out version of Figure 8.7b)