This project is designed to help you practice and understand the usage of String and Math methods in Java. You will complete various methods that demonstrate your understanding of these concepts and then verify your implementations by running unit tests.
- Main.java: This is the main class where you will complete the method implementations.
- MainTest.java: This class contains unit tests to check the correctness of your methods.
- Accept the assignment from the GitHub Classroom link provided in Google Classroom.
- Clone the repository to your local machine.
- Open the project in Eclipse.
- Open
Main.java. - Complete each method in
Main.javafollowing the instructions provided in the comments. - The methods you need to implement include:
concatenateStrings(String str1, String str2)calculateSquareRoot(double number)toUpperCase(String str)findMax(int num1, int num2)getStringLength(String str)roundValue(double value)getSubstring(String str, int beginIndex, int endIndex)getAbsoluteValue(int number)replaceCharacter(String str, char oldChar, char newChar)powerOf(double base, double exponent)
- Open
MainTest.java. - Run the unit tests to verify your method implementations.
- Make sure all tests pass before submitting your project.
- Once you have completed the methods and all tests pass, push your changes to GitHub.
- Make sure your repository is up to date with your final implementations.
Your grade will be based on the correctness of your implementations as verified by the unit tests. Make sure all methods are completed and that all tests pass.
Remember to adhere to the Honor Agreement. Do not copy code from others, and ensure all work is your own.
If you have any questions or need assistance, feel free to contact me via email at kevin.hare@sduhsd.net or during office hours.