Figure 5-21 is an example that’s not well aligned. Explain what you would do to improve the alignment. It may be helpful to create a photocopy of the example and draw on it.


There are two columns of text, but the text in each column is left-right centered, which means there is no possibility of creating a virtual line that separates the background from the text. Further, the text is also centered vertically within its cell; in any case where there’s a two-line cell on the left and a one-line cell on the right (or vice versa), there will be a broken horizontal line.


The solution would be to left-justify and top-justify the text within each cell. The following show two possible ways of explaining what’s wrong with the example. The first shows how the text should be realigned horizontally to form a vertical line; the second shows how the horizontal lines are broken by vertically centered text. The last image is a solution for your reference.





Computer Science & Information Technology

You might also like to view...

A variable, usually a bool or an int, that signals when a condition exists is known as a(n)

a. relational operator b. arithmetic operator c. logical operator d. flag e. None of these

Computer Science & Information Technology

What is wrong with this code?

``` int Money4Me( int dollars ) { int pennies, coins; coins = dollars * 100; }``` A. The function name is invalid. B. There is no return type. C. You can’t have math statements inside a function. D. Nothing is wrong with it.

Computer Science & Information Technology

Text files are also known as ____.

A. binary-based files B. character-based files C. I/O files D. stream objects

Computer Science & Information Technology

&grade[3] is equivalent to ____; assume that grade is an array of integers, and each integer requires 4 bytes of storage..

A. &grade[0] + 3 B. &grade[0] + 4 C. &grade[0] + (3 * 4) D. &grade[0] + (3 / 4)

Computer Science & Information Technology