[go: up one dir, main page]

0% found this document useful (0 votes)
7 views1 page

pgm

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views1 page

pgm

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

1) All the banks operating in India are controlled by RBI. RBI has set a well defined guideline (e.g.

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 JAVA program to implement bank functionality in the above scenario and demonstrate the dynamic
polymorphism concept. 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.

Hint:
Class Customer
{
//Personal Details ...
// Few functions ...
}
Class Account
{
// Account Detail ...
// Few functions ...
}
Class RBI
{
Customer c; //hasA relationship
Account a; //hasA relationship
..
Public double GetInterestRate() { }
Public double GetWithdrawalLimit() { }
}
Class SBI: public RBI
{
//Use RBI functionality or define own functionality.
}
Class ICICI: public RBI
{
//Use RBI functionality or define own functionality.
}

You might also like