# 3.23 Java3022r review

 Page 1 / 1
This module contains review questions and answers keyed to the module titled Java3022: Scaling, Rotating, and Translating Images using Affine Transforms.

Revised: Mon Apr 04 09:07:14 CDT 2016

## Preface

This module contains review questions and answers keyed to the module titled Java3022: Scaling, Rotating, and Translating Images using Affine Transforms .

The questions and the answers are connected by hyperlinks to make it easy for you to navigate from the question to the answer and back again.

## Question 1.

Given the input image in Figure 1 , which of the following output images is produced by the code in Listing 1 ?

A. Figure 2

B. Figure 3

Listing 1 - Question 1.
```/*File Java3022ra Copyright 2013 R.G.Baldwin Revised 02/17/13*********************************************************/ import java.awt.Graphics2D;import java.awt.geom.AffineTransform; import java.awt.geom.Rectangle2D;import java.awt.Graphics; public class Java3022ra{public static void main(String[] args){new Java3022raRunner().run(); }//end main method}//end class Java3022ra //======================================================//class Java3022raRunner{ public void run(){procPix(new Picture("Prob01.jpg").scale(0.7,0.7),-30); }//end run//----------------------------------------------------// private void procPix(Picture pic,double angle){AffineTransform xformA = new AffineTransform(); xformA.rotate(Math.toRadians(angle),pic.getWidth()/2,pic.getHeight()/2); Rectangle2D rectangle2D =pic.getTransformEnclosingRect(xformA); int resultWidth = (int)(rectangle2D.getWidth());int resultHeight = (int)(rectangle2D.getHeight()); AffineTransform xformB = new AffineTransform();xformB.translate((resultWidth - pic.getWidth())/2, (resultHeight - pic.getHeight())/2);xformB.concatenate(xformA); Picture result = new Picture(resultWidth,resultHeight); Graphics2D g2 = (Graphics2D)result.getGraphics();g2.drawImage(pic.getImage(),xformB,null); result.explore();}//end //----------------------------------------------------//}//end class Java3022raRunner```

Figure 1 - Prob01.jpg.

Figure 2 - Possible output image.

Figure 3 - Possible output image.

## Listings

What is the meaning of the following two images?

This image was inserted here simply to insert some space between the questions and the answers to keep them from being visible on the screen at thesame time.

The image is also an example of the kinds of things that we do in my course titled ITSE 2321, Object-Oriented Programming.

This image was also inserted for the purpose of inserting space between the questions and the answers.

The code in Listing 1 produces the output image shown in Figure 3 .

## Miscellaneous

This section contains a variety of miscellaneous information.

Housekeeping material
• Module name: Java3022r Review
• File: Java3022r.htm
• Published: 02/17/13
Disclaimers:

Financial : Although the Connexions site makes it possible for you to download aPDF file for this module at no charge, and also makes it possible for you to purchase a pre-printed version of the PDF file, youshould be aware that some of the HTML elements in this module may not translate well into PDF.

I also want you to know that, I receive no financial compensation from the Connexions website even if you purchase the PDF version ofthe module.

In the past, unknown individuals have copied my modules from cnx.org, converted them to Kindle books, and placed them for sale onAmazon.com showing me as the author. I neither receive compensation for those sales nor do I know who does receive compensation. If youpurchase such a book, please be aware that it is a copy of a module that is freely available on cnx.org and that it was made andpublished without my prior knowledge.

Affiliation : I am a professor of Computer Information Technology at Austin Community College in Austin, TX.

-end-

What is captalizeg
What is socializing
Saminu
What is socializing
Saminu
What is socializing
Saminu
what is demand
demand is the quantity of a good that consumers are willing and able to purchase at various prices during a given period of time.
Modest
what is opportunity cost
what is gini coefficient?
Never heard of that!!!!
Abdulrahmon
ive heard about it Actually i know it..
Shamamet
In that case, you have to help us.
Patrick
Another name for Absolute cost advantage
what is the difference between demand and supply
what is the national income
oils and resources
Peter
it is the sum of all incomes earned by factors of production usually a year
C-Stixxs
What's current account?
Demand refers to goods and services that the buyer is willing and able to buy at a price over a period of time
Che
Can it be possible to have two level of comparative advantage in a country ?
.no.its not possible
Asanda
Why ?
Louise
I think no possible
No
Nwanne
No resources are scare for a country to have a comparative advantage and it discourages external trade
C-Stixxs
each country are meant to Specialize on 1 production activities
C-Stixxs
why do oligopoly increase on the elastic segment of the demand curve
what is all about production possibility curve
help me about the assumption of possibility curve
Nice
-The quantity and quality of economic resources are fixed. -only two types of goods can be produce out of this resources (that is,producer and consumer goods). -Resources are fully utilised. -The resources are mobile. -The state of technology is constant.
Louise
What is utility
it is the satisfaction derived from d consumption of goods and services
C-Stixxs
what is opportunity cost
Aboubakar
what is the meaning of money and inflation
Money can be define as anything acceptable as a medium of exchange and mean of payment
Cynthia
inflation is when everything seemed to cost so much less
Nwanne
Inflation is d persistent rise in level of goods and services in a country
C-Stixxs
Inflation is the persistent increase in d general price level of goods n services
C-Stixxs
what is a bar chart
what's economic
Economics can be define as a study of how human beings make decisions in the face of scarcity it can also be define as using one wealth to make more wealth
Cynthia
Or in Nigerian way Economics is a science (social science) which studies human behavior as a relationship between Ends and Scarce which have alternative uses
Cynthia
Economics is the study of how human make decision in the face of scarcity
Nwanne
Got questions? Join the online conversation and get instant answers!