Java and Media Library Version Requirements
Your programs must be compatible with Sun's Standard Edition JDK Version 1.7 or later.
Some of the programs on this test require you to use the Guzdial-Ericson multimedia class library. You will find download, installation, and usage instructions for the library at Java OOP: The Guzdial-Ericson Multimedia Class Library .
Input Image Files
Links are provided within the individual program specifications for downloading zip files that contain any image files that may be required to write, compile, and test your programs.
Solution source code files
The downloadable zip files mentioned above also contains source code files for the programming solutions. You can compile and execute those programs using procedures described in Java OOP: The Guzdial-Ericson Multimedia Class Library .
Output Images
Your output image(s) must match my output image(s) in every respect including color, size, position, etc. Don't forget to display your name in the output image(s) as shown.
Hints
For some of the programs, you may first need to deduce the algorithm used to transform the input image into the output image, and then write a working program that implements that algorithm. In some cases, you may need to compare numeric color values for corresponding pixels in the input and output images in order to deduce the algorithm.
You can obtain those color values using the following procedure:
- Click the download link for the zip files that contain input image files and solution source code files. Use the capabilities of your browser to download and save the contents of those zip files.
- If necessary, replace calls to the show method in my source code with calls to the explore method to force the program to display the output images in a PictureExplorer window.
- Compile and run the source code.
- Write, compile, and run a simple Java program that will display each input image file in a PictureExplorer window.
- Use the input and output PictureExplorer windows to compare the input and output color values on a pixel by pixel basis.
You may find other useful hints in my online tutorials and slides for this course.
Testing Your Programs
You can compile and execute your program by following the instructions given at Java OOP: The Guzdial-Ericson Multimedia Class Library .
Program Specifications
Program 1
Listing 1: Write the Java application described below.
/*File Prob01 Copyright 2012 R.G.Baldwin
Write a program named Prob01 that uses Ericson's media library along with the image file named Prob01a.jpg to produce the graphic output image shown in Figure 1 below.
Click here to download a zip file containing the required image file along with the source code for a solution.
When the program first starts running, only the GUI containing the text field is visible. When you type the file name into the text field and press Enter, the image of the penguin appears and the GUI moves to a position below the image of the penguin. The program terminates and returns control to the operating system when you click the X in the upper-right corner of the GUI.
| Required output images for Prob01. |
|---|
![]() |
Program 2
Listing 2: Write the Java application described below.
/*File Prob02 Copyright 2012 R.G.Baldwin
Write a program named Prob02 that uses Ericson's media library along with the image file named Prob02.jpg to produce the graphic output images shown in Figure 2 below.
Click here to download a zip file containing the required image file along with the source code for a solution.
Whenever you click the button in the GUI in the lower image, the green color component value at the location of the crosshair cursor in the upper image is displayed in the text field in the GUI.
| Required output images for Prob02. |
|---|
![]() |
Program 3
Listing 3: Write the Java application described below.
/*File Prob03 Copyright 2012 R.G.Baldwin
Write a program named Prob03 that uses Ericson's media library to produce the graphic output image shown in Figure 3 below.
Click here to download a zip file containing the source code for a solution.
Whenever you click the button in the GUI, the square in the upper right turns from black to yellow with a black border and the RGB color values for the color yellow appear in the three text fields.
| Required output image for Prob03. |
|---|
![]() |
Program 4
Listing 4: Write the Java application described below.
/*File Prob04 Copyright 2012 R.G.Baldwin
Write a program named Prob04 that uses Ericson's media library to produce the graphic output images shown in Figure 4 below.
Click here to download a zip file containing the source code for a solution.
Whenever you click the "Choose Color" button in the GUI in the upper image, the color chooser dialog shown in the lower image appears. When you select a color and click the OK button, the color chooser dialog disappears and that color appears in the square in the upper right portion of the GUI. In addition, the red, green, and blue color component values for that color appear in the corresponding text fields.
Whenever you click the "Brighter" and "Darker" buttons, the color displayed in the square becomes brighter or darker and the color values in the text fields change accordingly.
| Required output images for Prob04. |
|---|
![]() |
Program 5
Listing 5: Write the Java application described below.
/*File Prob05 Copyright 2012 R.G.Baldwin
Write a program named Prob05 that uses Ericson's media library along with the image file named Prob05.jpg to produce the graphic output images shown in Figure 5 below.
Click here to download a zip file containing the required image file along with the source code for a solution.
The color in the square in the upper right of the GUI in the lower image is governed by the color values in the red, green, and blue text fields.
Whenever you click the button in the GUI, the pixel at the crosshair cursor in the upper image is changed to reflect the color in the square in the GUI. This can best be seen when the upper image is zoomed to 500%.
| Required output image for Prob05. |
|---|
![]() |









