Results 1 to 6 of 6
  1. #1
    coreyk67 is offline Member
    Join Date
    May 2012
    Posts
    2
    Rep Power
    0

    Default help convert something simple to java from vb

    I'm a total newb and need help doing a conversion from vb to java. its a hydrometer calibration formula.


    Java Code:
    Function sgRatio(Temp As Double) As Double
        sgRatio = 1.00130346 - 0.000134722124 * Temp + 0.00000204052596 * Temp ^ 2 - 2.32820948E-09 * Temp ^ 3
    End Function
    
    Function corSG(SG As Double, Temp As Double, CalT As Double) As Double
        corSG = SG * (sgRatio(Temp) / sgRatio(CalT))
    End Function

    Layman instructions.

    C = ((1.313454 - (0.132674*F) + (0.00205779 * F^2) - (0.000002627634 * F^2)))

    Where F = Temperature in degrees Fahrenheit.

    C = Correction

    So,

    CG = C + (SG * 0.001)

    Where,

    CG = Specific Gravity corrected for temperature

    C = Correction from above forumla

    SG = Specific Gravity before temperature correction.

    Thanks in advance... this is not homework, just me messing around :)

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,234
    Rep Power
    19

    Default Re: help convert something simple to java from vb

    All the help you'll need to make a start can be found in The Java™ Tutorials

    And it doesn't make any difference whether it's homework or not, this is a forum -- not a code mill. We're prepared to help you learn, not to do your work for you.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    coreyk67 is offline Member
    Join Date
    May 2012
    Posts
    2
    Rep Power
    0

    Default Re: help convert something simple to java from vb

    Just figured I could learn from an example. Thanks anyways Mr. catty :)

  4. #4
    chipp's Avatar
    chipp is offline Member
    Join Date
    Jul 2011
    Posts
    62
    Rep Power
    0

    Default Re: help convert something simple to java from vb

    OOT: since when db becomes "catty"?

  5. #5
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,519
    Blog Entries
    7
    Rep Power
    20

    Default Re: help convert something simple to java from vb

    Quote Originally Posted by chipp View Post
    OOT: since when db becomes "catty"?
    For no particular reason, db prefers the nick name Tarquin Fin Tim Lin Bin Whin Bim Lim Bus Stop F’tang F’tang Olé Biscuitbarrel.

    kind regards,

    Mrs Elsie Zzzzzzzzzzzzzzzzzzt! (slightly silly, 1204 points)
    cenosillicaphobia: the fear for an empty beer glass

  6. #6
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,234
    Rep Power
    19

    Default Re: help convert something simple to java from vb

    The whole shebang is plagiarized
    Temp Correction Formula for Hydrometer - Page 3 - Home Brew Forums
    Temp Correction Formula for Hydrometer - Page 2 - Home Brew Forums

    Guess the mouse is going to have to buckle down and do its own homework.

    OT, it's time for me to change my signature.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. How Do I: Convert to Java
    By mexists in forum New To Java
    Replies: 3
    Last Post: 11-29-2011, 02:50 AM
  2. how to convert * into : using java
    By Ricks in forum New To Java
    Replies: 2
    Last Post: 02-02-2010, 04:57 PM
  3. Convert .java to .exe
    By susan in forum New To Java
    Replies: 6
    Last Post: 02-11-2009, 06:47 AM
  4. Convert java to .exe
    By heartysnowy in forum New To Java
    Replies: 13
    Last Post: 11-21-2008, 08:16 AM
  5. convert VB6 applications to Java
    By bbq in forum New To Java
    Replies: 1
    Last Post: 07-05-2007, 03:57 AM

Posting Permissions

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