Practical File Programs Sem-04 BCA KUK
Practical File Programs Sem-04 BCA KUK
Practical File Programs Sem-04 BCA KUK
1. Write a program to convert Dollar type to Rupees type, where Dollar is a class having the dollar as an instance
variable and Rupees is a class having rupees as an instance variable using the casting operator function.
2. Write a program to convert Dollar type to Rupees type, where Dollar is a class having the dollar as an instance
variable and Rupees is a class having rupees as an instance variable using the constructor function.
3. Assume that a bank maintains two kinds of accounts for customers, one called a savings account and the other as
a current account. Both accounts provide deposit and withdrawal facilities. Maximum withdrawal at a time in
case of a saving account is not more than 10,000 Rs. and in the current account, it is 50,000 Rs. The account
holders should also maintain a minimum balance (5,000 Rs. in the case of a savings account and 10,000 Rs. in
the case of a current account) and if the balance falls below this level, a service charge is imposed. The service
charge in the case of the saving account is 500 Rs. but in the case of the current account, it is 1000 Rs.
Create a class account that stores customer name, account number, balance and type of account. From this device
the classes cur_acct and sav_acct to make them more specific to their requirements. Include necessary member
functions in order to achieve the following tasks:
(a) Accept deposit from a customer and update the balance.
(b) Display the balance.
(c) Permit withdrawal and update the balance.
(d) Check for the minimum balance, impose penalty, necessary, and update the balance.