Add a picture ¯eld to the Student class and create constructors that take a Picture object as well. Also create accessors and modi¯er methods for the picture ¯eld. Add a show() method which will show the Picture object if it isn't null. See the Student class in bookClassesFinal for this.
What will be an ideal response?
```
/** a p i c t u r e of t h i s s tud ent */
private Pi c tur e p i c t u r e ;
/**
* Method to g e t the p i c t u r e f o r t h i s
* s tud ent
* @return the p i c t u r e (may be n u l l )
*/
public Pi c tur e g e tPi c tur e ( )
f return this . p i c t u r e ; g
/**
* Method to s e t the p i c t u r e f o r t h i s
* s tud ent
* @param t h ePi c t u r e the p i c t u r e to use
*/
public void s e tPi c t u r e ( Pi c tur e thePi c tur e )
{
this . p i c t u r e = thePi c tur e ;
}
/**
* Method to show t h i s s tud ent
* I t w i l l d i s p l a y the p i c t u r e i f t h e r e
* i s one e l s e j u s t p r i n t the s tud ent name
*/
public void show ( )
{
i f ( this . p i c t u r e == nul l )
{
// use t o S t r i n g
System . out . p r i n t l n ( this ) ;
}
el se
{
this . p i c t u r e . show ( ) ;
}
}
```
You might also like to view...
AND, OR, and NOT are examples of Excel ________ functions
A) aggregate B) conjunction C) combination D) union
A list of cited works in a report or research paper, also referred to as Works Cited, Sources, or References, depending upon the report style
a. Footnotes b. Citation c. Bibliography
To apply formatting to more than one cell or range, right-click the Format Painter button so that it stays active.
Answer the following statement true (T) or false (F)
____ is the process of paying attention to important properties while ignoring nonessential details.
A. Abstraction B. Modularization C. Abbreviation D. Decomposition