Skip to content
Snippets Groups Projects
Commit 746d34fa authored by s2839857's avatar s2839857
Browse files

celsius to fahrenheit converter

parent ad617228
No related branches found
No related tags found
No related merge requests found
Pipeline #33968 failed
...@@ -54,6 +54,5 @@ ...@@ -54,6 +54,5 @@
<version>5.8.2</version> <version>5.8.2</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
</dependencies> </dependencies>
</project> </project>
\ No newline at end of file
...@@ -40,6 +40,4 @@ public class BookQuote extends HttpServlet { ...@@ -40,6 +40,4 @@ public class BookQuote extends HttpServlet {
Double.toString(quoter.getFahrenheit(request.getParameter("celsius"))) + Double.toString(quoter.getFahrenheit(request.getParameter("celsius"))) +
"</BODY></HTML>"); "</BODY></HTML>");
} }
} }
...@@ -3,6 +3,7 @@ package nl.utwente.di.bookQuote; ...@@ -3,6 +3,7 @@ package nl.utwente.di.bookQuote;
public class Quoter { public class Quoter {
double getFahrenheit(String celsius){ double getFahrenheit(String celsius){
double fahrenheit = Integer.parseInt(celsius) * 9 / 5 + 32; double fahrenheit = Integer.parseInt(celsius) * 9 / 5 + 32;
return fahrenheit; return fahrenheit;
} }
......
...@@ -25,4 +25,4 @@ ...@@ -25,4 +25,4 @@
<servlet-name>BookQuote</servlet-name> <servlet-name>BookQuote</servlet-name>
<url-pattern>/bookQuote</url-pattern> <url-pattern>/bookQuote</url-pattern>
</servlet-mapping> </servlet-mapping>
</web-app> </web-app>
\ No newline at end of file
<!DOCTYPE HTML> <!DOCTYPE HTML>
<!-- Front end for the webBookQuote Servlet. --> <!-- Front end for the webBookQuote Servlet. --->
<html lang="en"> <html lang="en">
<head> <head>
......
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment