I Need Some Help With This Program

Discussion in 'Computing, Science, and Technology' started by deleted account 92, Sep 23, 2008.

  1. deleted account 92

    deleted account 92 Active Member

    Joined:
    Jan 1, 2008
    Messages:
    2,797
    Likes Received:
    20
    I'm in computer programming in school, and we have to make this program that calculates the profit of certain items. I already set up the GUI, but I don't know how to find the profits from the prices and quantities. It's not that I don't know how to code it, I just don't mathematically know how this works. My brother's being a *** and won't help me, so can someone please tell me how I can find the profits?

    Please Register or Log in to view images


    ------------------double post merged------------------
    Please help me, I have like 2 days to get this done.
  2. mattym

    mattym New Member

    Joined:
    Sep 22, 2007
    Messages:
    786
    Likes Received:
    3
    Device:
    iPhone 4 (Black)
    dude how can you be able to do programming without the skills in basic math that this requires.

    Profit in your case is simply (Qty Sold * Retail)-(Qty Sold * Retail) then add this for all items to get your total profit.

    Qty On hand should have nothing to do with this seeing as its just a calculator. If they want you to do this in such a way that it is meant for weekly/monthly totals then maybe quantities not sold count as negative. But i am sure that they just want it to do the simple calculation.

    But really this isnt even math. Its just common sense or second nature. All good computer programmers should be well educated in all math and science.
  3. deleted account 92

    deleted account 92 Active Member

    Joined:
    Jan 1, 2008
    Messages:
    2,797
    Likes Received:
    20
    I am good at math, I'm in the most advanced math class I can be in at this point. I just didn't know what qty on hand had to do with anything.

    And I couldn't ask my teacher cuz shes out for two weeks...
  4. simonrichards150

    simonrichards150 New Member

    Joined:
    Oct 29, 2007
    Messages:
    2,058
    Likes Received:
    94
    Device:
    iPod touch
    Code:
    profit = (retail - wholesale) * quantity

Share This Page