DevJourney · code I wrote while learning

Smart Bank System

2 items

README.md

  1. Class: Account Private members:

int accNo

string accHolder

float balance

Static member:

int totalAccounts — tracks number of accounts created

  1. Constructors: Default Constructor

Parameterized Constructor to set values of accNo, accHolder, balance

Copy Constructor

  1. Destructor: Should display: "Account {accNo} closed."

  2. Member Functions: void deposit(float amt)

void withdraw(float amt)

void showDetails()

static void showTotalAccounts()

  1. Friend Function: void showBalance(const Account &a) — should access private balance

  2. Friend Class: A class LoanManager that can access private members of Account

Function: checkLoanEligibility(Account &a): Eligible if balance > ₹5000

  1. Inheritance: Class PremiumAccount inherits Account

Extra function: void premiumBenefits()

  1. Polymorphism: Use virtual function void welcomeMessage() in base class.

Override it in PremiumAccount

  1. Use of this Pointer in setter methods.

  2. Message Passing: Use functions to invoke behavior on objects like acc.deposit(1000);

  3. Pass by Reference function to update multiple accounts at once.