Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Create-Bank-Account-class

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.

Features

  • Class Variables: 1.accountID: A string representing the unique identifier for the account. 2.balance: A double representing the current account balance.
  • Constructors:
  1. 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.
  1. displayAccountInfo(): Displays the account ID and current balance with proper formatting.

Output

output

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages