Question
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started