Answer to Question #182494 in C++ for ZainMohal

Question #182494

 

1.   All the banks operating in India are controlled by RBI. RBI has set a well defined guideline (e.g. minimum interest rate, minimum balance allowed, maximum withdrawal limit etc) which all banks must follow. For example, suppose RBI has set minimum interest rate applicable to a saving bank account to be 4% annually; however, banks are free to use 4% interest rate or to set any rates above it.

 

 

Write a program to implement bank functionality in the above scenario. Note: Create few classes namely Customer, Account, RBI (Base Class) and few derived classes (SBI, ICICI, PNB etc). Assume and implement required member variables and functions in each class.


1
Expert's answer
2021-04-17T12:58:18-0400
#include <iostream>

using namespace std;


// class BB hold the baisc guidelines for bank rules

class BB
{
public:

   float minimumInterestRate = 4;
   double mnimumBalanceAllowed = 500;
   double maximumWithdrawl = 50000;
};

int main()
{
   BB obj;
   float rate;
   double withdrawl;
   double balance;

   cout << "Enter interest rate \n";

   cin >> rate;
   if (obj.minimumInterestRate <= rate)
   {
       cout << "Eligible under BB rules\n";
   }
   else
   {
       cout << "Not elligible under BB rules\n";
   }
   cout << "Enter withdrawl \n";
   cin >> withdrawl;
   if (obj.maximumWithdrawl >= withdrawl)
   {
       cout << "Eligible under BB rules\n";
   }
   else
   {
       cout << "Not elligible under BB rules\n";
   }

   cout << "Enter minimum balance\n";
   cin >> balance;

   if (obj.mnimumBalanceAllowed <= balance)
   {
       cout << "Eligible under BB rules\n";
   }
   else
   {
       cout << "Not elligible under BB rules\n";
   }

   cin.get();
   cin.get();


   return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS