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 ( ”
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 ( ) ;
}
}
```
You might also like to view...
Which of the following PowerPoint features deactivates most PowerPoint tools and converts a presentation to read-only?
A) Mark as Final B) Accessibility Checker C) Compatibility Checker D) Document Inspector
DHCP Snooping state information is stored within the ________
A) DHCP Binding Table B) DHCP Snooping Database C) DHCP Snooping Table D) DHCP State Table