Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a Java program called Masterpiece contained in 1 Java source file that will draw a picture of your own design onto a DrawingPanel object.

Write a Java program called Masterpiece contained in 1 Java source file that will draw a picture of your own design onto a DrawingPanel object. For this assignment, you will have to put the DrawingPanel.java class file in the same directory as your Masterpiece.java file.

You will also need to include the following import statement at the top of your Masterpiece.java file:

import java.awt.*;

Furthermore, in your program, youll have to include something like the following to get your Graphics object:

DrawingPanel panel = new DrawingPanel(600, 300); Graphics g = panel.getGraphics();

REQUIREMENTS

2) Use method(s) that will draw a composite image (made of multiple shapes or lines) given an (x, y) locationas parameters to the method. Reuse the composite image by calling this/these method(s) multiple times with different parameters. In class, I used a tree as an example. You can have more methods with more parameters, if you like. But you need at least one.

3) Use at least 3 different colors in your picture.

4) Use as least 3 different shapes types (line can be considered a shape type) in your picture.

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_2

Step: 3

blur-text-image_3

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

Oracle Database 11g SQL

Authors: Jason Price

1st Edition

0071498508, 978-0071498500

More Books

Students also viewed these Databases questions

Question

How does your language affect the way you think?

Answered: 1 week ago