Answer:
abstract class Bank
{
abstract public int getBalance();
}
class BankA extends Bank
{
public int getBalance()
{
return 100;
}
}
class BankB extends Bank
{
public int getBalance()
{
return 150;
}
}
class BankC extends Bank
{
public int getBalance()
{
return 200;
}
}
public class Main
{
public static void main(String[] args)
{
BankA bankA = new BankA();
BankB bankB = new BankB();
BankC bankC = new BankC();
System.out.println("Deposited Balance is = $" + bankA.getBalance());
System.out.println("Deposited Balance is = $" + bankB.getBalance());
System.out.println("Deposited Balance is = $" + bankC.getBalance());
}
}