Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a complete program in a class named Face2 that uses the DrawingPanel to dr

ID: 645998 • Letter: W

Question

Write a complete program in a class named Face2 that uses the DrawingPanel to draw the following figure, based on the face figure from the previous problem. Use a parameterized static method to draw each face without redundancy.

window size: 320 x 180 px

faces' top-left corners at (10, 30) and (150, 50)

(You don't need to include any import statements at the top of your program. This class will be re-used in the next problem, so you may want to save it to a temporary file before moving on.)

Write a complete program in a class named Face2 that uses the DrawingPanel to draw the following figure, based on the face figure from the previous problem. Use a parameterized static method to draw each face without redundancy. window size: 320 x 180 px faces' top-left corners at (10, 30) and (150, 50) (You don't need to include any import statements at the top of your program. This class will be re-used in the next problem, so you may want to save it to a temporary file before moving on.)

Explanation / Answer

import java.applet.*; import java.awt.*; /* <applet code = "face" width = 300 height = 300> </applet> */ public class face extends Applet { public void paint(Graphics g) { g.drawOval(100,100,100,100); g.fillOval(120,125,20,20); g.fillOval(160,125,20,20); g.drawLine(150,165,150,150); g.drawLine(130,170,170,170); } }

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote