Skip to content

[CODE]:Encapsulation: Bank Account Management #156

@patil-rushikesh

Description

@patil-rushikesh

Problem Description:
Create a Bank Account Management System where you can perform actions such as creating an account, depositing money, withdrawing money, and viewing the balance. Use encapsulation to protect account details.

Location:
https://github.com/patil-rushikesh/cpp_programs/tree/main/Examples

Attributes:
accountNumber (int) – Unique account number.
accountHolder (string) – Name of the account holder.
balance (float) – Balance in the account.
Methods:
deposit(float amount) – Add a certain amount to the balance.
withdraw(float amount) – Deduct a certain amount from the balance.
getBalance() – Display the current balance.

The program should be menu-driven, allowing the user to:

  1. Create a new account.
  2. Deposit money into the account.
  3. Withdraw money from the account.
  4. Check account balance.
  5. Exit the program.

Requirements for the Issue:

  1. Implement the BankAccount class with encapsulated attributes and methods.
  2. Provide getter and setter methods to access private attributes (like balance).
  3. Ensure that withdrawal does not exceed the current balance.
  4. Create a menu-driven interface for the user to interact with the account.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions