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 in this group 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 any image files that may be required to write, compile, and test your programs.
Solution source code files
Links are provided within the individual program specifications for downloading source code files that contain 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.
New Classes
You may define new classes and add import directives as needed to cause your programs to behave as required, but you may not modify the class definitions for the given classes named ProbXX.
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 on the input image file link(s) and use the capabilities of your browser to download and save the image file(s).
- Click on the Java solution source code link(s) and use the capabilities of your browser to download and save the source code file(s).
- 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.
- Write, compile, and execute 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 as well as in the YouTube video lectures 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 the class definition shown below and Ericson's media library along with the image file named Prob01.jpg to produce the graphic output image shown in Figure 1 below.
Click Prob01.java to download a Java source file containing the solution to this program.
In addition to the output image, your program must display your name and the other text shown below on the command-line screen:
Display your name here.
Picture, filename None height 201 width 201
*********************************************************/
public class Prob01{
//DO NOT MODIFY THE CODE IN THIS CLASS DEFINITION.
public static void main(String[] args){
new Prob01Runner().run();
}//end main method
}//end class Prob01//End program specifications.| Required output image 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 the class definition shown below and Ericson's media library along with the image file named Prob02.jpg to produce the graphic output image shown in Figure 2 below.
Click Prob02.java to download a Java source file containing the solution to this program.
In addition to the output image, your program must display your name and the other text shown below on the command-line screen:
Display your name here.
Picture, filename None height 404 width 425
*********************************************************/
public class Prob02{
//DO NOT MODIFY THE CODE IN THIS CLASS DEFINITION.
public static void main(String[] args){
new Prob02Runner().run();
}//end main method
}//end class Prob02//End program specifications.| Required output image 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 the class definition shown below and Ericson's media library to produce the graphic output image shown in Figure 3 below.
Click Prob03.java to download a Java source file containing the solution to this program.
In addition to the output, your program must display your name and the other text shown below on the command-line screen:
Display your name here.
Picture, filename None height 300 width 300
*********************************************************/
public class Prob03{
//DO NOT MODIFY THE CODE IN THIS CLASS DEFINITION.
public static void main(String[] args){
new Prob03Runner().run();
}//end main method
}//end class Prob03//End program specifications.| 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 the class definition shown below and Ericson's media library along with the image file named Prob04a.jpg to produce the graphic output image shown in Figure 4 below.
Click Prob04.java to download a Java source file containing the solution to this program.
In addition to the output image, your program must display your name and the other text shown below on the command-line screen:
Display your name here.
Picture, filename None height 256 width 341
*********************************************************/
public class Prob04{
//DO NOT MODIFY THE CODE IN THIS CLASS DEFINITION.
public static void main(String[] args){
new Prob04Runner().run();
}//end main method
}//end class Prob04
//End program specifications.| Required output image 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 the class definition shown below and Ericson's media library along with the image files named Prob05a.jpg and Prob05b.jpg to produce the graphic output image shown in Figure 5 below.
Click Prob05.java to download a Java source file containing the solution to this program.
In addition to the output images mentioned above, your program must display your name and the other text shown below on the command-line screen:
Display your name here.
Picture, filename None height 252 width 330
*********************************************************/
public class Prob05{
//DO NOT MODIFY THE CODE IN THIS CLASS DEFINITION.
public static void main(String[] args){
new Prob05Runner().run();
}//end main method
}//end class Prob05//End program specifications.| Required output image for Prob05. |
|---|
![]() |









