Question
Program Specication: Write a Java program by doing the following: Establish three variables to hold the three measurements which are required to dene a rectangular
Program Specication: Write a Java program by doing the following:
Establish three variables to hold the three measurements which are required to dene a rectangular box, (height, width, depth), as well as a fourth variable to hold the units that the measurements are being given in.
Set the values of each of the four variables to match that of a box that you are familiar with.
Calculate the total surface area of the box.
Display the total surface area of the box (in your given units squared) to the screen in a reasonable report format.
Calculate the length and width of a single rectangular piece of wrapping paper, that is of sucient size to completely cover (wrap) the entire surface area of the box (hint: there will be folds).
Display the length and width of this piece of wrapping paper (in your given units) to the screen in a reasonable report format.
How the write this program using Eclipse ?
Sample run:
Given a box with a height of 6.0 in a width of 8.0 in and a depth of 4.0 in The total surface area of the box is : 208.0 in squared. The length of the piece of wrapping paper is 20.0 in. The width of the piece of wrapping paper is 12.0 in.
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