Skip to content

Python OOP project demonstrating polymorphism using multiple payment methods.

Notifications You must be signed in to change notification settings

Dhruv-Cmds/Payment-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Author

Dhruv

πŸ’³ Payment System (Polymorphism in Python)

A beginner-friendly Python project that demonstrates polymorphism in Object-Oriented Programming by implementing multiple payment methods with a shared interface.


πŸ“– Description

The Payment System models real-world payment methods using a common Payment base class.
Different payment types such as Cash, Card, and UPI implement the same pay() method but behave differently at runtime.

This project clearly shows how polymorphism allows the same method call to produce different outcomes depending on the object type.


🧠 OOP Concepts Used

  • Polymorphism
  • Method overriding
  • Base and derived classes
  • Runtime method dispatch

✨ Features

  • Unified payment interface
  • Multiple payment methods (Cash, Card, UPI)
  • Clean and extendable design
  • Easy to add new payment types

πŸ›  Tech Stack

  • Language: Python 3
  • Programming Paradigm: Object-Oriented Programming (OOP)

πŸš€ How to Run

python payment_system.py