Ad by Adsterra

Gym Management System in C++ with source code





In this tutorial, we'll demonstrate how to easily develop the Gym Management System Project in C++. Numerous computer languages may be used to create the gym management system, but for this project, we'll use C++ because that's what the students want.


What is Gym Management System in C/C++? 

The Gym Management System is a piece of software that indicates and manages all of the gym's data. Rather than writing information down in a notebook, it significantly simplifies the job of a fitness manager. In the past, the managers of the gyms collected statistics and the names of the clients who had acquired gym memberships in notebooks. Keeping track of every record was therefore quite challenging.

If a gym manager wanted to look up a certain gym record, that procedure took a lot of time. Therefore, programming languages were created to make this process easier, and the C++ language is one of them.


Features of Gym Management System in C/C++:

  • We have distinct logins for users and gym managers, sometimes known as admins, with the gym manager having a password-protected login.
  • In this project, the gym manager can create, edit, and assign gym memberships to specific users.
  • The user is free to leave the gym whenever they wish.
  • Users of the program have the option to alter their profiles.
  • The membership may only be deleted and edited by the admin.
  • When a subscription is purchased, a trainer is assigned automatically.
  • In this project, the idea of file management is used.

Modules for Gym Management System in C/C++:

  • Join Gym.
  • Edit User Profile.
  • Membership Creation
  • Display All Records
  • Search Particular Record
  • Edit Membership Details
  • Delete Membership
  • Quit Gym.

Working of Project: 

You may manually execute the complete project after extracting the zip file and getting an executable.exe file. After using the compiler to compile the project, this.exe file is also produced. Now that the project's operation has been well explained, we can observe how it works.


Display Screen:

The below screen will show up when you start the project from any compiler or when you just click on the executable.exe file, as demonstrated in the image.

`



The user and administrator menus have been made visible. If you are a gym manager or administrator, your selection will be 2, and if you are a user, your selection will be 1.


We'll now go into depth about each menu item.


1. User Menu:

The user will be able to access the application straight without any additional sign-in.

If the user selects option 1, the following screen will show:
 

 



1. Join Gym:

The new users who wish to join the gym may register themselves with the aid of this menu item. Following the user's initial selection of an option, the program will prompt them to submit the following information:

  • The user desired the new member number.
  • The new member's name.
  • Contact number.
  • Silver or Gold status.
  • Preferred time period.

After providing the aforementioned details, the user will be assigned a trainer, and the registration will be successful. The user will be able to access the application straight without any additional sign-in.

2. Quit Gym:

The user can leave the gym at any moment by selecting menu option 2 if their mind changes or if they choose to switch gyms. The software will prompt you to input the member number when you select menu option 2. The member will thereafter be removed from the software in a matter of seconds.

3. Edit Profile:

This program has a special feature that allows users to modify their profiles. The user should select menu option 3 if they wish to change their profile. The software will ask you for your membership number once you select menu option 3 so that it can get all of the information from the file. The user must then input all the details they wish to change. The profile will be successfully updated after providing all the necessary information.


2.  Admin Menu:

He or she will need to sign in using the login "admin" and password "learnprogramo" to use the admin menu's capabilities. Moreover, the password-changing option is also provided in the Admin menu. The password may only be changed by Admin.


The program will prompt you to input the right password as seen in the following image when the user selects option 2:




The program will display the error for the incorrect password if the password is incorrect. And if the password is accurate, the user will be able to access the admin menu and do the tasks listed there.

The following menu will be shown to the Gym Manager:




1. Create or Add a Member:

Selecting menu option 1 will allow the gym manager to add a membership for the new member. The program will prompt the administrator to enter information such as the member's membership number, name, contact information, level of membership (Gold or Silver), and preferred time slot when the user selects the first choice. Following completion of the information, the trainer will be assigned automatically, and the record will be successfully added.

2. Display records:

After choosing the second option, all the records will be presented if the gym management wishes to show all the records or the memberships. The display will include information like Member code, Name, Category, Membership Fee, Contact info, and Timings.

3. Search specific record:

This program has an outstanding function that allows you to search a specific record in a matter of seconds. The third option gives the gym manager the ability to look for a specific record if he so desires.


4. Edit member's details:

Every right to alter a member user's information belongs to the admin. By selecting this option, the gym manager will be allowed to change every record of an existing user if a mistake or an error is discovered in the member information.

5. Deleting a member:

There should be a way to revoke a membership if a particular user no longer needs it. Therefore, we've provided the function to delete the member record by selecting option 5. The program will prompt the administrator to enter the member ID number after choosing the fifth option so that it may search for the precise record to remove. 

After entering the correct member ID number, the record will be deleted successfully.   


How to Download the Gym Management System:

Click on the download button to get the Zip file of the Gym Management System Project.

You can also copy the source code of Gym Management System Project.

Download



//Learnprogramo - programming made simple
#include
#include
#include
#include
#include
#include
using namespace std;
class alogin
{
	string admin;
	public:
	int adlogin()
	{
		cout<<"enter the admin code"<>admin;
		if(admin=="admin")
		{	
			 int p=getadpassword();
			 if (p==1)
			 {
			 	cout<<"login succesful"<>pw;
	if(pw=="learnprogramo")
	{
		cout<<"WELCOME!!"<>k;
			switch(k)
			{
				case 1:strcpy(timings,"6AM-7AM");break;
				case 2:strcpy(timings,"7AM-8AM");break;
				case 3:strcpy(timings,"8AM-9AM");break;
				case 4:strcpy(timings,"4PM-5PM");break;
				case 5:strcpy(timings,"5PM-6PM");break;
				case 6:strcpy(timings,"6PM-7PM");break;
			}
}	
    	void create_mem()
    	{	int k,l,j;
    		cout<>member_number;
    		cout<>contact;
    		cout<<"1.gold class\n 2.silver class\n";
		cout<<"enter the choice\n";
		cin>>k;
		switch (k)
		{
			case 1:{strcpy(classs,"gold");
				fee=2500;
				cout<<"your monthly fee would be: "<>num;
    	fp.open("newdata2.dat",ios::in|ios::out);
    	while(fp.read((char*)&m1,sizeof(m1)) && found==false)
    	{
    		if(m1.getmem()==num)
    		{
    			m1.show_mem();
    			cout<<"\nPlease Enter The New details of the member: "<>num;
    	fp.open("newdata2.dat",ios::in|ios::out);
    	fstream fp2;
    	fp2.open("Temp2.dat",ios::out);
    	fp.seekg(0,ios::beg);
    	while(fp.read((char*)&m1,sizeof(m1)))
    	{
    		if(m1.getmem()!=num)
    		{
    			fp2.write((char*)&m1,sizeof(m1));
    		}
    	}
    	fp2.close();
    	fp.close();
    	remove("newdata2.dat");
    	rename("Temp2.dat","newdata2.dat");
    	cout<>option;
    	switch(option)
    	{
    		case 1: system("cls");
    				save_member();
    				break;
    				
    		case 2: show_all();
    				break;
    				
    		case 3:
    				int num;
   				system("cls");
    				cout<<"\n\n\tPlease Enter The member Number: ";
    				cin>>num;
    				display_record(num);
    				break;
    				
    		case 4: edit_member();
    			break;
    		
    		case 5: delete_member();
    		        break;
   				
    		case 6: system("cls");
    				break;
    		
    		default:fnmanage();
    		}
    	}
    }
void fitness()
{
	{cout<<"displaying fitness tips..."<>m;
	switch(m)
	{
		case 1:system("cls");
    				save_member();
    				break;
    		case 2:delete_member();
    		        break;
    		//case 3:fitness();
    		//	break;
    		case 3:edit_member();
    		       break;
	}
}
}
int main()
{
		int i,k;
		string name,code;
		cout<<"Gym Management System Project in C++"<>i;
			
					fnuser();
					}
			
		return 0;
}

Post a Comment

0 Comments