Can anyone write an essay on the following program
import java.util.*;
public class calc
{
int i,p,k=0;
double o=0, a=0;
String operation="", fin1;
void input()
{
Scanner in= new Scanner(System.in);
System.out.println("Enter the first number");
i= in.nextInt();
System.out.println("Enter the second number");
p= in.nextInt();
System.out.println("Enter the operation");
operation= in.nextLine();
}
void calculate()
{
if(operation.equalsIgnoreCase("Add"))
{
k=i+p;
fin1= "The sum of "+i+" and "+p+" is: "+k;
}
else if(operation.equalsIgnoreCase("Minus"))
{
k=i-p;
fin1= "The difference of "+i+" and "+p+" is: "+k;
}
else if(operation.equalsIgnoreCase("Multiply"))
{
k=i*p;
fin1= "The answer when "+i+" and "+p+" are multiplied is: "+k;
}
else if(operation.equalsIgnoreCase("Divide"))
{
k=i/p;
fin1= "The answer when "+i+" and "+p+" are divided is: "+k;
}
else if(operation.equalsIgnoreCase("Remainder"))
{
k=i%p;
fin1= "The remainder when "+i+" and "+p+" are divided is: "+k;
}else if(operation.equalsIgnoreCase("Percent"))
{
k=i*100/p;
fin1= "The percentage of "+i+" and "+p+" is: "+k;
}
else if(operation.equalsIgnoreCase("Random"))
{
if(i>=1&&p<=10)
{
o=Math.random()*10;
fin1= "The random value between 1-10 is: "+o;
}
else if(i>=10&&p<=20)
{
o=Math.random()*100;
fin1= "The random value between 10-20 is: "+o;
}
else
{
o=0.0;
fin1= "ErrOR";
}
}
else if(operation.equalsIgnoreCase("sqrt"))
{
o= Math.sqrt(i);
a= Math.sqrt(p);
fin1="The square root of "+i+" is ("+o+") and the square root of "+p+" is ("+a+")";
}
else if(operation.equalsIgnoreCase("cbrt"))
{
o= Math.cbrt(i);
a= Math.cbrt(p);
fin1="The cube root of "+i+" is ("+o+") and the cube root of "+p+" is ("+a+")";
}
}
void display()
{
System.out.println("The first number: "+i);
System.out.println("The second number: "+p);
System.out.println(" ");
System.out.println(fin1);
}
static void main()
{
calc sc= new calc();
sc.input(); sc.calculate(); sc.display();
}
}