SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Apr 2011
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Beginner Help - VB assignment

    Hey guys, I have to make a visual basic program for a school assignment. I am an absolute beginner at it though, but am willing to learn.

    I have to make an income calculator for farmers that make giant turnips.
    So basically:
    1. If the turnip weighs less than 350kg, the farmer will receive $2 per kilo
    2. If the turnip weighs 390 or more, the farmer gets $1.50 per kilo MINUS $180 for a maintenance fee.
    3. If the turnip weighs between 350 and 389kg, it has to be sent to a paddock that costs $25 per week for lease. Turnips loose 1% of their mass per week in this paddock. When the turnip gets below 350kg it can be exported. As ships depart weekly, turnips may drop a bit below 350Kg before departure.

    Create a profit calculator for the turnip farmer for a list of cattle weights.

    Functional Requirements:
    o Enter the weight of each cow into an array
    o Calculate the income from each cow and store in another array
    o Add up the values in the array and display total income.


    Any help or specific code would be very helpful. It doesn't need to be pretty, just needs to work.

  2. #2
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,653
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Have you asked your teacher or consulted the course materials? Typically they tell you how to at least start on this stuff before giving homework?

    In any case, you should at least try it yourself before asking for help. You do want to learn this, right?

  3. #3
    SitePoint Member
    Join Date
    Apr 2011
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have designed the form with 2 text boxes.
    What I want to know is how to do:
    If textbox.1 = "200<>249"
    then textbox.2 = "?*2"

    See I want to make that number times by 2, but i don't know what to call it. Any suggestions?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •