Hello guys, I started this project but cant seem to finish it. You guys are my last hope, any help would be GREATLY APPRECIATED.These are the requirements, it seems I am mixed up.


The owners of Body Language Fitness Centre require an information system that can manage and maintain their business operation to facilitate their clients. Body Language offers a variety of different services: Tae-kwon-do, personal training (members) or just regular services (members).

The system should allow members to sign in everyday and accept their payments. There is a yearly membership fee of $500.00 and a monthly usage fee of $3500.00. The client system should store information on its clients such as personal info (name, address and contact number), height, weight, age, and BMI (Body Mass Index) to be calculated by the system), personal trainer (if they have one), date joined, fees owing. Information on each personal trainer is also kept, their name, address, certification level, and cost per hour for training. Only Tae-kwon-do is offered to both members and non-members: members pay only $1500 monthly and non-members $2500. Classes for Tae-kwon-do are as follows: Monday, Wednesday, Friday and Saturdays only for 1 hour, where children (12 and under) attend classes at 5 - 6pm on Mon and Wed and adults (12 and over) attend at 7 – 8 pm. Fridays are children only at 4:30 pm and Saturdays are adults only starting at 7 p.m.

The following are to be considered:
(i) Only authorized personnel of Body Language Fitness Centre can use the system. Implement minimum security by allowing access to the system only upon verification of a username and password. After three unsuccessful attempts, the system should lock out the user
(ii) Provide a menu which allows for the functions described below to be carried out upon successful entry into the system. Unless the user chooses to exit the menu, it should always appear on the screen after each option is executed. The options to be presented should include: Sign In - (New Member/Old Member), Trainers, Print receipt, Display Reports, Member Notification, Information etc.
(iii) Tae-Kwon-Do classes cannot accommodate more than 20 persons.
(iv) Members should be able to sign-in/sign-out on a daily basis showing time entered the gym and the time exited the gym.
(v) Issue a receipt upon paying monthly gym fees
(vi) Generate a Income Report that shows
a) the number of members
b) total membership fees
c) total monthly gym fees
d) total fees from non-members

The following is also needed:
(1) A Member Notification report that displays the information for all members who has not visited the gym in over a month or has been attending the gym and their fees are not updated for that month; display names, account#, contact number and contact address.
(2) Membership status report which shows the member’s name, contact details, date started, weight at start, BMI at start, current date, weight at current date, current BMI, any trainer’s name (if applicable), last sign-in date and amounts owing;
(3) A trainer’s report that shows the trainer’s name, number of members under their training, and the name of each member.
(4) Tae-Kwon-Do Report showing the name of the Master, total number of adults registered and their names, total number of children registered and their names, total income generated for that service per month.

#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include <dos.h>
#include <string.h>

#define amt 10



  struct member
{
		 char memberusername[30];
       char memberpassword[30];
       char memberFName[30];
       char memberLName[30];
       char memberGender[6];
       char memberTrainer[20];
       int  memberId;
       int  memberPhoneNumber;

};

struct trainer
{
       char trainerName[30];
       char trainerLevel[6];
       char trainerAddress[50];
       int trainerCost;
       int trainerPhoneNumber;

};
    /*
 	struct username
{
		char user_name[30];
};

	struct password
{
	char pass[30];
}; */
int trainer_menu();
void addTrainer(struct trainer *);
void listTrainer(struct trainer *);
void findTrainer(struct trainer *,char[]);
int menu ();
void saveFile(struct Trainer*);
int menu();//function prototype

void information_menu(void);
void about(void);
void information_option(void);
void schedule(void);

//void trainer_login(void);
void login(void);
void SignIn(void);
void main_menu(void);
void member_login(void);

int member_menu();
void addMember(struct member *);
void listMember(struct member *);
void findMember(struct member *,char[], char[]);

int menu1 ();
void saveFile(struct member*);
int menu1();//function prototype

void main ()
{
	SignIn();
	//main_menu();


 }

void SignIn(void)
{
	int decision;
		printf("\n\t\t\t****SIGN-IN****\n");
		printf("\n\t\t\t1.Member\n\n");
		printf("\t\t\t2.Non-Member\n");
      printf("My Decision is: ");
		scanf("&d", &decision);

   if(decision = 1)
	{
		login();
   }
   else if(decision = 2)
	{
	menu1();
   }

}

void main_menu(void)
{
 	int option;

   while (option!=7)
   {
   	system("cls");
   printf("\tBODY LANGUAGE FITNESS CENTRE");


   printf("\n1.Sign-In");
   //printf("\n2.MEMBER LOGIN");
   printf("\n2.Trainers");
   printf("\n4.Member Notification");
   printf("\n5.Print Receipt");
   printf("\n6.Display Report");
   printf("\n\nOPTION: ");
   scanf("%d", &option);
   system("cls");


   switch (option)
   	{
    /*  case 1: SignIn();
      		  break;
      case 2: Trainers();
      		  break;
      case 3: Member_noti();
      		  break;
      case 4: Receipt();
      		  break;
      case 5: Reports();
      		  break; */
   	case 1: member_menu();
      		  break;
      //case 2: trainer_login();
      		  //break;
      case 3: information_menu();
      		  break;
      //case 4:member_noti();
      	 //	  break;
  //	case 5:
   	}


   }
}




int member_menu()

{
      //login();
      struct member memberList[5];
      //struct username user_name[10];
      struct member pass[10];
    int option;
	option = menu1();
	char searchFName[20];
   char searchLName[20];
	while(option!=5)
	{

		if(option==1)
		{
			addMember(memberList);

		}//endif
		else if(option==2)
		{
			listMember(memberList);

		}//end else

      else if(option==3)
		{
			findMember(memberList , searchFName, searchLName);

		}//end if


      else if(option==4)
      {
      	main_menu();
      }//end else




		option=menu1 ();

	}//end while

	system ("Pause");
	return 0;

}//end

int menu1()

{

    printf("\n\n\t\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD");
        printf("\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD");
        printf("\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD");
        printf("\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD");
        printf("\t\t\t\t\t Welcome to Body Language Fitness   ");
                printf("\t\t\t\t\t\t\t*****Non-Member MENU*****                                        ");
        printf("\n\t                                                            ");
        printf("\n\n            1:Register                               ");
        printf("\n\n            2:List Clients                               ");
        //printf("\n\n            2:Information                               ");
        //printf("\n\n            3:Schedule                               ");
        printf("\n\n            3:Find Client                                ");
        printf("\n\n            4:Main Menu                                          ");
        printf("\n\n	    5:...Exit                                            ");
        printf("\n\t                                                ");
        printf("\n\t                                                ");
        printf("\n\n\t\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD");
        printf("\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD");
        printf("\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD");
        printf("\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD");
        printf("\n\nPlease select a catagory (^_^): ");



    int choice;


     scanf("%d",&choice);

     while(choice<1||choice>5)
       {
          printf("invalid input\n");
          printf("error re-enter\n");
          scanf("%d",&choice);
       }//end while

       return choice;
  }//end menu


void addMember(struct member *memberList)
{
		FILE *memberFile;
      FILE *passwordFile;
      FILE *usernameFile;
      char username, password;
     int i;

     for(i = 0;i < 1;i++)
     {
     		system("cls"); // Clears screen
         printf("\nEnter Desired Username: ");
         scanf("%s",&username);

         printf("\nEnter Desired password: ");
         scanf("%s",&password);

         printf("\nEnter Member's First Name: ");
         scanf("%s",&memberList[i].memberFName);

         printf("\nEnter Member's Last Name: ");
         scanf("%s",&memberList[i].memberLName);

         printf("\nEnter client's Gender: ");
         scanf("%s",&memberList[i].memberGender);

         printf("\nEnter client's Trainer: ");
         scanf("%s",&memberList[i].memberTrainer);

         printf("\nEnter client's Id: ");
         scanf("%d",&memberList[i].memberId);

         printf("\nEnter client's PhoneNumber: ");
         scanf("%d",&memberList[i].memberPhoneNumber);


			memberFile = fopen("clients.txt","w");
         usernameFile = fopen("username.txt", "w");
         passwordFile = fopen("password.txt", "w");


			for(i = 0; i < amt;i++)
		{

		fwrite(&memberList[i],sizeof(struct member),1,memberFile);
      fwrite(&username,sizeof(struct member), 1, usernameFile);
      fwrite(&password,sizeof(struct member), 1, passwordFile);
	}//end for

	fclose(memberFile);
   fclose(usernameFile);
   fclose(passwordFile);

         system("cls");


     }//end for
}//end addclient

void listMember(struct member *memberList)
{
		login();
		 char memberFName[30];
       char memberLName[30];
       char memberGender[6];
       char memberTrainer[20];
       int  memberId;
       int  memberPhoneNumber;

     int i;
     char FileName[30] = "clients.txt";
     FILE *clientFile;
     //login();

     clientFile = fopen(FileName, "r");

     if( clientFile == NULL )
   {
	   printf("\n\nError opening file %s!!!\n\n", FileName);
      system("pause");
	   main_menu();;
   }

   if( fscanf( clientFile, "%s", "clients.txt") !=7)// memberFName, memberLName, memberGender, memberTrainer, &memberId, &memberPhoneNumber) != 7 )
   {
      //puts("%s", "clients.txt");
	   puts("Error reading from file!!!");
      system("pause");
      system("cls");
	   main_menu();
   }

   printf("%s %s\n %s\n %s\n %d\n %d", memberFName, memberLName, memberGender, memberTrainer, &memberId, &memberPhoneNumber);
   puts("Client Recovered Succesfully!");

   getch();

     //for (i = 0;i < 10;i++)
    // {

        /* printf("\nmember's First Name is: %s",memberList[i].memberFName);
         printf("\nmember's Last Name is: %s",memberList[i].memberLName);
         printf("\nmember's Gender is: %s",memberList[i].memberGender);
         printf("\nmember's Trainer is: %s",memberList[i].memberTrainer);
         printf("\nmember's ID is: %d",memberList[i].memberId);
         printf("\nmember's PhoneNumber is: %d",&memberList[i].memberPhoneNumber);*/

     //}//end for

}//end listclient

void findMember(struct member *memberList, char memberFName[], char memberLName[])
{
     system("cls");
     int i,size;
	 size=1;
     char found = 'f';

     for(i = 0;i < size;i++)
     {
           if(strcmp(memberList[i].memberFName,memberLName)==0)
           	  //(strcmp(memberList[i].memberLName,memberLName)==0
              {

                found = 't';

                //print client info
         printf("\nclient's First Name is: %s",memberList[i].memberFName);
         printf("\nclient's Last Name is: %s",memberList[i].memberLName);
         printf("\nclient's Gender is: %s",memberList[i].memberGender);
         printf("\nclient's Trainer is: %s",memberList[i].memberTrainer);
         printf("\nclient's ID is: %d",&memberList[i].memberId);
         printf("\nclient's PhoneNumber is: %d",&memberList[i].memberPhoneNumber);

         system("pause");

           }//end if

     }//end for


     if(found == 'f')

	printf("Sorry Client was not found\n");
       getch();
       system("cls");


}//end findClient

void saveFile(struct member *memberList)
{

	FILE *memberFile;
	int i;

	memberFile = fopen("clients.txt","w");

	for(i = 0; i < amt;i++)
	{

		fwrite(&memberList[i],sizeof(struct member),1,memberFile);

	}//end for

	fclose(memberFile);


}//end viewFile

void viewFile()
{

	FILE *memberFile;
	struct member newMember;

	memberFile = fopen("clients.txt","r");

	if(memberFile == NULL)
	{

		printf("Sorry could not open file\n");
	}
	else
	{

		while(fread(&newMember,sizeof(struct member),1,memberFile) != 0)
		{

			printf("Client Full Name is: %s %s\n",newMember.memberFName, newMember.memberLName);

		}//end while

		system("pause");

	}//end else


}//end viewFile




void login(void)
{
   char username[40];
	char password2[5];
   int count = 0;

	printf("Enter username: \n");
	scanf("%s", &username);
	printf("Enter password: ");
	scanf("%s", &password2);

  // if(password2 !=0)
   //{
     //	putchar('*');
   //}
	//scanf("%s", &password2);

   	if

   	( (strcmp(password2,"12345")==0) && (strcmp(username, "fitfiddler")==0)||
		(strcmp(password2,"67890")==0) && (strcmp(username, "fitnbuff")==0)||
   	(strcmp(password2,"23456")==0) && (strcmp(username, "protones")==0)||
   	(strcmp(password2,"34567")==0) && (strcmp(username, "slimntrim")==0)||
   	(strcmp(password2,"45678")==0) && (strcmp(username, "fitfiddle")==0) )
   {
   system("cls");
	printf("\n\n\t\t\t****Welcome  To Members Area****");
   menu1();
   system("pause");
   system("cls");
   }
else
   {
	printf("ERROR INCORRECT USERNAME OR PASSWORD");
   login();
  }
if(count==3 && password2 != "12345" || 67890 ||23456 || 34567 || 45678)
	{
	printf("\nPROGRAM WILL CLOSE IN 3 tries...\n\n");

   login();
    system ("cls");

    }
else
    {
     system ("cls");
     main_menu();
     system ("cls");




}
}





void information_menu(void)
{
	system("cls");
	printf("\n\t\tInformation");
   printf("\n1) About us");
   printf("\n2) Schedule");
   printf("\n3) Back to main menu");
   printf("\n\nChoice: ");
   information_option();
}

void information_option(void)
{
	int option;

	scanf("%d", &option);

   switch(option)
   {
   		case 1: about();
      		 	 break;

      	case 2: schedule();
					 break;

      	case 3: //mainmenu();
      		  	printf("No menu yet");
      		  	break;

   		default: printf("\n Invalid Option");
	}
}

void about(void)
{
 printf("\t\t\t   ABOUT US");
 printf("\n\n     Welcome to the Body Language Fitness Centre ");
 printf("\n\n 		On joining Gym Liguanea you are assigned an instructor on duty who will set up a ");

 printf("\n\n\n   fitness programme suited for your personal goals and needs. The instructor shows you how to use the equipment properly ");
 printf("\n\n     as well as your programme for 2 weeks. You are then checked on 4 weeks after the inital 2 weeks and weighed, measured ");
 printf("\n\n  	and your programme re-assesed.");
 printf("\n\n  ,");
 printf("\n\n  ");
 printf("\n\n  .");

 printf("\n\n\n    ");
 printf("\n\n  ");
 printf("\n  Our motto is “Bringing results to Life”.");
 getch();
 information_menu();
}

void schedule(void)
{
	printf("Tae kwan do Days for classes:");

	printf("Monday_Wednesday_friday_saturday");
	printf("1 hr for each of these day");


	printf("Days for children (12 and under):");

	printf("   Time");

	printf("Mon - Weds (5-6pm)");
	printf("Fri (4:30-5:30)");


	printf("Days for adults (12 and over):");

	printf("    Time");

	printf("mon -weds(7-8pm)");
	printf("saturdays(7-8pm)");

	system ("pause");
}


void Bmi (void)
{
	float bmi, weight, height;
	int age;

	printf("Enter weight");
	scanf("%d",&weight);


	printf("Enter age");
	scanf("%d",&age);

	printf("Enter height");
	scanf("%d",&height);


}

>>There is a yearly membership fee of $500.00 and a monthly usage fee of $3500.00.

I would attend a different fitness club. Gold Gym only charges about $35.00/month. And the last time I checked the YMCA was $45.00/month. Why would I want to spend $3,500.00/month for that crappy health club? Do I get free drugs or sex too?

commented: Mega LOL +4
commented: aha :) +7

LOL, I agree but thats what they ask for.

wait wait, let me get this right.

you just posted your homework program requirements and dumped a shitton of code, and said "Urgent" and "Please help me finish this"

yeah.... I don't think so.

see, the way it works around here is you need to formulate a specific question about a specific problem that you're having.

I don't know wehre you got this code, if you wrote it, or a classmate, or if it was provided as a shell by your instructor, or a combination of those... but you really need to get a handle on what you're doing, back up, and start approaching this one functional requirement at a time.

come back when you have a coherent question, and you can get an answer.

Thanks for your reply but it's not like that "finish this". I just wanted some views but I understand what you are saying, again... thanks.

okay fair enough. i had a mistaken impression of your opening sentence, after becoming overwhelmed by the sheer magnitude of your copy-and-paste.

if you post an answerable question, i'll do my best to answer it.


.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.