Modify the method drawFace to take the width and height of the desired face and calculate the positions based on the desired width and height.
What will be an ideal response?
```
public void drawFace ( int upperLeftX ,
int upperLeftY ,
int width , int height )
{
// get the graphics object to use for drawing
Graphics g raphics = this . getGraphics ( ) ;
// start with a black color
graphics . se tColor ( Color . black ) ;
// draw the oval for the face
// 130 ,50 ,380 ,380
graphics . drawOval ( upperLeftX , upperLeftY ,
width , height ) ;
// draw the ovals for the eyes
int quarterDist = width / 4 ;
int tenth = height / 10 ;
graphics . fillOval ( upperLeftX + quar t e rDi s t ,
upperLeftY + quarterDist ,
tenth , tenth ) ;
graphics . fillOval ( upperLeftX + width -
quarterDist - tenth ,
upperLeftY + quarterDist ,
tenth , tenth ) ;
// draw the arcs for the eyebrows
graphics . drawArc ( upperLeftX + quarterDi s t ,
upperLeftY + quarterDist - 10 ,
tenth , tenth , 4 5 , 9 0 ) ;
graphics . drawArc ( upperLeftX + width ยก
quarterDist - tenth ,
upperLeftY + quarterDist - 10 ,
tenth , tenth , 45 , 90 ) ;
// draw the arc for the mouth
int arcWidth = ( int ) ( width * 0 . 6 7 ) ;
int arcY = ( int ) ( width * 0 . 0 9 ) ;
graphics.drawArc ( upperLeftX + ( width / 6 ) ,
upperLeftY + arcY ,
arcWidth , arcWidth ,
-45 ,-90);
}
```
You might also like to view...
This term applies to an attack on computer files that encrypt the users files making them useless to the victims.
What will be an ideal response?
Thesaurus results are displayed in a ________ task pane
A) Choices B) Spell Check C) Research D) Items
Which Brush options bar emulates a can of spray paint?
a. Tool preset b. Opacity slider c. Enable airbrush mode d. Table pressure controls size
Write a program that stores names and dates of birth in a database. Extend the program so that it stores the format of the data in the database; in other words, create a system catalog. Provide an interface that makes this system catalog accessible to external users.
What will be an ideal response?