Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Banking System Simulation

Overview

This project is an object-oriented banking system written in C++. It simulates several types of bank accounts with different rules for deposits, withdrawals, monthly fees, and interest calculations.

The project demonstrates the use of inheritance, polymorphism, abstract interfaces, virtual functions, and factory design patterns while modeling real-world banking operations.


Features

  • Create and manage multiple bank accounts
  • Deposit money into any account
  • Withdraw funds from savings accounts
  • Write checks from checking accounts
  • Apply monthly maintenance fees
  • Calculate monthly interest
  • Support multiple account types through polymorphism
  • Store all accounts using a vector of AccountInterface*

Account Types

Regular Checking

  • $6 monthly maintenance fee
  • Allows check writing
  • $5 penalty for insufficient funds

Checking+

  • No monthly fee if balance remains at least $300
  • Monthly fee applied if balance drops below $300
  • Allows check writing

Checking++

  • No monthly fee while balance stays above $300
  • Earns annual interest of 0.5% when balance is at least $800
  • Interest is forfeited if balance falls below $800
  • Allows check writing

Regular Savings

  • Earns 1% annual interest
  • No monthly fee
  • Withdrawals allowed if balance remains nonnegative
  • $5 penalty for overdraft attempts

Savings+

  • Earns 1.25% annual interest
  • Interest decreases to 1% if balance drops below $1000
  • $5 penalty for overdraft attempts

CD Savings

  • Earns 2% annual interest
  • Intended 9-month maturity period
  • Early withdrawals forfeit earned interest

Object-Oriented Concepts Demonstrated

  • Abstract base classes
  • Interfaces
  • Inheritance
  • Polymorphism
  • Virtual functions
  • Method overriding
  • Encapsulation
  • Factory Pattern
  • Dynamic memory allocation
  • STL vectors

Project Structure

Account
│
├── Checking
│   ├── RegularChecking
│   ├── RegularPlusChecking
│   └── RegularPlusPlusChecking
│
└── Savings
    ├── RegularSavings
    ├── RegularPlusSavings
    └── CdSavings

Bank
Factory

Main files include:

  • Account.*
  • Checking.*
  • RegularChecking.*
  • RegularPlusChecking.*
  • RegularPlusPlusChecking.*
  • RegularPlusSavings.*
  • CdSavings.*
  • Bank.*
  • Factory.*
  • AccountInterface.h
  • BankInterface.h

Skills Demonstrated

  • C++
  • Classes and Objects
  • Inheritance
  • Polymorphism
  • Abstract Interfaces
  • Virtual Functions
  • STL Vector
  • Factory Design Pattern
  • Banking System Modeling
  • Object-Oriented Design

Current Status

This project serves as an educational banking simulation. Several functions remain partially implemented or contain placeholder logic, including:

  • Bank account management functions
  • Factory object creation
  • CD maturity tracking
  • Some savings account behavior

The existing code demonstrates the overall architecture and implementation of an extensible object-oriented banking system.


Example Banking Operations

  • Open an account
  • Deposit funds
  • Write checks
  • Withdraw savings
  • Advance the bank by one month
  • Apply fees and interest
  • Close eligible accounts

Future Improvements

  • Complete all unfinished methods
  • Add input validation
  • Improve interest precision using double
  • Add transaction history
  • Save/load accounts from files
  • Exception handling
  • Unit testing
  • Interactive command-line interface

Learning Objectives

This project was created to practice:

  • Object-oriented programming
  • Class hierarchies
  • Interface-based design
  • Dynamic polymorphism
  • Banking system simulation
  • Software architecture in C++

About

Final CS 142 - This project is an object-oriented banking system written in C++. It simulates several types of bank accounts with different rules for deposits, withdrawals, monthly fees, and interest calculations.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages