Assume that g references a Graphics object. Write code that performs the following:
a. Draws an outline of a rectangle that is 100 pixels wide by 200 pixels high, with its upper-left corner at (50, 75).b. Draws a filled rectangle that is 300 pixels wide by 100 pixels high, with its upperleft corner at (10, 90).c. Draws a blue outline of an oval with an enclosing rectangle that is 100 pixels wide by 50 pixels high, with its upper-left corner at (10, 25).d. Draws a red line from (0, 5) to (150, 175).e. Draws the string “Greetings Earthling”. The lower-left point of the string should be at (80, 99). Use a bold, 20-point serif font.f. Draws a polygon with vertices at the following points: (10, 10), (10, 25), (50, 25), and (50, 10). What shape does this code result in?
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.