PDA

View Full Version : Can someone code a java program for me?


Juicebox
03-03-2009, 07:33 PM
hey i am in a class called Computer Science and we were assigned this program to code that I have no idea how to do since my teacher apparently forgot how to teach... I'm going to post the problem and if anyone can write it up for me and email it to me i would be very very grateful. :]

"Chapter 4 Review Question 12
Use good design and programming techniques to develop a program to compute the volume of a box, cylinder, cone, and sphere. The user interface should provide option buttons to allow the user to select a shape. The interface also should include four input fields that allow a user to enter numbers with two decimal places; each input field should indicate that the input value is measured in feet.

When the user clicks a button to perform the calculation, the button's event procedure first should determine that the user selected a shape type. Next, the event procedure should ensure that only nonzero, positive values have been entered for the measurements required for the particular formula being used. Finally, the program should perform the calculation and display a message box listing the inputs, outputs, and calculated volume in a suitable format:
For example, the volume of a box wih a length of 1.00 feet, a width of 2.00 feet, and a height of 3.00 feet is 6.00 cubic feet.
Use the following formulas to determine the volumes of the various shapes:
1. Volume of a box: V = L x W x H, where L is the length, W is the width, H is the height.
2. Volume of a cylinder: V = pi x R x R x H, Where R is the radius and H is the height.
3. Volume of a cone: V = (pi x R x R x H)/3, where R is the radius of the base and H is the height.
4. Volume of a sphere: V = (4/3) x pi x R x R x R, where R is the Radius.

In all of the above formulas, use either 3.14 or the Java constant, Math.PI, for the value of pi. Your may use the Math.Pow() method for exponentiation."

If you don't mind writing this code for me I'd be very grateful :] and I'd kinda need it ASAP..

E-mail FTRJuicebox@yahoo.com

Respected22
08-26-2009, 11:31 PM
This is a very simple thing. I will do it for you. I will post it on this thread.

Brains
08-27-2009, 01:41 AM
Do you need this in a GUI or a CMD windows? A GUI will be harder to make, but will be easier to use, a CMD will take a short time to make, but will look horrible aesthetically.

songoty
08-27-2009, 02:39 AM
If it's an assignment for a course, you should do it yourself. What's the point of taking the course if you don't do it yourself?

Scyth
08-27-2009, 05:19 PM
If it's an assignment for a course, you should do it yourself. What's the point of taking the course if you don't do it yourself?

cuz were kid's? we help each other out?

Juicebox
08-27-2009, 07:54 PM
Holy crap you guys.. gravedig much??? xD

But this was my assignment back in March.. and I have 0 programming skills and I took a class that was 100% programming and my teacher didnt help at all.