Question: / / Keep the step instructions and add your code below them. / * * * Load and draw a picture. * * Step 1
Keep the step instructions and add your code below them.
Load and draw a picture.
Step : Enter your name for @author and today's date for @version
@author
@version
public class PictureExpander
public static void mainString args
Step : Create a picture object pic and load
picture "beautifulSunset.jpg
Declare an object:
Picture pic new PicturebeautifulSunsetjpg;
Step : Draw the picture
Call a method on the object:
pic.draw;
Print a statement indicating where we are in the code
System.out.printlnBefore translation and grow:";
Step : Complete the statement to
display the x y coordnates of the picture
System.out.printlnXcoordinate: ;
System.out.printlnYcoordinate: ;
Step : Complete the statement to
display the size of the picture
System.out.printlnWidth : ;
System.out.printlnHeight: ;
Step : Translate the picture to the right
and units down
Print a statement indicating where we are in the code
System.out.printlnAfter translation:";
Step : Complete the statement to
display the x y coordnates of the picture
System.out.printlnXcoordinate: ;
System.out.printlnYcoordinate: ;
Step : Complete the statement to
display the size of the picture
System.out.printlnWidth : ;
System.out.printlnHeight: ;
Before completing steps and compile and run this code
to see what the translate command did
Step : Enlarge the picture by pixels to the left and right
and pixels up and down
Print a statement indicating where we are in the code
System.out.printlnAfter grow:";
Step : Complete the statement to
display the x y coordnates of the picture
System.out.printlnXcoordinate: ;
System.out.printlnYcoordinate: ;
Step : Complete the statement to
display the size of the picture
System.out.printlnWidth : ;
System.out.printlnHeight: ;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
