And yes, I personally have written it.
Wow.... I had the same homework problem, more than 20 years ago, when I was a freshman in college. Of course, back then, it had to be done in BASIC. It is amazing how homework problems remain the same year after year.
Nistor Alexandru wrote:If you must know I am trying to learn to program on my own I am 22 and barely finished Head first Java I am still barely understanding programming concepts but if asking for help is such a problem then so be it
You're welcome to ask for help, but there's a difference between asking for help and asking for a complete program (as you did at the end of your first post).
Before you write any code, take a pen and a piece of paper and determine what the program should do and how it should do it. Once you've figured that out you can start working on a Java program. If you get stuck with the program, show us what you've tried and we'll be glad to help.
Nistor Alexandru wrote: I...barely finished Head first Java I am still barely understanding programming concepts
I would suggest that you got back to HFJ and work through stuff you still find difficult/confusing. Everything you do builds off what you've done before, so if your fundamentals are shaky, you're in trouble trying to go forward.
We love to help. We love to answer questions. Ask here. Be forthcoming with with what your doing, where your examples come from, what your code does, what you expect...etc. the more you give us, the easier it is to help.
On the flip side, don't give us TOO much information. if you have 200 lines of code, but are only confused about one, don't post all of it...post a small, self-contained example that someone here can compile and run that illustrates your problem.