<< Chapter < Page Chapter >> Page >
  • How to design and implement an algorithm that will transform Prob02a.jpg and Prob02b.jpg into the image shown in Figure 2 .
  • How to flip an image around its center line.
  • How to crop an image.
  • How to copy one image onto another image.
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 libraryalong with the image files named Prob02a.jpg and Prob02b.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 shownbelow on the command-line screen:

Display your name here. Picture, filename Prob02a.jpg height 118 width 100Picture, filename Prob02b.jpg height 240 width 320 Picture, filename None height 101 width 77*********************************************************/ public class Prob02{//DO NOT MODIFY THE CODE IN THIS CLASS DEFINITION. public static void main(String[]args){ Picture[]pictures = new Prob02Runner().run(); System.out.println(pictures[0]); System.out.println(pictures[1]); System.out.println(pictures[2]); }//end main method}//end class Prob02 //End program specifications.

Figure 2 - Required output image for Prob02.

Missing image

Program 3

Discussion

The following is a non-exhaustive list of concepts that you need to understand along with knowledge and skills that you need to possess in order tosuccessfully write this program and/or understand the given solution in Prob03.java . Some of these items are general in nature and some are specific to the use of Ericson's multimedia library. I won't repeat theitems that were listed with the programs in Practice Group 1 or earlier programs in this practice group. Instead, Iwill concentrate on new concepts, knowledge, and skills not included in previous lists.

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 libraryalong with the image files named Prob03a.bmp , Prob03b.bmp , Prob03c.bmp , and Prob03d.jpg 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 shownbelow on the command-line screen:

Display your name here. Picture, filename None height 256 width 344*********************************************************/ public class Prob03{//DO NOT MODIFY THE CODE IN THIS CLASS DEFINITION. public static void main(String[]args){ Prob03Runner obj = new Prob03Runner();obj.run(); }//end main}//end class Prob03 //End program specifications.

Questions & Answers

what is biology
Hajah Reply
the study of living organisms and their interactions with one another and their environments
AI-Robot
what is biology
Victoria Reply
HOW CAN MAN ORGAN FUNCTION
Alfred Reply
the diagram of the digestive system
Assiatu Reply
allimentary cannel
Ogenrwot
How does twins formed
William Reply
They formed in two ways first when one sperm and one egg are splited by mitosis or two sperm and two eggs join together
Oluwatobi
what is genetics
Josephine Reply
Genetics is the study of heredity
Misack
how does twins formed?
Misack
What is manual
Hassan Reply
discuss biological phenomenon and provide pieces of evidence to show that it was responsible for the formation of eukaryotic organelles
Joseph Reply
what is biology
Yousuf Reply
the study of living organisms and their interactions with one another and their environment.
Wine
discuss the biological phenomenon and provide pieces of evidence to show that it was responsible for the formation of eukaryotic organelles in an essay form
Joseph Reply
what is the blood cells
Shaker Reply
list any five characteristics of the blood cells
Shaker
lack electricity and its more savely than electronic microscope because its naturally by using of light
Abdullahi Reply
advantage of electronic microscope is easily and clearly while disadvantage is dangerous because its electronic. advantage of light microscope is savely and naturally by sun while disadvantage is not easily,means its not sharp and not clear
Abdullahi
cell theory state that every organisms composed of one or more cell,cell is the basic unit of life
Abdullahi
is like gone fail us
DENG
cells is the basic structure and functions of all living things
Ramadan
What is classification
ISCONT Reply
is organisms that are similar into groups called tara
Yamosa
in what situation (s) would be the use of a scanning electron microscope be ideal and why?
Kenna Reply
A scanning electron microscope (SEM) is ideal for situations requiring high-resolution imaging of surfaces. It is commonly used in materials science, biology, and geology to examine the topography and composition of samples at a nanoscale level. SEM is particularly useful for studying fine details,
Hilary
cell is the building block of life.
Condoleezza Reply
what is phylogeny
Odigie Reply
evolutionary history and relationship of an organism or group of organisms
AI-Robot
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Object-oriented programming (oop) with java. OpenStax CNX. Jun 29, 2016 Download for free at https://legacy.cnx.org/content/col11441/1.201
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Object-oriented programming (oop) with java' conversation and receive update notifications?

Ask