Skip to content

Vidya : completed the ConversionTool #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 1 addition & 17 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions .idea/copyright/profiles_settings.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/encodings.xml

This file was deleted.

84 changes: 71 additions & 13 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions conversion.iml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_5" inherit-compiler-output="false">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_5">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
Expand Down
21 changes: 0 additions & 21 deletions src/main/java/ConversionTool.java

This file was deleted.

78 changes: 78 additions & 0 deletions src/main/java/newTool.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
import java.util.Scanner;

public class newTool {


public static void main(String[] args){
}

public float centimetersToInches(float centimeters){
if (centimeters<0){
return 0;
}
float inches = (float) (((centimeters / 2.54) * 100 ) / 100.0);
return (inches );
}

public static float InchesToCentimeters(float inches){
if (inches<0){
return 0;
}
float centimeters = (float) (((inches * 2.54) * 100 )/ 100.0 );
return (centimeters );
}

public static float FeetToMeters(float feet) {
if (feet<0){
return 0;
}
float meters = (float) (((feet * 0.3048) * 100) / 100.0);
return (meters);

}


public static float MetersToFeet(float meters){
if (meters<0){
return 0;
}
float feet = (float) (((meters / 0.3048) * 100) / 100.0);
return (feet);
}



public static float CelsiusToFahrenheit(float celsius){
float Fahrenheit = (float) ((((celsius * 9/5.0) +32) * 100) / 100.0);
return (Fahrenheit);

}


public static float FahrenheitToCelsius(float fahrenheit){
float celsius = (float) ((((fahrenheit -32) * 5/9.0) * 100) / 100.0);
return (celsius);

}

public static float MphToKph(float mph){
if (mph<0){
return 0;
}
float Kph = (float) (((mph * 1.60934) * 100) / 100.0);
return (Kph);

}

public static float KphToMph(float kph){
if (kph<0){
return 0;
}
float mph = (float) (((kph / 1.60934) * 100) / 100.0);
return (mph);
}


}


Loading