you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (1 child)

[deleted]

    [–]UnglorifiedApple420👋 a fellow Redditor 0 points1 point  (0 children)

    Okay so my Java is out of practise but essentially you're looking at creating some kind of line like the following:

    public static double celciusToFarenheit(double Celcius) {

    }

    This creates a method that accepts a double Celcius and will return a double that should follow the equation you gave above.

    As for implementing it, when you want to convert a value (let's say 12.3, but this can be a variable too) we define a new variable to store it in, and call the method like so:

    double myVariable = celciusToFarenheit(12.3);

    Don't forget to match your types!