Menu

[Solved]4 Add New Package Named Hw7p2 Project Right Click Package Project B Initially Add Two Pub Q37242478

4. Add a new package named hw7p2 to the project Right click on the package of the project a. b. Initially, add two public cla

4. Add a new package named hw7p2 to the project Right click on the package of the project a. b. Initially, add two public classes called Luminance and Picture. Replicate the code above in these two java files (Note that the code for Luminance is an image]) The source of the original image should be stored in a folder named raw in your project. To do that 5. Right click on the project and New> Folder and then create a folder named raw Import a color picture from your computer to the raw folder a. b. 6. Add another public class named Grayscale without a main method Note that the code provided above include main methods. You may keep them if you want. But remember that a project needs only one main method for it to run a. b. Write code in the public method grayscalelmage of the Grayscale class to do the following i. Get the location of the target color image (i.e., raw/filename) from the user. ii. Convert the color picture into picture on a grayscale and then display the grayscale picture c. You need to utilize the members of both Picture and Luminance classes for the grayscalelmage method 7. Add yet another class called Rescale without a main method. a. Write code for the public method named rescamae in the Rescale class to do the following i. Get the location, width, and height of the target color image from the user ii. Rescale the image to the specified size and then display the rescaled picture b. You do not need to use the Luminance class for this purpose. You need to utilize the members of the Picture class for the rescalelmage method 8. Add a class named Launcher with a main method a. Write code for the main method for conversion to grayscale and resizing b. Display a prompt for a user choice-either grayscale or rescale c. Call an appropriate method Show transcribed image text 4. Add a new package named hw7p2 to the project Right click on the package of the project a. b. Initially, add two public classes called Luminance and Picture. Replicate the code above in these two java files (Note that the code for Luminance is an image]) The source of the original image should be stored in a folder named raw in your project. To do that 5. Right click on the project and New> Folder and then create a folder named raw Import a color picture from your computer to the raw folder a. b. 6. Add another public class named Grayscale without a main method Note that the code provided above include main methods. You may keep them if you want. But remember that a project needs only one main method for it to run a. b. Write code in the public method grayscalelmage of the Grayscale class to do the following i. Get the location of the target color image (i.e., raw/filename) from the user. ii. Convert the color picture into picture on a grayscale and then display the grayscale picture c. You need to utilize the members of both Picture and Luminance classes for the grayscalelmage method 7. Add yet another class called Rescale without a main method. a. Write code for the public method named rescamae in the Rescale class to do the following i. Get the location, width, and height of the target color image from the user ii. Rescale the image to the specified size and then display the rescaled picture b. You do not need to use the Luminance class for this purpose. You need to utilize the members of the Picture class for the rescalelmage method 8. Add a class named Launcher with a main method a. Write code for the main method for conversion to grayscale and resizing b. Display a prompt for a user choice-either grayscale or rescale c. Call an appropriate method

Expert Answer


Answer to 4. Add a new package named hw7p2 to the project Right click on the package of the project a. b. Initially, add two publi… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *