GitHunt
YO

yogeshkumarsaini/Pet-Adoption-System

Java console-based Pet Adoption System with admin login, adoption approval workflow, vaccination reminders, and file handling.

๐Ÿพ Pet Adoption System

A console-based Pet Adoption Management System built in Java that helps manage pets available for adoption, track adoption requests, and maintain adoption history.
The system demonstrates Object-Oriented Programming (OOP), File Handling, Sorting, and Admin Authentication concepts.


๐Ÿš€ Features

  • ๐Ÿ” Admin Login System

  • ๐Ÿถ Add New Pets

  • ๐Ÿ“‹ View Available Pets

  • ๐Ÿ” Search Pets by Type (Dog / Cat)

  • ๐Ÿ“Š Sort Pets by Age

  • ๐Ÿผ Pet Age Category

    • Baby
    • Adult
    • Senior
  • ๐Ÿ’‰ Vaccination Reminder System

  • โค๏ธ Adoption Request System

  • โœ… Admin Adoption Approval

  • ๐Ÿงพ Adoption History File

  • ๐Ÿ’พ Save Pet Data using File Handling


๐Ÿ› ๏ธ Technologies Used

  • Java
  • Object-Oriented Programming (OOP)
  • ArrayList (Java Collections)
  • File Handling
  • Comparator Sorting
  • Console-based UI

๐Ÿ“‚ Project Structure

PetAdoptionSystem
โ”‚
โ”œโ”€โ”€ Main.java
โ”œโ”€โ”€ Admin.java
โ”œโ”€โ”€ Pet.java
โ”œโ”€โ”€ PetManager.java
โ”œโ”€โ”€ AdoptionRequest.java
โ”œโ”€โ”€ AdoptionApprovalManager.java
โ”œโ”€โ”€ FileManager.java
โ”œโ”€โ”€ pets.txt
โ””โ”€โ”€ adoption_history.txt

โš™๏ธ How It Works

1๏ธโƒฃ Admin Login

The system starts with an admin login for security.

Username: admin
Password: 1234

2๏ธโƒฃ Add Pet

Admin can add pets with:

  • Name
  • Type (Dog/Cat)
  • Age
  • Vaccination status

Pet ID is generated automatically.


3๏ธโƒฃ Search and Sort Pets

Users can:

  • Search pets by type
  • Sort pets by age

4๏ธโƒฃ Adoption Request

Users submit an adoption request with:

  • Pet ID
  • Adopter Name

The request goes to the admin approval queue.


5๏ธโƒฃ Adoption Approval

Admin can:

  • View adoption requests
  • Approve requests

Approved pets are marked as adopted.


6๏ธโƒฃ Adoption History

Approved adoptions are stored in:

adoption_history.txt

Example:

PetID:101 Name:Rocky AdoptedBy:Amit
PetID:105 Name:Tom AdoptedBy:Rahul

๐Ÿ’‰ Vaccination Reminder

The system shows pets with:

  • none
  • pending

vaccination status.

Example:

Pets needing vaccination:

ID: 104 | Name: Bruno | Type: Dog | Vaccination: pending

๐Ÿผ Pet Age Categories

Pets are automatically categorized:

Age Category
0โ€“1 Baby
2โ€“5 Adult
6+ Senior

โ–ถ๏ธ How to Run

  1. Clone the repository
git clone https://github.com/yogeshkumarsaini/Pet-Adoption-System.git
  1. Open the project in IntelliJ / Eclipse / VS Code

  2. Compile and run:

javac *.java
java Main

๐Ÿ“Œ Learning Concepts

This project demonstrates:

  • Object-Oriented Programming
  • Encapsulation
  • Class Design
  • File Handling
  • Collections Framework
  • Sorting Algorithms
  • Console Menu Systems

โญ Future Improvements

  • Java Swing GUI Version
  • MySQL Database Integration
  • Online Pet Adoption Portal
  • Email Notification System
  • Multiple Admin Support
  • Pet Image Upload

๐Ÿ‘จโ€๐Ÿ’ป Author

Developed by Yogesh Kumar Saini

If you like this project, give it a โญ on GitHub!