Banking Problem
hi to all,
Please read the following ques. first.
assume that a bank maintains 2 kinds of accounts for
customers one called as
savings accounts & other as current account.
the savings account provides simple interest &
withdraw facilities but no check book facilities.
the current account provides check book facilities but
no interest.
current account holders should also maintain a minimum
balance and if the minimum balance falls below this
level a service charge is to be imposed.
create a class account that stores customers name,
account no & type of account
from this class derive the classes current acc &
savings acc. to make them more
specific to their environments. include necessary
member functions in order to achieve following tasks:
1. accept the deposit from the customer and compute
the balance
2. display the balance
3. compute and deposit the interest
4. permit the withdrawl and update the balance
5. check the minimun balance, impose penalty if
necessary &update the balance
-->>DO NOT USE CONSTRUCTORS AND USE MEMBER FUNCTIONS
TO INITIALIZE THE CLASS MEMBERS
(NOTE: #MAKE AN EXTRA FIELD DATE (INCLUDE DOS.H TO
ACCESS DATE STRUCTURE)
#MAKE THIS PROGRAM BY USING LINK LIST )
customers one called as
savings accounts & other as current account.
the savings account provides simple interest &
withdraw facilities but no check book facilities.
the current account provides check book facilities but
no interest.
current account holders should also maintain a minimum
balance and if the minimum balance falls below this
level a service charge is to be imposed.
create a class account that stores customers name,
account no & type of account
from this class derive the classes current acc &
savings acc. to make them more
specific to their environments. include necessary
member functions in order to achieve following tasks:
1. accept the deposit from the customer and compute
the balance
2. display the balance
3. compute and deposit the interest
4. permit the withdrawl and update the balance
5. check the minimun balance, impose penalty if
necessary &update the balance
-->>DO NOT USE CONSTRUCTORS AND USE MEMBER FUNCTIONS
TO INITIALIZE THE CLASS MEMBERS
(NOTE: #MAKE AN EXTRA FIELD DATE (INCLUDE DOS.H TO
ACCESS DATE STRUCTURE)
#MAKE THIS PROGRAM BY USING LINK LIST )
The problem i am facing is that when i have created two derived class as directed, i have to create two linklist to each derived class. So at the time of modifing, depositing or any other operation, i have to search both the linklist, which will be very time consuming & if no such account exist, it would be the worst of the worst case. Then i think another solution, i make another derived class by taking (saving & current class) early derived class as base class & create a single linklist. Now, the problem in that is, when my account is saving type, my current class in totally untouched(wasted) & vice-versa.
I want to make a single linklist by merging two linklist. Would anyone suggest me the solution. The program should be Menu Driven.
Thank You
0 Comments:
Post a Comment
<< Home