Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Java 1) Create a rectangle r1 with height 18, width 6, and color blue. 2) Change the r1's colour to green. 3) Create a rectangle
Java
1) Create a rectangle r1 with height 18, width 6, and color "blue".
2) Change the r1's colour to "green".
3) Create a rectangle r2 with width 6, height 12 and color "red".
4) Change rectangle r2's width to 4
5) Output the sum of the two rectangles' perimeters
6) Output the absolute value of the difference of the two rectangles' areas
7) Change r2's height to 24
8) Output the square root of r2's area, formatted to only show 2 digits after the decimal
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started