This repository contains a Dart implementation of a BankAccount class. The BankAccount class is designed to handle basic bank account operations such as depositing, withdrawing, and displaying account information.
- Class Variables: 1.accountID: A string representing the unique identifier for the account. 2.balance: A double representing the current account balance.
- Constructors:
- Primary constructor to initialize both accountID and balance. 2.Named constructor (BankAccount.initial) to initialize accountID with the balance set to 0.
- Methods: 1.withdraw(double amount): Deducts the specified amount if it is positive and sufficient balance exists. 2.deposit(double amount): Adds the specified positive amount to the balance.
- displayAccountInfo(): Displays the account ID and current balance with proper formatting.
