1 Attachment(s)

Can anybody explain me that problem, i don understand what is it.. please help me

blem 3-2. Tray Problem. Here’s a sheet of cardboard (L units long and W units wide). A square cut X units long is made in each corner:

Attachment 4636

If you cut out the four shaded corners and fold the resulting sides up along the dotted lines, a tray is formed. Build an application that lets a user input the length (L) and width (W). Have the application decide what value X should be such that the tray has the largest volume possible.

Re: Can anybody explain me that problem, i don understand what is it.. please help me

What don't you understand? How to get input from the user? How to calculate volume? What?

Oh, and you deleted the code from your previous question: http://www.java-forums.org/new-java/...tml#post323115

Please don't do that.

Re: Can anybody explain me that problem, i don understand what is it.. please help me

no .. I Know, how to get the value from user, but i don know what is in the last line mention, "largest possible value"

Re: Can anybody explain me that problem, i don understand what is it.. please help me

Quote:

Originally Posted by

**akshaygoel96** no .. I Know, how to get the value from user, but i don know what is in the last line mention, "largest possible value"

It's asking for you to return the largest possible *volume*, not *value*. Do you know how to calculate a volume of a rectangular solid if you know the lengths of its sides?

Re: Can anybody explain me that problem, i don understand what is it.. please help me

Moved from Advanced Java. Please don't post beginner questions in that section.

Also, I have already asked you to go through the Forum Rules. Please do that before you make any more posts in this forum.

db

Re: Can anybody explain me that problem, i don understand what is it.. please help me

The volume of the tray is (l-2x) * (w-2x) * x; x is the unknown and you have to maximize the volume.

kind regards,

Jos