Ensure that you read all instructions carefully.
You will implement each of the four methods outlined below. All four methods will be written inside the provided Main class beneath the appropriate comment. Declare all methods as static.
For each method that you write, call your method inside the main method by storing the returned value into a variable and then printing out the contents of that variable. The single line comments inside the main method provide instructions on how to do so.
Once you have finished, commit and push your code to Github, inspect your repository to see that your code was successfully pushed, and submit the link to your Github repository on Schoology.
Good luck, have fun!
Write a method called add. This method will have two parameters called numOne and numTwo, both of type int. This method will add the two numbers together and return the result (an integer). Call this method inside the main method and store the result in a variable called resultOne. Print this variable using the println statement.
Write a method called greeting. This method will have one parameter called name of type String. This method will return a string of the format “Bonjour, [name]!”. Call this method inside the main method and store the result in a variable called resultTwo. Print this variable using the println statement.
Write a method called add. This method will have four parameters called numOne, numTwo, numThree, and numFour. This method will add the four numbers together and return the result. However, it will not add the numbers together like numOne + numTwo + numThree + numFour, but instead it will call the add method that you created in question 1 thrice to compute the sum of the four numbers and return that result (an integer). Call this method inside the main method and store the result in a variable called resultThree. Print this variable using the println statement.
Write a method called printCapitalised. This method will have one parameter called toBePrinted. This method will simply print the content that was passed to the method in all capital letters. Call this method inside the main method.