What is the hexadecimal color code for a color with a red value of 255, a green value of 255, and a blue value of 51? The value is FFFF33. What is the hexadec- imal color code for a color with a red value of 204, a green value of 0, and a blue value of 204? The value is CC00CC. What is the hexadecimal color code for a color with a red value of 255, a green value of 204, and a blue value of 204? The value is FFCCCC. Use a hexadecimal color code to specify the background color for a homepage generated by one of the methods in the class WebPageWriter.

What will be an ideal response?


```
/? ?
? Method t o w r i t e t h e body o f t h e page
? @param w r i t e r t h e w r i t e r t o u s e
? @param body t h e body t o w r i t e
? @param b g C o l o r t h e b a c k g r o u n d c o l o r o f t h e page
? @throws I O Ex c e pt i o n
?/
private void writeBody ( B u f f e r e d W r i t e r w r i t e r ,
S t r i n g body ,
S t r i n g bgColor )
throws IOException
{
w r i t e r . w r i t e ( ” ” ’>” + body + ”” ) ;
w r i t e r . newLine ( ) ;
}
/? ?
? Method f o r w r i t i n g a homepage
? @param name t h e p e r s o n ’ s name
? @param i n t e r e s t s a l i s t o f t h e p e r s o n ’ s i n t e r e s t s
? @param b g C o l o r t h e b a c k g r o u n d c o l o r t o u s e
?/
public void writeHomepage ( S t r i n g name ,
String interests ,
S t r i n g bgColor )
{
// t r y t h e f o l l o w i n g
try {
// open a f i l e f o r w r i t i n g
S t r i n g path = F i l e C h o o s e r . getMediaPath ( name + ” . html ” ) ;
BufferedWriter writer =
new B u f f e r e d W r i t e r (new F i l e W r i t e r ( path ) ) ;
// w r i t e t h e s t a r t
writeStart ( writer );
// w r i t e t h e h e a d e r
writeHead ( w r i t e r , name + ” ’ s Homepage” ) ;
// w r i t e t h e body
writeBody ( w r i t e r , ”

Welcome t o ” + name +
” ’ s Homepage

” +

I am i n t e r e s t e d i n ” + i n t e r e s t s , bgColor ) ;
// end t h e page
writeEnd ( w r i t e r ) ;
// c l o s e t h e w r i t e r
writer . close ( ) ;
} catch ( E x c e p t i o n ex ) {
ex . p r i n t S t a c k T r a c e ( ) ;
}
}

```

Computer Science & Information Technology

You might also like to view...

What numbers will be displayed in the list box by the following code when the button is clicked?

``` Private Sub btnDisplay_Click(...) Handles btnDisplay.Click Dim num As Integer = 7 Do num += 1 lstBox.Items.Add(num) Loop Until (num > 6) lstBox.Items.Add(num) End Sub ``` (A) 7 (B) 8 (C) 7 and 8 (D) 8 and 8

Computer Science & Information Technology

How many different orders can all four messages be delivered to each process if the messages are causally related as m11 -> m21 -> m12 -> m22

Suppose a multicast group currently is participated by two processes: P1 and P2. Suppose P1 multicasts m11 then m12, P2 multicasts m21 then m22.

Computer Science & Information Technology

Which of the following will cause a syntax error, if you are trying to compare x to 5?

A. if (x == 5) B. if (x = 5) C. if (x <= 5) D. if (x >= 5)

Computer Science & Information Technology

List and describe the four different generations of cellular technology.

What will be an ideal response?

Computer Science & Information Technology