loading
main.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
using System;

class MainClass {
  public static void Main (string[] args) {
    Bank b;

    b = new SBI();

    Console.WriteLine("SBI Rate of Interest: " + b.getRateOfInterest());

    b = new ICICI();

    Console.WriteLine("ICICI Rate of Interest: " + b.getRateOfInterest());

    b = new AXIS();

    Console.WriteLine("AXIS Rate of Interest: " + b.getRateOfInterest());
  }
}

class Bank
{
  public virtual float getRateOfInterest()
  {
    return 0;
  }
}

class SBI : Bank
{
  public override float getRateOfInterest()
  {
    return 8.7f;
  }
}

class ICICI : Bank
{
  public override float getRateOfInterest()
  {
    return 7.3f;
  }
}

class AXIS : Bank
{
  public override float getRateOfInterest()
  {
    return 9.7f;
  }
}