title: rad to deg using method Java
body: <p>I have a simple calculator program</p>
  
  <pre><code>package assignment.pkg10;
  
  import java.util.Scanner;
  public class Assignment10 {
  
  public double rad2Degree  (double deg, double rad)
  {
     rad = 0;
     deg =  rad*180  / Math.PI;
     return deg;
  }
  
  public static void main(String[] args) {
  
    Scanner in = new Scanner (System.in);
  
    Assignment10 as10 = new Assignment10();
  
  
      System.out.println("Select which function you want to use:");
      System.out.println(" S - sine\n C - cosine\n T - tangent\n "+ 
              "R - square root\n N - natural log\n X - exit program");
      String plugIn = in.nextLine().toUpperCase();
      char op = plugIn.charAt(0);
      String sValue = plugIn.substring(2);
      double num = Double.parseDouble(sValue);
  
      while (!"X".equals(plugIn))
      {
        switch (op)
        {
         case 'S' : 
          op = 's';
          double sine = Math.sin(num);
            as10.rad2Degree(0, 0);
          System.out.println("sin = " + sine + "\n degrees: " + as10.rad2Degree(0, 0));
          break;
  
      case 'C' : 
          op = 'c';
          double cosine = Math.cos(num);
          System.out.println("cos = " + cosine);
          break;
  
      case 'T' : 
          op = 't';
          double tangent = Math.tan(num);
          System.out.println("tan = " + tangent);
          break;
  
      case 'R' : 
          op = 'r';
          double squareRoot = Math.sqrt(num);
          System.out.println("the square root = " + squareRoot);
          break;
  
      case 'N' : 
          op = 'n';
          double naturalLog = Math.log(num);
          System.out.println("ln = " + naturalLog);
          break;
  
  }
  
  System.out.println("S - sine\n C - cosine\n T - tangent\n "+ 
              "R - square root\n N - natural log\n X - exit program");
              plugIn = in.nextLine().toUpperCase();
  }
  
  System.out.println("Goodbye ");
  
  }
  
  }
  </code></pre>
  
  <p>I can't seem to figure out what to put into the method <strong>rad2Degree</strong> to convert Radians to Degrees so I can output the radians and degrees.</p>
  
  <p>An example of the output would be :</p>
  
  <pre class="lang-none prettyprint-override"><code>Select which function you want to use:
   S - sine
   C - cosine
   T - tangent
   R - square root
   N - natural log
   X - exit program
  s 4
  sin = -0.7568024953079282
   degrees: .069756473
  </code></pre>