Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Instructions: Java Create a drawing that uses the Graphics class methods. Option 1: Create a Face. Option 2: Create a House/Landscape For either option your

Instructions:

Java

Create a drawing that uses the Graphics class methods.

Option 1: Create a Face.

Option 2: Create a House/Landscape

For either option your drawing must have at least 13 shapes including:

  1. 1 arc,
  2. 2 different polygons (must be at least 3 sided or more than 4 sided)
  3. 1 polyLine with a minimum of 4 coordinate pairs
  4. 1 rounded rectangle
  5. 1 QuadCurve2D

QuadCurve2D // (x1, y1, ctrlx, ctrly, x2, y2);

QuadCurve2D quad = new QuadCurve2D.Float(100, 100, 100, 400, 200, 100);

((Graphics2D) g).draw(quad);

  1. 1 CubicCurve2D

CubicCurve2 // (x1, y1, ctrlx1, ctrly1, ctrlx2, ctrly2, x2, y2);

CubicCurve2D cube = new CubicCurve2D.Float(30, 400, 150, 400, 200, 500, 350, 450 ((Graphics2D) g).draw(cube);

Put the above code in the tutorial code to see the shape of these curves. x1, y1 are the curve starting coordinates, x2, y2 are the ending coordinates, ctrl are the curves controls.

  1. 6 (at least) other shapes of your chosing

You must use Absolute coding techniques with the swing API. Your picture must be centered on any screen and should not exceed a size of 1440 by 800. The size of the JFrame should not be changeable by the user. The JFrame must be titled.

The java program must close when the JFrame is closed.

Please see the file of drawings from previous classes in the Lessons folder.

Your drawing should not look like the sample. The samples do not necessarily meet the minimum requirements.

SAMPLE OUTPUT, DON'T MAKE IT LOOK LIKE THIS, JUST AN EXAMPLE

image text in transcribed

A Simple Drawing2 O A Simple Drawing2 O

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Relational Database And SQL

Authors: Lucy Scott

3rd Edition

1087899699, 978-1087899695

More Books

Students also viewed these Databases questions

Question

Should civil service employees be allowed to unionize? Why?

Answered: 1 week ago