Reference no: EM13922038
Question 1.
Write a method changeBlue(weight). Do not change any color of the pixels in the first half of a picture. For the second half, change blue value of each pixel by new blue=original blue * weight. For example, if a pixel has values (200,100,100) and weight is 0.5, then the new values will be (200,100,50). If the weight is 1.5, then the new values will be (200,100,150).
This is first half, do not change!
This is second half, change blue.
Question 2.
Write a method mirrorVertical(). The method mirrors the left half of a picture to the right half of the picture. For instance, the two pictures below show that the left one is the original picture, and the right one is the new picture.
Question 3.
Write a method copyPart(w,h). The method copies an upper left rectangle area in an image to its lower right area. w and h are width and height of the rectangle. In the figure below, |ab| is w and |ac| is h. We assume that 2*w is less than the picture's width, and 2*h is less than the picture's height. That is, the source area and the destination area are not overlapped and w or h is not out of bound.
All methods need to be included in the file Picture.java. Once you are finished, recompile your Picture.java, and then test your methods in DrJava. You can use any picture to test your programs.
Discuss some of the common uses of jq tests
: Discuss some of the common uses of JQ tests. Do you think that IQ tests should be used for these purposes? Does the Flynn effect alter your thoughts about the uses of IQ tests? Explain
|
Interest rate futures contract that has an initial margin
: You purchase an interest rate futures contract that has an initial margin requirement of 12% and a futures price of $152,140. The contract has a $125,000 underlying par value bond. If the futures price falls to $145,500, you will experience a ______ ..
|
Construct incremental analysis
: Suppose you need to decide whether to keep a machine or replace it with a new one: Old machine: Old machine can operate for 5 years with operating cost of $120,000 per year. Construct incremental analysis and conclude which alternative is more econom..
|
Management analysis
: Define the management’s discussion and analysis. Describe in a memo, not to exceed 300 words, the major items disclosed in this section of the financial report.
|
Write a method changeblue
: Write a method changeBlue(weight). Do not change any color of the pixels in the first half of a picture. For the second half, change blue value of each pixel by new blue=original blue * weight. For example, if a pixel has values (200,100,100) and ..
|
Calculate the minimum annual revenue
: Suppose you have to decide whether selling an old machine or keeping it with a major overhaul: A) Selling the machine at time zero for $750,000 with zero book value and paying the tax of 40%. Calculate the minimum annual revenue that machine has to g..
|
Mccollum corporation
: During its first year of operations, the McCollum Corporation entered into the following transactions relating to shareholders' equity. The corporation was authorized to issue 130 million common shares, $1 par per share. Required: Prepare the appropr..
|
Explain in detail short-run and long-run effects on output
: Using AD and AS diagrams, explain in detail the short-run and long-run effects on the output and price level of the following events. Assume that the economy is initially in a longrun equilibrium. The central bank makes an open market purchase of g..
|
What is the world health organizations definition
: Cannon (1932) has come up with some theories on homeostasis. What are Cannon's (1932) theories on homeostasis? What is the World Health Organization's (WHO's) definition of engineering methods, also known as engineering controls
|