An n n matrix is called a positive Markov matrix if each element is positive and the sum of the elements in each column is 1. Write a program MarkovMatrix.java that prompts the user to enter a 33 matrix of double values. Use a method with the following signature to test if the given matrix is a Markov matrix.
public static boolean isMarkovMatrix(double[][] matrix)
Your program is expected to function as shown in following examples:
$ javac MarkovMatrix.java
$ java MarkovMatrix
Enter Row 1: 0.15 0.875 0.375
Enter Row 2: 0.55 0.005 0.225
Enter Row 3: 0.30 0.12 0.4
Markov matrix given.