Hiya guys! Welcome to the Python OOP Programs repository, where you can create your own program or set of programs using Python Object-Oriented Programming (OOP).
Inside this repository, you'll find a collection of folders and a main.py
file. Each folder contains a Python program, ranging from simple to complex, all of which are connected to the main.py
. The main.py
program is currently set up to run locally in the terminal. Once executed, you will be welcomed and introduced to a list of programs contributed by various developers from around the world.
As a contributor, your goal is to create a program in your specific folder and connect it to the main.py
. If your contribution meets the criteria, I will add it to the main repository for others to see and use.
Though it might seem small, this repository is important. It's a platform where developers from anywhere can showcase their talents in OOP Python programming, expressing their creativity and skills. So, feel free to build, have fun, and make your mark!
Looking forward to seeing what you can do! 😊
If you'd like to contribute to the project, please follow these steps:
-
Fork the Repository
- Go to the repository URL on GitHub.
- Click the
Fork
button in the top-right corner to create a copy under your GitHub account.
-
Clone Your Forked Repository
- Open your terminal or command prompt.
- Clone your forked repository:
git clone https://github.com/YOUR_GITHUB_USERNAME/REPOSITORY_NAME.git
- Navigate to the repository directory:
cd REPOSITORY_NAME
-
Create a New Folder for Your Service
- Inside the repository, create a new folder for your service:
mkdir your_service
- Inside this folder, create a file named
your_service.py
.
- Inside the repository, create a new folder for your service:
-
Implement Your Service
- In
your_service.py
, implement your service as a class:class YourService: def __init__(self): # Initialization code here def run(self): # Code to run the service here
- Ensure that your class has a
run
method to simulate the service functionality.
- In
-
Add Your Service to
ServiceManager
- Open
main.py
in the repository. - Import your new service at the top:
from your_service.your_service import YourService
- Add your service to the
ServiceManager
class:class ServiceManager: def __init__(self): self.your_service = YourService() self.mira_bank = MiraBank() # Existing service def run(self): while True: print('Hello, welcome to Mi-Global Network. What service would you like to use?') print('1. MiraBank\n2. Your Service\n3. Exit') choice = input("Choose 1/2/3: ") if choice == "1": self.mira_bank.run() elif choice == "2": self.your_service.run() elif choice == "3": print("Thank you for choosing our services!") break else: continue
- Update the options in the
run
method to include your service.
- Open
-
Commit Your Changes
- Stage your changes:
git add .
- Commit with a meaningful message:
git commit -m "Added YourService to ServiceManager"
- Stage your changes:
-
Push Your Changes
- Push your changes to your forked repository:
git push origin main
- Push your changes to your forked repository:
-
Create a Pull Request
- Go to your forked repository on GitHub.
- Navigate to the
Pull Requests
tab and clickNew Pull Request
. - Ensure the base repository is the original repository, with the base branch as
main
. - Compare it with your fork's
main
branch. - Click
Create Pull Request
and provide a description of your changes.
- Follow the project’s coding standards and conventions.
- Test your service thoroughly before submitting a pull request.
- Submit a pull request only if your service is fully functional and integrates well with the existing services.
Thank you for contributing to the project!
This project is licensed under the MIT License - see the LICENSE file for details.