Chris Hathaway wrote:Im currently having problems getting the months to properly work...
What Tim said. Are you familiar with methods yet? Because you could use them to eliminate a lot of the repeated code in your program.
Also, for calculation purposes, you may find it easier to number your months from 0 to 11. For one thing, you can then use them as indexes, and for the calculations themselves you probably won't have to add '±1' as often.
If this isn't just an exercise, you may also want to look at Joda Time; I'm pretty certain that its Interval class will already do everything you want.
Oh, and BTW, I
really like your field naming. Very clear and easy to follow. For true adherence to convention, you might want to get into the habit of using camel case (eg,
monthNumberTwo, rather than
monthnumbertwo), but other than that it's very good; and you'd be surprised how many newbies get that part wrong. Keep it up.
Winston