write small java code using pseudocode

Convert a solution algorithm into a Java program. Solution algorithm is given you are to write a java code that implements the solution algorithm identified. Java code should carefully follow what has been listed in the algorithm.