Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The question refers to the API. Here is what I have based off of my notes. import java.awt.*; import imagePackage.RasterImage; public class Exercise01 { public

The question refers to the API. Here is what I have based off of my notes.

import java.awt.*; import imagePackage.RasterImage;

public class Exercise01 {

public static RasterImage image = new RasterImage(300,300);

public static Graphics2D gfx = image.getGraphics2D();

public static Color imageCol = Color.BLUE;

public static void main(String[] args) { /* * REVIEW EXERCISE: * * Use the services of the class RasterImage to construct a raster image object * that is 300x300 pixels and is all blue (use the java.awt.Color to modify the * color of all the pixels in the image after it is created). * Change the titlebar of the window to "Lab 02". Note that this can only be done * after the image object is displayed in a window. * * The package with the RasterImage class (and other relevant classes) can * be found in this project. The API for the Picture class can be found * in the "doc" folder of this project. * * Locate the necessary services (methods) within the RasterImage class for this task. * * NB: You may need to add import statements to this class definition. */

image.show();

image.setTitle("Lab02");

gfx.setColor(imageCol);

gfx.fillRect(0, 0, 300, 300);

} }

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

Logics For Databases And Information Systems

Authors: Jan Chomicki ,Gunter Saake

1st Edition

1461375827, 978-1461375821

More Books

Students also viewed these Databases questions

Question

2. What is the impact of information systems on organizations?

Answered: 1 week ago

Question

Evaluate the impact of technology on HR employee services.

Answered: 1 week ago