The Dog Adoption Portal is a console-based C++ application designed to connect dog sellers and buyers on a single platform.
It allows sellers to list dogs for adoption and buyers to browse, search, and adopt them easily — all with persistent data storage using text files.
This project demonstrates core OOP concepts such as:
- Encapsulation
- File handling
- Class interaction
- Data persistence
- Menu-driven logic
- Register as Buyer or Seller
- Secure login authentication
- Stores user details persistently in
users.txt - Fields stored: username, password, role, mobile number
- Add new dog listings (name, breed, age, price)
- Auto-generates a unique Dog ID
- View all listed dogs
- All data saved in
dogs.txt
- View all listed dogs with seller details
- Search dogs by:
- Breed
- Price range
- Adopt (buy) a dog using its ID
- Adoption details stored in
transactions.txt
Data is saved across sessions using:
users.txt→ Registered usersdogs.txt→ Dogs listed for adoptiontransactions.txt→ Adoption history
Classes used:
- User
- Dog
- Portal
Concepts demonstrated:
- Structured modular design (inheritance-free)
- Encapsulation
- File handling (
fstream) - STL:
vector,map,stringstream
- Language: C++
- Concepts Used:
- Classes & Objects
- File Handling (Read/Write)
- STL (vector, map, string)
- Encapsulation & Data Management
-
User Registration/Login
- Creates or verifies user from
users.txt.
- Creates or verifies user from
-
Role-based Menu
- Seller: Add or view dogs
- Buyer: View, search, or adopt dogs
-
Data Persistence
- All actions automatically recorded into respective text files
- Understanding file handling in real-world applications
- Applying OOP principles
- Building menu-driven console applications
- Managing persistent data without databases
- Add an admin dashboard for moderation
- Encrypt passwords for security
- Replace file storage with a MySQL/SQLite database
- Build a GUI using Qt or Python backend
Chirag Gupta