Connecting Tech Pros Worldwide Forums | Help | Site Map

Banking problem,i want dis prog. anyhow

Ritchie's Avatar
Newbie
 
Join Date: Nov 2006
Location: India
Posts: 9
#1: Nov 15 '06
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

Banfa's Avatar
AdministratorVoR
 
Join Date: Feb 2006
Location: South West UK
Posts: 6,179
#2: Nov 15 '06

re: Banking problem,i want dis prog. anyhow


Unfortunately it is impossible to have a class without constructors.

So what is the actual intention behind the DO NOT USE CONSTRUCTORS directive?
Ritchie's Avatar
Newbie
 
Join Date: Nov 2006
Location: India
Posts: 9
#3: Nov 15 '06

re: Banking problem,i want dis prog. anyhow


Quote:

Originally Posted by Banfa

Unfortunately it is impossible to have a class without constructors.

So what is the actual intention behind the DO NOT USE CONSTRUCTORS directive?


yup u got it right,can u help me out??
msquared's Avatar
Administrator
 
Join Date: Aug 2006
Location: Dublin, Ireland
Posts: 10,885
#4: Nov 15 '06

re: Banking problem,i want dis prog. anyhow


Quote:

Originally Posted by Ritchie

yup u got it right,can u help me out??

Please don't send PM's to experts on this. Anyone with C++/C knowledge will see your message in this forum.
Lives Here
 
Join Date: Sep 2006
Posts: 12,070
#5: Nov 15 '06

re: Banking problem,i want dis prog. anyhow


Quote:

Originally Posted by Ritchie

yup u got it right,can u help me out??

I think the directive

-->>DO NOT USE CONSTRUCTORS AND USE MEMBER FUNCTIONS
TO INITIALIZE THE CLASS MEMBERS

is vague.
Reply