Advertisement
Guest User

Untitled

a guest
Jan 18th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.17 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. class Conversions {//Begin Class
  4.  
  5.     public float feettoInch(float feet){//FT to IN Method
  6.         float inch = feet * 12;
  7.         return inch;
  8.                
  9.     }//End Method
  10.    
  11.     private float feettoMeters(float feet) {//FT to M Method
  12.         float  (float) (feet * 0.3048);
  13.         return meters; 
  14.     }//End Method
  15.  
  16.     private float inchesttoCentimeters(float inches) {//IN to CM Method
  17.         float centimeters = (float)(inches/0.39370);
  18.         return centimeters;
  19.     }//End Method
  20.  
  21.     private float centimetertoMeter (float centimeter) {//CM to M Method
  22.         float meters = (float)(centimeter/100);
  23.         return meters;
  24.     }//End Method
  25.  
  26.     public float meterstoFeet (float meters) {//M to FT Method
  27.         float feet = (float)(meters /0.3048);
  28.         return feet;
  29.     }//End Method
  30.  
  31.     private float metertoCentimeters (float meter) {//M to CM Method
  32.         float centimeters = (float)(meter * 100);
  33.         return centimeters;
  34.     }//End Method
  35.  
  36.     private float centimetertoinches (float centimeter) {//CM to IN Method
  37.         float inches = (float)(centimeter * 0.39370);
  38.         return inches;
  39.     }//End Method
  40.  
  41.     private float inchtoFeet (float inches) {//IN to FT Method
  42.         float feet = inches / 12;
  43.         return feet;
  44.     }
  45.    
  46. }//End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement