A simple Java application for managing stadium reservations. The system allows users to reserve stadiums, view available stadiums, and manage reservations through an admin interface. Data is stored in plain text files (stades.txt
, reservations.txt
, and admins.txt
).
- Users can view all available stadiums from
stades.txt
. - Reserve a stadium by entering the required details:
- Stadium Name
- Reservation Date and Time
- Team Name
- Bank Transaction Number
- Reservations are stored in
reservations.txt
. - The stadium's availability status in
stades.txt
is updated tounavailable
.
- Displays all stadiums marked as
disponible
instades.txt
.
Admin users can log in to access advanced management features:
- Cancel Reservation: Cancel a reservation and mark the stadium as
disponible
. - Add Stadium: Add new stadiums to
stades.txt
. - Edit Stadium: Modify details of existing stadiums.
- Delete Stadium: Remove a stadium from
stades.txt
.
- Exit the application.
Stores stadium information in the format:
StadiumName:Location:Availability
Example:
Stade1:Algiers:disponible
Stade2:Oran:unavailable
Stores reservation details in the format:
StadiumName,FirstName,LastName,Email,TeamName,Date,Hour,BankTransactionNumber
Example:
Stade1,John,Doe,[email protected],TeamA,2025-01-15,15:00,12345678
Stores admin credentials in the format:
Username,Password
Example:
admin,admin123
-
Run the Program
- Compile and run the
ReservationDesStades
class.
- Compile and run the
-
Main Menu Options
- Choose from:
- Reserve a Stadium
- View Available Stadiums
- Admin Login
- Exit
- Choose from:
-
Admin Login
- Log in using credentials from
admins.txt
. - Access options to manage reservations and stadiums.
- Log in using credentials from
-
Text File Data
- Ensure
stades.txt
,reservations.txt
, andadmins.txt
exist in the working directory.
- Ensure
-
Reserve a Stadium
- View available stadiums.
- Reserve a stadium with required details.
- Verify
reservations.txt
andstades.txt
are updated.
-
Cancel a Reservation
- Log in as admin.
- Cancel the reservation by entering the stadium and team name.
- Verify the reservation is removed from
reservations.txt
and markeddisponible
instades.txt
.
-
Add, Edit, or Delete a Stadium
- Use admin options to modify stadium data in
stades.txt
.
- Use admin options to modify stadium data in
- Java Development Kit (JDK)
- Text files:
stades.txt
,reservations.txt
,admins.txt
- Fork this repository.
- Create a new branch:
git checkout -b feature-branch
. - Make changes and commit:
git commit -m 'Add new feature'
. - Push to the branch:
git push origin feature-branch
. - Submit a pull request.
This project is licensed under the MIT License.
You can now find all the project details and resources in the GitHub repository: https://github.com/hachim112/gestion-des-stades