MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

COMPUTER GRAPHICS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
What does the ā€˜c’ represent in the following method call:g.fill3DRect(a, b, c, d, e);
A
the x value starting position
B
the y value starting position
C
the width of the rectangle
D
the height of the rectangle
Explanation: 

Detailed explanation-1: -The method accepts the following parameters: x : The x coordinate of the rectangle. y : The y coordinate of the rectangle. width : The width of the rectangle.

Detailed explanation-2: -fillOval(int x, int y, int width, int height) Fills an oval bounded by the specified rectangle with the current color.

Detailed explanation-3: -public void drawRect(int x, int y, int width, int height): draws a rectangle with the specified width and height.

Detailed explanation-4: -In Java, to draw a rectangle (outlines) onto the current graphics context, we can use the following methods provided by the Graphics/Graphics2D class: drawRect(int x, int y, int width, int height) draw3DRect(int x, int y, int width, int height, boolean raised) draw(Rectangle2D)

There is 1 question to complete.