Re: Help for New programmer
That (correction in yellow) shouldn't be there!
Re: Help for New programmer
What have you got so far, and what exactly is the problem you have with this assignment?
Whenever there is a hard job to be done I assign it to a lazy man; he is sure to find an easy way of doing it...
W. Chrysler
Re: Help for New programmer
all i have so far are the inputs of all te angles, im just completly lost with this, everything we have done has been basic multipliation division... i dont no how to go about the math
Re: Help for New programmer
Can you do the same math with pen and paper?
Re: Help for New programmer
I have an idea on how to do it on paper, but not 100%
Re: Help for New programmer
Quote:
Originally Posted by
ryan449
I have an idea on how to do it on paper, but not 100%
If you can't do it on paper (meaning you don't completely understand the math) how do you expect to do it in a program? I don't say that to be rude, but you need to understand the problem before you can code up a solution. Start with understanding the problem.
Re: Help for New programmer
Quote:
Originally Posted by
ryan449
I have an idea on how to do it on paper, but not 100%
Well you need to sort out exactly how to solve the problem on paper before thinking about Java code.
It basically looks like arithmetic in base 60 and base 360.
Like primary school addition, start with the smallest orders and work up. Start with seconds, move to minutes, adding any carry-over, then degrees, adding any carry-over. So if the seconds or minutes exceed 59, subtract 60 and carry 1 over to the next column. If the degrees exceed 359, just subtract 360.
In Java, you can either use the '-' (subtraction) operator to subtract 60 or 360, or the '%' (modulus) operator to find the remainder after dividing by 60 or 360. The results, in this case, will be the same.
From a programmer's point of view, the user is a peripheral that types when you issue a read request...
P. Williams