If you want to draw a red circle inside of a green square in an applet where the paint method is passed a Graphics object called page, which of the following sets of commands might you use?
A) page.setColor(Color.green) ; page.fillRect(50, 50, 100, 100) ;
Page.setColor(Color.red) ;
Page.fillOval(60, 60, 80, 80) ;
B) page.setColor(Color.red) ; page.fillOval(60, 60, 80, 80) ;
Page.setColor(Color.green) ;
Page.fillRect(50, 50, 100, 100) ;
C) page.setColor(Color.green) ; page.fillRect(60, 60, 80, 80) ;
Page.setColor(Color.red) ;
Page.fillOval(50, 50, 100, 100) ;
D) page.setColor(Color.red) ; page.fillOval(50, 50, 100, 100) ;
Page.setColor(Color.green) ;
Page.fillRect(60, 60, 80, 80) ;
E) any of the above would accomplish this
Correct Answer:
Verified
Q21: The Random class has a method, nextFloat()
Q29: Which library package would you import to
Q31: What value will z have if we
Q32: Since you cannot take the square root
Q34: If you want to output a double
Q34: If the String major = "Computer Science",
Q35: Suppose that String name = "Frank Zappa".
Q37: Using getCurrencyInstance( ) formats a variable, automatically
Q39: If a, b, and c are int
Q41: Many Java drawing shapes are specified using
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents