Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

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

  1. #1
    Junior Member
    Join Date
    Aug 2013
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Exclamation 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..

    problem.jpg


    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


  2. #2
    Grand Poobah
    Join Date
    Mar 2011
    Posts
    1,545
    My Mood
    Grumpy
    Thanks
    0
    Thanked 167 Times in 158 Posts

    Default 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.
    Improving the world one idiot at a time!

  3. The Following User Says Thank You to Junky For This Useful Post:

    grynch (August 28th, 2013)

  4. #3
    Junior Member
    Join Date
    Aug 2013
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default 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 ;/

  5. #4
    Member
    Join Date
    Jul 2013
    Posts
    47
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default 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

Similar Threads

  1. today is 1st day with java and i am screwed...
    By sumit043020701 in forum What's Wrong With My Code?
    Replies: 6
    Last Post: December 20th, 2011, 09:59 AM
  2. It works!!! eureka!!! Java...Day 12.
    By Spidey1980 in forum What's Wrong With My Code?
    Replies: 18
    Last Post: August 18th, 2011, 09:41 PM
  3. Working out the day from numeric date (dd/mm/yy format).
    By ShaunB in forum Java Theory & Questions
    Replies: 6
    Last Post: April 23rd, 2011, 08:55 PM
  4. [SOLVED] Java beginner is confused....
    By truebluecougarman in forum What's Wrong With My Code?
    Replies: 4
    Last Post: January 27th, 2011, 08:50 AM
  5. Replies: 4
    Last Post: January 27th, 2009, 12:03 AM