0
2.3kviews
Draw Class diagram

a) Assume that a bank maintains two kinds of accounts for customers, one called as savings account and the other as current account. The saving account provides compound interest and withdrawal facilities but no cheque book facility. The current account provides cheque book facility but no interest. Current account holders should also maintain a minimum balance and if the balance falls below this level, a service charge is imposed.

Class account stores customer name, account number and the type of account.

Include member functions:-

  • Accept deposit from a customer and update the balance
  • Display the balance
  • Compute and deposit interest
  • Permit withdrawal and update balance
  • Check for minimum balance, impose penalty and update the balance

    Draw Class diagram for above scenario.

b) For above problem statement, implement class account, current account and saving account.

Mumbai University > Information Technology > Sem 3 > Object Oriented Programming Methodology

Marks: 8M

Year: Dec 2013

1 Answer
0
25views

a)

enter image description here

b)

class Account
{
    String cust_name;
    int acc_no;
    double balance;
    String type_of_account 
    public void withdraw()
    {
    }
    public void deposit()
    {
    }
    public void display()
    {
    }
    public void updateBal()
    {
    }
}
class Current extends Account
{
    double servicecharge;
    String chequebook;

    public void issueCheque()
    {
    }
    public void checkBal()
    {
    }
    public void imposePenalty()
    {
    }
}
class Saving extends Account
{
    double interest;
    public void computeInterest()
    {
    }
    public void depositInterest()
    {
    }   
}
Please log in to add an answer.