cashmemo-cpp

🧾 Cash Memo System in C++

A console-based C++ application designed to generate cash memos or receipts. This project demonstrates core object-oriented programming (OOP) principles, including class design, encapsulation, and operator overloading. It is structured professionally with separate header and implementation files and is built using a Makefile.


✨ Features


πŸ“ Project Structure

The project is organized into include and src directories to separate class declarations from their implementations.

cashmemo-cpp/
β”œβ”€β”€ include/
β”‚   β”œβ”€β”€ Address.h
β”‚   β”œβ”€β”€ CashMemo.h
β”‚   β”œβ”€β”€ CellNumber.h
β”‚   β”œβ”€β”€ Date.h
β”‚   β”œβ”€β”€ Item.h
β”‚   β”œβ”€β”€ Name.h
β”‚   β”œβ”€β”€ ReceiptNo.h
β”‚   └── ShopDetails.h
β”‚
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ Address.cpp
β”‚   β”œβ”€β”€ cashmemo_app.cpp  (Main application entry point)
β”‚   β”œβ”€β”€ CashMemo.cpp
β”‚   β”œβ”€β”€ CellNumber.cpp
β”‚   β”œβ”€β”€ Date.cpp
β”‚   β”œβ”€β”€ Item.cpp
β”‚   β”œβ”€β”€ Name.cpp
β”‚   β”œβ”€β”€ ReceiptNo.cpp
β”‚   └── ShopDetails.cpp
β”‚
β”œβ”€β”€ build/                 (Created automatically by the Makefile)
β”œβ”€β”€ Makefile               (To compile and run the project)
β”œβ”€β”€ .gitignore             (Specifies files for Git to ignore)
└── README.md              (This file)

βš™οΈ How to Build and Run

This project uses a Makefile to automate the build process. Ensure you have g++ and make installed on your system.

Open a terminal in the project’s root directory and use the following commands:

1. To compile the project: This command compiles all source files and links them into an executable located in build/bin/.

make

2. To compile and run the project:

make run

3. To clean the build directory: This command removes all compiled files.

make clean

πŸ–₯️ Sample Usage

Here is an example of the program’s input and output flow:

$ make run
                  SHOP DETAILS

Enter Shop First Name : Super
Enter Shop Last Name : Electronics
Enter Shop Description : Quality Gadgets
Shop's Owner Name
Enter first name: Zohaib
Enter middle name: (or '-' to skip)-
Enter last name: Khan
CellInfo 
Enter Country Code : 92
Enter Number : 3001234567
Address Info
Street No : 123
City : Islamabad
Country : Pakistan
Enter date (DD MM YYYY): 22 6 2024
                  CUSTOMER'S INFO
Enter first name: Ali
Enter middle name: (or '-' to skip)-
Enter last name: Ahmed

Enter 2 Items:
Enter particular: Wireless Mouse
Enter quantity: 1
Enter rate: 1500
Enter particular: Keyboard
Enter quantity: 1
Enter rate: 2500
------------------------------------------------------
              Super Electronics
------------------------------------------------------
         Quality Gadgets
           Cell : +92 3001234567

No: 1001                                  Date: 22-6-2024
Name: Ali Ahmed

------------------------------------------------------
     Qty         Particulars      Rate      Amount
------------------------------------------------------
       1      Wireless Mouse   1500.00     1500.00
       1          Keyboard   2500.00     2500.00
------------------------------------------------------
                                         Total: 4000.00
------------------------------------------------------
Signature: Zohaib Khan
Address : Street # 123, Islamabad, Pakistan


🧩 Core Classes


πŸ‘¨β€πŸ’» Author

Developed By Zohaib Khan πŸŽ“

πŸ“„ License

MIT License Β© 2025 Zohaib Khan.