Add another subclass division to the example below:
class Calculation{
int z;
public void addition(int x, int y){
z = x+y;
System.out.println("The sum of the given numbers:"+z);
}
public void Subtraction(int x,int y){
z = x-y;
System.out.println("The difference between the given numbers:"+z);
}
}
public class My_Calculation extends Calculation{
public void multiplication(int x, int y){
z = x*y;
System.out.println("The product of the given numbers:"+z);
}
public static void main(String args[]){
int a = 20, b = 10;
My_Calculation demo = new My_Calculation();
demo.addition(a, b);
demo.Subtraction(a, b);
demo.multiplication(a, b);
}
}
Calculation.java :
//Java class
public class Calculation {
int z;
// method for addition of two numbers
public void addition(int x, int y) {
z = x + y;
System.out.println("The sum of the
given numbers:" + z);
}
//method for subtraction of two numbers
public void Subtraction(int x, int y) {
z = x - y;
System.out.println("The difference
between the given numbers:" + z);
}
}
******************************
division.java :
//Java class
public class division extends Calculation {
//method to divide a number by another number
public void divide(int x, int y){
z = x/y;
System.out.println("The division of
the given numbers:"+z);
}
}
***********************************
My_Calculation.java :
//Java class
public class My_Calculation extends Calculation {
// method to calculate multiplication
public void multiplication(int x, int y) {
z = x * y;
System.out.println("The product of
the given numbers:" + z);
}
// main method entry point of the program
public static void main(String args[]) {
int a = 20, b = 10;// declaring
variable
// creating object of
My_Calculation
My_Calculation demo = new
My_Calculation();
demo.addition(a, b);
demo.Subtraction(a, b);
demo.multiplication(a, b);
//creating object of division
division d=new division();
d.divide(a, b);//calling method
with division object
}
}
===============================
Screen 1:

Add another subclass division to the example below: class Calculation{ int z; public void addition(int x,...