1 Attachment(s)

First day of ever working with Java.. Already confused -.-

So today was in all reality my first day of working with java.. Usually the teacher does a nice little slide show and so on.. But today he gave us a minor program to write and I've gotten to like the last 5 lines.. And I have no idea what to do.. Basically to complete the assignment we have to do the comments I put at the bottom.. It's hard to understand it..

Attachment 2293

lines 33-37 are what I mean..

I'm not looking for anyone to do it for me, just kinda instruct me if you don't mind ^^.. I've never done a programming language in my life and this is like a foreign language so far ^^

Thanks for your help

Re: First day of ever working with Java.. Already confused -.-

It appears you need to calculate the projected sales based upon the division sales. I assume somewhere else you have been given instructions on how to do this. Since we do not have these instructions we cannot help.

--- Update ---

Ahh!

It says it earlier in the dialog: 10%. This would be a math problem and not a Java one.

Re: First day of ever working with Java.. Already confused -.-

Well how would I set something like this up? like how would I tell it to take the number input and increase it by %10? Thats what gets me, I've done google searches and watched videos but nothing is comparable to what I'm doing.. And if I can't make a comparison then I'm stuck ;/

Re: First day of ever working with Java.. Already confused -.-

To get the percent of a number, you multiply it by the percentage value with the decimal two places to the left. So ten percent of 60 = 60 * 0.10.

So just get your input, set the var to: var += (var * 0.10).

Var "increment by" 10 percent of var (in plain English).

Like Junky said, math, not Java, but still, hope it helps. :)

-summit45