<< Chapter < Page Chapter >> Page >

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 programand/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 the items listed above.Instead, I will concentrate on new concepts, knowledge, and skills not included in the above lists.

There are at least two alternative ways to write a program that will satisfy these requirements.

Both alternatives

  • How to design and implement an algorithm that will transform Prob03.jpg into the required output imageshown in Figure 3 .

Alternative 1

Alternative 2

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 file named Prob03.jpg to produce the graphic output image shownin 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 Prob03.jpg height 274 width 365*********************************************************/ public class Prob03{//DO NOT MODIFY THE CODE IN THIS CLASS DEFINITION. public static void main(String[]args){ Prob03Runner obj = new Prob03Runner();obj.run(); System.out.println(obj.getPicture());}//end main }//end class Prob03//End program specifications.

Figure 3 - Required output image for Prob03.

Missing image

Program 4

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 programand/or understand the given solution in Prob04.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 the items listed above.Instead, I will concentrate on new concepts, knowledge, and skills not included in the above lists.

  • How to design and implement an algorithm that will transform Prob04.jpg into the image shown in Figure 4 .
  • Similarities and differences between classes and interfaces .
  • The different types under which you can store an object's reference whenthe class from which the object was instantiated extends a class and implements one or more interfaces.
  • The kinds of new relationships that are created when a class implements one or more interfaces.
  • The implications of inheriting one or more abstract methods.
  • The significance of all interface methods being implicitly abstract.
  • That DigitalPicture is an interface and is not a class in Ericson's library.
  • The relationship that exists between the DigitalPicture interface and the Picture class.
  • The circumstances under which an accessor method can return a reference to an object as type DigitalPicture .
  • The difference between displaying a Picture object with the show and explore methods.

Questions & Answers

what is phylogeny
Odigie Reply
evolutionary history and relationship of an organism or group of organisms
AI-Robot
ok
Deng
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
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