abstractclass1


Submit solution

Points: 10
Time limit: 5.0s
Memory limit: 12M

Author:
Problem type
Allowed languages
C++

Task

Write a class Bank with data members as float loan_amt, float years, float interest_rate.

Following are the member functions of class Bank.

1) A parametrized constructor for Bank class which initializes loan_amt and years values.

2) A member function void simpleinterest() for calculating and displaying the simple interest using the following formula

simpleinterest= loan_amt*interest_rate/100*years;

3) A pure virtual function void setRateOfInterest().

Create a class SBI which inherits from class Bank contains a parameterized constructor through which a base class parameterized constructor is called to initialize loan_amt and years values. Also it contains another member function void setRateOfInterest() which sets the interest rate as 8.7.

Create a class ICIC which inherits from class Bank contains a parameterized constructor through which a base class parameterized constructor is called to initialize loan_amt and years values. Also it contains another member function void setRateOfInterest() which sets the interest rate as 6.9.

Create a class Axis which inherits from class Bank contains a parameterized constructor through which a base class parameterized constructor is called to initialize loan_amt and years values. Also it contains another member function void setRateOfInterest() which sets the interest rate as 10.7.

Main program also given in the template.

Input

No user Input

Output

A single line which contains 3 float values separated by single space.

ex: 261.021 207.017 321.026


Comments


  • 1
    Pranesh77  commented on Nov. 24, 2021, 1:42 p.m.

    There is no main function given in Template!!.