Write a method changeblue

Assignment Help C/C++ Programming
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.

Reference no: EM13922038

Questions Cloud

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

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd