Final PF Report
Final PF Report
Submitted by:
Kashif Kazmi (Lead) (SP22-BSE-021)
Eman Basharat (SP22-BSE-011)
Wajahat Ali Tahir (SP22-BSE-051)
Dated: Course: CSC103 PF
January 10, 2023 Instructor: Mr. Rizwan Rashid
Project Report
TABLE OF
CONTENTS
Topics Pages
Introduction 1
Main features 2
Task Distribution 3
Login Page 3
Main Menu 4
Members 4
I. Details of Members 4
II. View All Members 5
III. Modify Members 5
IV. Add New Member 6
V. Delete Member 6
Trainers 7
I. View All trainers 7
II. Detail of trainers 8
III. Add trainer 8
IV. Modify trainer 9
V. Delete trainer 9
Machines 10
I. Detail of Machine 10
II. View All Machines 11
III. Add new Machine 11
IV. Delete Machine 12
Machine Booking 12
I. Book a Machine 13
II. Cancel Booking 15
III. Booking Details 15
IV. Morning Booking info 16
V. Evening Booking info 17
VI. Reset Reservations 17
GYM MANAGEMENT SYSTEM 1
Project Report
(GYM MANAGEMENT SYSTEM)
Introduction:
This project is presented by Eeman, Kashif and
Wajahat as their final semester project. It is a Gym
Management System with the following features:
I. Login (Default Username admin and
Password anything)
II. Main Menu
a. Members
b. Trainers
c. Machines
d. Booking of Machines
This is specifically designed for administrative use, where full authority rests in the hands
of the owner. We have created four text files (AdminInfo, Members, trainer, Machines).
Dealing with 2d-Arrays, loops, methods, exception and files. All the acceptance,
modification and deletion of data is occurring in 2d-Arrays. Program continuously updates
data stored in files for long-term storage after any changes. All of the data in the files will
be copied into 2D arrays for use by the application when it runs or starts. All the program
is mainly working in arrays and using files only to store the data permanently.
Main Features:
I. To access an application, a user must first
authenticate in to our system using their
username and password. The user is denied
access when a login attempt fails. They serve as
a security mechanism to guard against
unauthorized access to sensitive information.
II. Gym management system can be useful if you've
had trouble keeping track of members, trainers,
machines, and booking information. This
software is more engaging and practical to use
because it has tools for adding, viewing, searching, and deleting any entity record
or data.
III. This program can never be compromised in any way. The program is designed in
such a way that no input may cause it to misbehave and will totally handle
unwelcome input.
IV. The automatic generation of registration numbers is another characteristic that
attracts attention. Any entity will automatically receive a registration number from
the system, which will also check to make sure it hasn't already been used by
another party. If this is the case, the application won't stop until a unique
registration number is generated.
V. The best feature is that when the program receives a member's registration
number during a booking, it will first identify the purchased session by the member
(morning or evening) at gym, before offering any available machines with that
sessions' remaining bookings.
VI. With the help of some processing at the backend, the user will be able to see the
remaining available booking of all machines at the output screen. A machine that
is fully booked cannot take new reservations.
VII. Another feature of booking is that after a member has booked a machine once, the
program will prevent them from booking it again. The program will also limit a
member's ability to reserve more than 4 machines at once because we only allow
4 bookings per member.
VIII. The user can easily reset all reservations after a day or any session (morning or
evening) is over.
Task contribution:
Wajahat Members
Eeman Basharat Trainers
Kashif Kazmi Machines + Booking Reservations
Login page:
We print a header and request the user's login and password. If inputs are
incorrect, the system will repeatedly ask for the username or password (using a loop) until
the proper username and password are entered. In the event that the user enters a wrong
user name or password, the message "Enter correct username / password or enter "0" to
exit" will be printed. The option for the user to modify their username and password is
always available. Log out feature on main menu is also added which will exit the program
and the login page will again prompt to the user.
Main Menu:
The main menu is the next step after the login validation. Features include: Members,
Trainers, Machines, Machine Booking, Log Out, and Exit (To terminate the program).
Members:
The admin will be given access to the following features in members: Details of
members, View all members, Modify Member, Add new Member, Delete Member, and
Main menu.
Details of member:
By entering their registration number in the option, users can search for any member's
details, or the user can go back to main menu. Using for loop, the program will look for
the registration number in an array. Once the program has the required member's row,
it will display the information that is stored there. The system will display "Member not
found, Enter correct one or Enter "Y" to return" if the member cannot be found.
Modify Member:
Another feature which makes the program best and flexible for usage is that the user can
modify the details of members any time. User can modify the data of member by giving
the registration number of member. If the registration number matches, then he will be
allowed to make changes in that particular member’s data. User still has the option to go
back to the main menu.
Delete Member:
After receiving a registration number to delete a member, a program will begin reading
lines from the file. If a line begins with the desired registration number, it will be replaced
with null# to make it unreadable or empty for the program. Otherwise, lines will continue
to be stored in a temporary string variable called "data," and after 200 lines have been
read from the file, "data" will be written to a new file. Program will begin once desired
PROJECT REPORT PROGRAMMING FUNDAMENTALS
GYM MANAGEMENT SYSTEM 7
line is obtained "Found a member. Do you want to delete Y/N?” will also be shown. The
user will receive a "Member not found" message if the application cannot locate the
member.
Trainers:
In trainers following features will be given: View All Trainer, Trainer Details, Add
Trainer, Modify Trainer, Delete Trainer, and Main Menu.
Detail of Trainer:
User can get all the details of the trainer. Registration number of trainer is required for
this purpose. If the registration number of the trainer matches with the registration
number stored in the array at specific index, then the information about the trainer will
be displayed with their members list.
Add Trainer:
With "Add new trainer," an admin can hire a new trainer for members at any moment.
Program will search for the null space in file if the space is present then the trainer can be
added at that particular index. The system will automatically generate a registration
number for that trainer and check to see if it hasn't already been used by someone else.
If it has, the program will then generate a new registration number until a unique
registration number is generated. Then the program will prompt the user to enter the
details of trainer. "Sorry, there is No available Vacancy" will be displayed on the output
screen if all 20 trainers have already been hired by the gym or if there are no more
openings.
On the completion, a message will be displayed about the successful addition of trainer.
Modify Trainer:
In this gym management system, user is facilitated that he/she can modify the details of
trainer at any time. On the first go, a list of all the trainers will be displayed to the user.
Details of any trainer can be modified just with the entry of registration number. If the
registration number of the trainer matches, then the user will be able to make changes in
that particular trainer’s data.
Delete Trainer:
User has the access that he/she can delete the trainer. Registration number is just
required for this. All the data will be fetched from the file in the form of string if the
registration number matches then all the data stored at that particular index in string will
be made equal to null (removal of data). Then that file is deleted, and the new file will be
created with the same name and the updated data will be written in it. Then all the data
will be fetched from the file and will get stored in the trainer’s array.
Machines:
We designed the machine's 2d array as
Machine Data Morning Booking Evening Booking
Member Member
Serial
Name Weight Exercise Registration -- -- -- Registration -- -- --
Number
Number Number
Features of machine menu are as follows: Details of machine, View All Machines, Add
Machine, Delete Machine, and Main Menu.
Details of Machine:
By entering the serial number, the user can view the machine's details. Loops will be used
to check the serial number in the machine array. The user will get all the information
related to that machine if the serial number matches. The user has the choice to return
to the main menu.
Delete Machine:
User can delete the machine by its registration number. All the data from machine file
will be fetched. The registration number will be checked against the data from file if it
matches then the machine is found, and the user will be prompted to with the option to
delete the machine. All the data from file is going to be fetched in the string if the
registration number matches it will make it null and then it will delete the file. Then new
file will be generated with the same name in which all the updated data is written. After
writing the data then the array will be updated by the data from file.
Machine Booking:
There are the following submenus in the machine booking menu: Book a machine, Cancel
Booking, Booking Details, Morning time reservation, Evening time reservation, Reset
reservation, and Main Menu.
Book a Machine:
User can book a machine just with the registration number of member or can go back to
the main menu. For the facilitation, user has the access to view the list of members.
When the program gets a member's registration number, it initially recognizes the paid
session (morning or evening) at the gym before presenting any machines with that
session's remaining bookings.
The user will be able to see the remaining available booking of all machines at the output
screen with the aid of some processing at the backend.
After a member has booked a machine once, the program will prevent the member from
booking it again.
The program will also limit a member's ability to reserve more than 4 machines at once
because we only allow 4 bookings per member.
User has the option for more bookings of he/she selects “No” then it will be taken to the
booking page again.
After the user has finished the booking process, the program will update the machines
file for long-term storage right away with the help of the machines 2d array and loop.
Then the user can cancel the booking of machine by its serial number. If the serial number
matches with the data in machine array, then the booking array element will be made
equal to null and the array is updated, then all the data from array is written into the file
with the help of loops.
Booking Details:
User can view the booking details of any desired member for this the registration number
of member is required if the registration number of member is found in the machines
array (checking the registration No. in the machine array by traversing in the loop). If the
registration number is found then it will check the part where the morning and evening
reservations are placed.
First it will check in the indexes, if the member is found then it will display the name of
member with the machine name.
If no member of that added registration number is found, then it will display “No
Booking”.
Reset Reservation:
User can reset the reservations. Menu of reset reservations:
The loop will go through the machine array in the following order: Morning: index 4 to 7,
Evening: index 8 to 11, and Both: index 4 to 11. With each traversal, the data will be set
to null, and the new data will then be saved in the file (writing in file).
Thus, while looking for a blank space for new bookings, the program will consider null
because it has a blank, writeable space available.