Skip to content

Labs #7

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 2 commits 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
1 change: 1 addition & 0 deletions .idea/.name

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

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.

48 changes: 34 additions & 14 deletions .idea/misc.xml

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

4 changes: 2 additions & 2 deletions .idea/encodings.xml → .idea/vcs.xml

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

1 change: 0 additions & 1 deletion conversion.iml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<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
68 changes: 59 additions & 9 deletions src/main/java/ConversionTool.java
Original file line number Diff line number Diff line change
@@ -1,21 +1,71 @@
public class ConversionTool {


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

public static float CentimetersToInches(float centimeters){}
public static float CentimetersToInches(float centimeters) {

public static float InchesToCentimeters(float inches){}
if(centimeters < 0){
return 0;
}

public static float FeetToMeters(float feet){}
return centimeters / 2.54f;
}

public static float MetersToFeet(float meters){}

public static float CelsiusToFahrenheit(float celsius){}
public static float InchesToCentimeters(float inches){

public static float FahrenheitToCelsius(float fahrenheit){}
if (inches < 0){
return 0;
}

public static float MphToKph(float mph){}
return inches * 2.54f;
}

public static float KphToMph(float kph){}
public static float FeetToMeters(float feet){

if(feet < 0){
return 0;
}

return feet / 3.28f;
}

public static float MetersToFeet(float meters){

if(meters < 0){
return 0;
}

return meters * 3.28084f;
}

public static float CelsiusToFahrenheit(float celsius){

return (celsius * 1.8f) + 32f;
}

public static float FahrenheitToCelsius(float fahrenheit){

return (fahrenheit -32f) * .5556f;
}

public static float MphToKph(float mph){

if (mph < 0){
return 0;
}

return mph * 1.60934f;
}

public static float KphToMph(float kph){

if (kph < 0){
return 0;
}

return kph * .6214f;
}
}
Binary file modified target/classes/ConversionTool.class
Binary file not shown.