Take a picture of a person and mirror just their top part to their bottom part (two heads, with one at either end).

What will be an ideal response?

```
public void mirrorHorizRange ( int s tartX , int endX ,
int mirrorPoint)
{
Pixel topPixel = null;
Pixel botPixel = null ;
int count = 0 ;
// l o o p t h r o u g h t h e rows t i l l t h e mirro r p o i n t
for ( int y = 0 ; y < mirrorPoint ; y++)
{
for ( int x = s t a r t X ; x < endX ; x++)
{
top Pixel = this . g e t P i x e l ( x , y ) ;
botPixel = this . getPixel ( x ,
this . getHeight ( ) ? 1 ? y ) ;
botPixel.setColor (top Pixel.getColor());
}
}
}
```

Computer Science & Information Technology

You might also like to view...

Which of the following is false?

A. If adjacency list representation of a graph is used, space is saved for sparse graphs. B. DFS and BSF can be done in O(V + E) time for adjacency list representation. C. Search whether a specific edge exists between any two vertices is shorter while using adjacency list representation. D. Adding a vertex in adjacency list representation is easier than adjacency matrix representation. E. DFS and BSF can be done O(V^2) time in adjacency matrix representation.

Computer Science & Information Technology

If ____ appears as the first line of a loop, the loop is a top-controlled Do loop that will stop execution when a condition becomes true.

A. Loop While B. Do While C. Loop Until D. Do Until

Computer Science & Information Technology