For this lab, you will be writing method definitions. Thesemethod definitions will be based on method calls I have alreadywritten for you. Do all of the following steps in order. DO NOTmove onto the next step until the previous one is complete.
1. Download the starting file called Lab10.java.
2. Within this file, you will find a completely written mainmethod. Please DO NOT modify this code. Do read the code andfamiliarize yourself with what it does. Specifically focus on themethod calls.
3. Write the method stubs (just like we did in class) for allthe methods. Once you complete this, the program will compile andyou will be able to test each method as you write it completely.Remember, a method stub includes the method name, all inputparameters and the output type. If the method returns a value, youshould write a return statement that just returns a default value.Without this, it will not compile. Therefore, the method bodyshould only be one line of code. In doing this you must askyourself the following questions for each:
a. What information does the method need?
b. What information should the method return?
c. What is the method name?
4. Write a JavaDoc method header for each method. This willinclude a method description and any necessary parameter and returnvalue descriptions. Make sure you view the Java documentation tosee if your JavaDoc code works.
5. Write the method definitions one by one for all methods,testing after each one. Think about how the method will accomplishits task.
6. In the main method, I have included lots of tests for eachmethod. Make sure to test each method as you write it. The mainmethod should run completely once you have all of the methoddefinitions correctly written.
NOTE: We will cover method overloading next class. The thirdmethod called luckySum requires this concept.
This is a java project. Since I couldn't attach the file I copyand pasted the file below
import java.util.Scanner;
/**
* This is the starting file for Lab 10.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Lab10
{
/**
* The main method tests all four method definitions.
*
* @param args A string array of input arguments
*/
public static void main(String[] args)
{
Scanner input = new Scanner(System.in);
 Â
/**
* Method one checks to see if a number is even or odd.
*/
System.out.println(\"Testing method one\");
 Â
// Test with real value
String ans1 = evenOrOdd(7); // odd
System.out.println(\"7 is an \" + ans1 + \" number.\");
 Â
// Test with user input
System.out.println(\"Please enter an integer: \");
int num = input.nextInt();
String ans2 = evenOrOdd(num);
System.out.println(\"The integer is an \" + ans2 + \" number.\");
/**
* Method two checks to see if either of the strings appears
* at the very end of the other string, ignoring upper/lower
* case differences (in other words, the computation should
* not be \"case sensitive\").
*/
System.out.println(\"\nTesting method two\");
 Â
// Test with real values
boolean end1 = endOther(\"Hiabc\", \"abc\"); // true
boolean end2 = endOther(\"AbC\", \"HiaBc\"); // true
boolean end3 = endOther(\"abcXYZ\", \"abcDEF\"); // false
System.out.println(\"The booleans are: \" + end1 + \", \" + end2+
\", \" + end3);
 Â
// Test with user input
System.out.println();
System.out.println(\"Please enter the first string: \");
String first = input.next();
System.out.println(\"Please enter the second string: \");
String second = input.next();
 Â
boolean end4 = endOther(first, second);
if (end4) {
System.out.println(\"\nOne of the strings appears at the end of theother string.\");
} else {
System.out.println(\"\nNeither of the strings appears at the end ofthe other string.\");
}
/**
* This method should return the sum of three numbers.
* However, if one of the numbers is 13 then it does not
* count toward the sum and the parameters to its right
* do not count either. So, if the second number is 13,
* then the second and the third number do not count toward
* the sum.
*/
System.out.println(\"\nTesting method three\");
 Â
// Test with real values
int sum1 = luckySum(4, 2, 3); // 9
int sum2 = luckySum(13, 2, 9); // 0
int sum3 = luckySum(9, 4, 13); // 13
double sum4 = luckySum(7.2, 3.4, 13.0); //10.6
double sum5 = luckySum(6.57, 13.0, 10.1); // 6.57
 Â
System.out.println(\"The lucky sums are: \" + sum1 + \", \" + sum2+
\", \" + sum3 + \", \" + sum4 + \", \" + sum5);
// Test with user input
System.out.println(\"\nPlease enter the first number:\");
int num1 = input.nextInt();
System.out.println(\"Please enter the second number:\");
int num2 = input.nextInt();
System.out.println(\"Please enter the third number:\");
int num3 = input.nextInt();
 Â
int lucky = luckySum(num1, num2, num3);
System.out.println(\"The lucky sum is \" + lucky);
}
 Â
// Please write your methods here. Include JavaDoc methodheaders.