Results 1 to 2 of 2
Thread: Ladder Program (Need Assistance)
- 12-14-2010, 10:32 PM #1Member
- Join Date
- Dec 2010
- Rep Power
Ladder Program (Need Assistance)
Hey how is everyone? I have a quick question on how to write the code for this type of Java Program.
This program is going to start by asking the user in a dialog box is they need a ladder.
If you type no, the program will display a message saying no ladder was chosen. And it will end.
The program will pick a random sized ladder between 15 and 25 feet.
Then the program will lean it against the house at a random number of degrees between 60 and 75.
The program will convert the degrees to radians. (Using library method)
Then it will calculate the height of the ladder (Opp of Hyp or the sine of the number of radians times the ladder size.)
It will then calculate the distance of the ladder from the house (forms a right triangle with the ladder the hyp with hyp squared is the sum of the other 2 sides squared. solving for distance.)
If anyone can help write this it will be an honor.
Last edited by Fubarable; 12-14-2010 at 11:26 PM.
- By Debonairj in forum New To JavaReplies: 18Last Post: 07-27-2010, 02:37 PM
- By Syfer in forum Advanced JavaReplies: 38Last Post: 06-21-2010, 06:59 PM
- By sarchie109 in forum New To JavaReplies: 7Last Post: 11-23-2009, 09:42 AM
- By s_dawg101 in forum New To JavaReplies: 32Last Post: 11-04-2009, 03:49 AM
- By Boer84 in forum New To JavaReplies: 2Last Post: 07-08-2008, 05:14 PM