Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Entity Alignment Concepts Recent Advances And Novel Approaches

Authors: Xiang Zhao ,Weixin Zeng ,Jiuyang Tang

1st Edition

9819942527, 978-9819942527

More Books

Students also viewed these Databases questions