Skip to content

SundaeSoop/java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

java

Interview Code

This is a test problem from Method Industries. Attached is my file on how to sovlve the problem.

Java is not my main language but it is a language I am wanting to learn more about.

Write a function that takes three Integer numbers Number1, Number2, and Number3, and determines if there is a mathematical operation that will make Number1 (operation) Number2 equal to Number3. If one or more of the 4 common mathematical operations (+,-,,/) can complete the function, return the String representation of the mathematical function. If none of the 4 mathematical operations can make the statement true, return the String "None". For instance: public String mathFunction(1,2,3) returns "+", public String mathFunction(2,2,4) returns "+", (+ and ) public String mathFunction(3,-3,-9) returns "", public String mathFunction(1,2,-1) returns "-", public String mathFunction(3,3,1) returns "/", public String mathFunction(7,1,11) returns "None". You need not use Scanner to input numbers from the user if you would not like to. You can simply write a function that takes the appropriate parameters and pass those parameters in the main method. For extra credit, write tests using Junit.

About

Interview Code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages