Question: Task #1 Create a wall 1. Look at the code for House class. It contains main method which will create a Square shape, move it



Task #1 Create a wall 1. Look at the code for House class. It contains main method which will create a Square shape, move it left by 140 pixels, move it down by 20 pixels, change the size of the wall to 120, and make it visible. 2. Compile the code and execute the main method in House class. It will draw a red wall Task #2 Create a window 1. Declare a variable of type Square called window. 2. Instantiate a Square object and assign it's reference to the variable window 3. Move the window towards left by 120 pixels. 4. Move the window towards the bottom by 40 pixels. 5. Change the color of window to black. 6. Change the size of the window to 40 Task #1 Create a wall 1. Look at the code for House class. It contains main method which will create a Square shape, move it left by 140 pixels, move it down by 20 pixels, change the size of the wall to 120, and make it visible. 2. Compile the code and execute the main method in House class. It will draw a red wall Task #2 Create a window 1. Declare a variable of type Square called window. 2. Instantiate a Square object and assign it's reference to the variable window 3. Move the window towards left by 120 pixels. 4. Move the window towards the bottom by 40 pixels. 5. Change the color of window to black. 6. Change the size of the window to 40
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
