Text: Note that both programs should be separate from each other and show the result with the text message for both.
Instructions:
Write the following two programs in the Java programming language:
1. Write a Java program that gets 10 numbers from the user, then counts the number of even and odd values. Display the results using a dialog box with an appropriate message. (5 marks)
2. Write a Java program to calculate the factorial of a positive integer number entered by the user. Display the factorial of the number using a dialog box with an appropriate message. (5 marks) The factorial of n is represented as n! and is calculated as n * (n-1) * (n-2) * ... * 2 * 1. For example, 4! = 4 * 3 * 2 * 1 = 24.