Conditional statements in Java.
There are two files provided for this assignment. GuessingGame.java contains the class you are required to complete. It contains one method/function (plus a main method). At the top of the method is documentation that indicates what the method should do. Update the code in the method to meet the requirements.
Make sure that messages printed to the console meet the requirements exactly. The test is case sensitive and does not tolerate typos or extra white space.
To test your solution, you’ll need to run the JUnit test. Once you’ve created your file with the required code your can compile and run the test. Use the following steps:
- Create a new folder.
- Put junit-4.12.jar and hamcrest-core-1.3.jar in this folder (available below).
- Copy the test code with possible supporting files in this same folder.
- Create the file with code as required.
- Compile your code and the test code using the command javac -cp .:junit-4.12.jar:hamcrest-core-1.3.jar *.java
- Run the test using the command java -cp .:junit-4.12.jar:hamcrest-core-1.3.jar org.junit.runner.JUnitCore <test class>
Please do not change the original format of the java file. Follow the instruction, that was given in the comment (in java file). Provide a screenshot that it worked in JUnit test.
Last Updated on February 10, 2019 by EssayPro