Futsal Plus: Bubble Sort Algorithm Use
Futsal Plus: Bubble Sort Algorithm Use
(BUBBLE SORT)
2017
FUTSAL PLUS IN USING SORTING ALGORITHM (BUBBLE SORT)
MAY 2017
DECLARATION
I hereby declare that this report is based on my original work except for quotations
and citations, which have been duly acknowledged. I also declare that it has not been
previously or concurrently submitted for any other degree at Universiti Sultan Zainal
Abidin or other institutions.
________________________________
Name : ..................................................
Date : ..................................................
i
CONFIRMATION
________________________________
Name : ..................................................
Date : ..................................................
ii
DEDICATION
iii
ABSTRACT
Malaysians love sports even though day or night especially Futsal sport.
Hence, there is major problem that do not allow people play it which are the price of
the futsal courts and the availability of the courts at the certain time. So, the major
problem to find the best futsal courts based on facilities and time management of
customer. Besides, FP also comparing the price of the futsal courts at certain town.
Furthermore, in this system it will list all the futsal courts at the certain places such as
Johor town.
Hence, it will save the costs and time for the customer to play it. We know that
most of the customer are students from secondary school, university students and
young futsal player. Futsal Plus (FP) also provide suggestion to the customer to
decide their futsal courts if there is one of the list is fully booked. In order to develop
this web based system the Sorting Algorithm namely Bubble Sort Algorithm apply in
this system. The reasons to use Bubble Sort because this sorting is simplest sorting
algorithm after the insertion sort. This technique is encourage developer to display the
search result based on the certain criteria for example the price of the futsal courts. In
conclusion, this system will encourage customer to play futsal with the best price and
iv
ABSTRAK
Rakyat Malaysia kini aktf dalam bidang sukan walaupun hari atau malam
sukan terutamanya Futsal. Oleh itu, terdapat masalah utama yang tidak
membenarkan orang bermain yang harga mahkamah futsal dan ketersediaan
mahkamah pada masa yang tertentu. Jadi, masalah utama untuk mencari gelanggang
futsal terbaik berdasarkan kemudahan dan pengurusan masa pelanggan. Selain itu,
FP juga membandingkan harga mahkamah futsal di bandar tertentu. Tambahan pula,
dalam sistem ini, ia akan menyenaraikan semua gelanggang futsal di tempat-tempat
tertentu seperti bandar Johor.
Oleh itu, ia akan menjimatkan kos dan masa untuk pelanggan untuk
bermain. Kita tahu bahawa kebanyakan pelanggan adalah terdiri daripada pelajar
sekolah menengah, pelajar universiti dan pemain muda futsal. Futsal Plus (FP) juga
menyediakan cadangan kepada pelanggan untuk membuat keputusan gelanggang
futsal mereka jika terdapat salah satu dari senarai tersebut akan ditempah
sepenuhnya. Dalam usaha untuk membangunkan sistem ini berasaskan web Sorting
Algoritma iaitu Bubble Jenis Algoritma dikenakan dalam sistem ini. Sebab-sebab
untuk menggunakan Bubble Jenis kerana pengasingan ini adalah yang paling mudah
menyusun algoritma selepas jenis pemasukan. Teknik ini menggalakkan pemaju untuk
memaparkan hasil carian berdasarkan kriteria tertentu contohnya harga mahkamah
futsal. Kesimpulannya, sistem ini akan menggalakkan pelanggan untuk bermain futsal
dengan harga yang terbaik dan memiliki mahkamah dengan masa yang betul.
v
CONTENTS
PAGE
DECLARATION i
CONFIRMATION ii
DEDICATION iii
ABSTRACT iv
ABSTRAK v
CONTENTS vi
LIST OF TABLES vii
LIST OF FIGURES xvi
LIST OF ABBREVIATIONS xv
CHAPTER I INTRODUCTION
1.1 Introduction 1
1.2 Problem statement 4
1.3 Objectives 5
1.4 Scopes 5
6
1.5 Justification / Significance
1.6 Report Structure 7
1.7 Conclusions
vi
3.1.2 Design 23
3.1.3 Development 24
3.1.4 Testing 25
3.2 Requirement Analysis 26
3.2.1 System 26
3.2.2 Input 27
3.2.3 Process 28
3.2.4 Output 29
3.3 System Design 30
3.3.1 Framework Design 31
3.3.2 Architecture Design 32
3.3.3 Process Model 33
3.3.4 Data Model 40
3.3.5 Algorithms 42
CHAPTER V CONCLUSION
4.1 Discussion 61
4.2 Limitation 62
4.3 Recommendations 63
4.4 Summary 64
REFERENCES 65
vii
LIST OF TABLES
viii
LIST OF FIGURES
ix
LIST OF ABBREVIATIONS / TERMS / SYMBOLS
CD Context Diagram
DFD Data Flow Diagram
ERD Entity Relationship Diagram
FYP Final year project
GA Genetic algorithm
HCI Human computer interface
x
LIST OF APPENDICES
xi
CHAPTER I
INTRODUCTION
1.1 BACKGROUND
encourage people to find the best futsal courts to play the game. Customer find their
This system enables manager to list all their facilities, the best price and the
offer for their futsal courts. Hence, manager can register their futsal courts as easy as
ABC to ensure customer can find out the futsal courts places.
Furthermore, the customer can find the futsal courts based on the prices given
by the futsal court’s manager. Most of the customer of the futsal court’s are students.
Hence, this system are enable customer to give ratings based on the services given by
1
1.2 PROBLEM STATEMENT
Firstly, the problems that encourage researcher to change the manual system is
because customer are hard to find the best futsal courts. Furthermore, the customer
cannot have the fix prices to rent the futsal courts. A part from that, customer needs to
ask each every futsal courts to get the information about the futsal courts. Secondly,
customer should call or personal message to futsal’s court owner to ask for the prices.
It is very not efficient for because customer should ask more than one futsal courts
owner based on the places. Sometimes, the prices that given is not relevant towards
their facilities and courts condition. Thirdly, from researcher observation at most of
the futsal courts management System in Malaysia, there are still using the manual
system which are using printed poster such a waste and sometimes do not effectives to
1.3 OBJECTIVES
There are three main objectives for this proposal. These objectives are derived to
To develop and design a system that help futsal lover find their Futsal Courts
based on price and facilities provided.
To apply Sorting Algorithm (Bubble Sort) for customer find their Futsal Courts.
To test the Sorting Algorithm (Bubble Sort) to list up the most popular Futsal
Courts.
2
1.4 SYSTEM SCOPES
Futsal Plus will be used by three main actors which are coordinator, futsal courts
I. Coordinator Scope :
Register services.
Manage futsal courts information.
Provide facilities and prices.
Manage booking from customers
Generate Reports.
3
1.5 LIMITATION OF WORKS
This system will only use for customer recommended and review.
The system requires internet connection or else accessing to the system does
not take place.
This system only suitable for 18 years old and above.
Customer can find the futsal courts with affordable prices and highest rating
to low rating.
Customer can have better information about the futsal courts such as
location and phone number.
Customer can gives rating based on futsal courts facilities, conduciveness,
prices and services.
Futsal courts manager can list all the promotion prices and facilities
available.
Customer can booking the courts based on the futsal courts chosen.
1.7 CONCLUSIONS
Based on the this chapter, it discuss about the introduction of the systems
proposed and several problems that encourage the researcher to improves the previous
systems. Besides, this chapter also discuss about the user that will use this system such
as coordinator, futsal courts manager and customer. Furthermore, the researcher set
4
CHAPTER 2
LITERATURE REVIEW
2.1 INTRODUCTION
In this chapter will discuss about the idea from the previous research or
article related to the sorting algorithm which is bubble sort algorithm. This is
crucial because it can tell us whether the implement method is suitable for the
method is feasible.
5
2.2 COMPARISON BASED ON THE PREVIOUS TECHNIQUES
Currently in Malaysia, most of the futsal courts is found by using poster and
about the person in charge for booking process and the hardest part is the person in
charge always changed. Hence, customers need a proper system to choose the futsal
courts and the managements of futsal courts need a proper system to interact with their
customers.
6
2.3 ANALYSIS JOURNAL AND PROCEEDING PAPER
Algorithm and Futsal Management System. From all the below stated about algorithm
system.
Modem written by Wan Ainur Afeeqa (June 2012) is the online booking system for
Chendering Futsal Courts. Its enable customers to book the courts and customer is
given confirmation by receiving the message from the system. It is quite similar
Secondly, the research of Bubble Sort written by Harish Rohil and Manisha
(2014) is tell about the full description of Bubble Sort Algorithm. The bubble sort
algorithm is tell about the cycle through a list, analysing a pairs of elements from left
to right.
Lastly, the research about a new sort algorithm which is self-indexed sort.
There are compared about 4 based-sorting algorithms. Although the bubble sort is the
slowest to compare between the three others but it is relevant to apply in this system.
7
2.4 RESEARCH ON DIFFERENT METHOD OF FUTSAL MANAGEMENT
SYSTEM
Wan Ainur Futsal Courts Global It is divided into the two Customer is
Afeeqa Binti Management System for main services which are given
customer.
Mohd Futsal Court Global FCMS using GSM is Both admin and
Rushaimi Bin SMS System for target to people who love futsal employee
(April 2010) System of Communica Kompleks Sukan Bandar login to use the
the system.
8
2.5 RESEARCH ON SORTING ALGORITHM (BUBBLE SORT)
Problem
Trivedi Select Bubble algorithm uses selection Sort which can be used
Prathmesh Trivedi. Sort Algorithm concept of and bubble Algorithm in all application
9
Harish Rohil, Run-Time Introduces a Compared Run-Time Saves the time for
Manisha Bubble Sort- new algorithm with Bubble traversing the list
data.
algorithm. s of bubble .
sort
algorithm,
the
complexity.
10
2.6 CONCLUSIONS
Based on the this chapter, it discuss about the literature review of the systems
proposed. Besides, there are several systems that has been proposed by the local
researcher in order to ease customer to get information about the futsal courts.
Furthermore, several research paper mentioned about the advantages of using bubble
sort algorithm in order to sort the value. It helps the researcher to understand the
11
CHAPTER 3
METHODOLOGY
3.1 INTRODUCTION
the right method and good plan. Therefore, after considering pros
incremental life cycle model was chosen. The detail about this model
12
3.2 SYSTEM DEVELOPMENT METHODOLOGY
Plus in Using Sorting Algorithm (Bubble Sort) will use iterative and incremental
software development. They are long lasting and widely use in large development
efforts.
13
3.3 SYSTEM DEVELOPMENT LIFE CYCLE (SDLC)
The phase starts with brainstorming the ideas of current problems and
The title has been confirmed including the details of the project. Then
discussed with the supervisor. Feasibility study has been done to get
This phase is to study and analyse the existing system. Other than that
review the existing system, interview with the supervisor also helped
are collected.
14
3.3.3 ANALYSIS AND DESIGN PHASE
codes based on the previous phase. The system will build using PHP
language and MySQL as the database platform. User interfaces are also
i. Testing Phase
also will be tested. User interface will be checked to ensure they are
15
3.3.6 DEPLOYMENT PHASE
In the last phase, Futsal Plus in Using Sorting Algorithm (Bubble Sort) will be
software and hardware tools are required. Without complete list of requirements, the
Windows 10 Pro
o Operating system used to house all the applications and
tools.
Microsoft Office 2010
o Tools of writing and editinf documents.
Xampp Server
o Server used to process data together with management of
data using phpMyAdmin.
Edraw
o Tools to draw diagram.
Google Chrome
o Web browser used to display the data to end user.
Dropbox
o Cloud storage for backup data files.
Sublime Text 3 & Notepad++
o Text editor for coding.
16
3.4.2 HARDWARE REQUIREMENT
3.5 ALGORITHM
elements from left to right, or beginning to end. If the leftmost element in the
pair is less than the rightmost element, the pair will remain in that order. If
the rightmost element is less than the leftmost element, then the two elements
will be switched. This cycle repeats from beginning to end until a pass in
In this case, bubble sort algorithm is used as get the highest rating and
the cheapest prices for the futsal courts. Before further towards the system,
the customer need to find the futsal courts based on the prices. After they play
at the certain futsal courts then they can rate the futsal courts. From that rated
other customer can find the futsal courts based on the rated from the previous
customer.
17
3.5.2 PSEUDOCODE OF BUBBLE SORT ALGORITM
Begin
BubbleSort(list) for all elements of list
if list[i] > list[i+1]
swap(list[i], list[i+1])
end if
end for
return list
End BubbleSort
We take an unsorted array for our example. Bubble sort takes Ο(n2 ) time so
we're keeping it short and precise.
Bubble sort starts with very first two elements, comparing them to check
which one is greater.
We find that 27 is smaller than 33 and these two values must be swapped.
18
Next we compare 33 and 35. We find that both are in already sorted positions.
We know then that 10 is smaller 35. Hence they are not sorted.
We swap these values. We find that we have reached the end of the array.
After one iteration, the array should look like this −
To be precise, we are now showing how an array should look like after each
iteration. After the second iteration, it should look like this −
Notice that after each iteration, at least one value moves at the end.
And when there's no swap required, bubble sorts learns that an array is
completely sorted.
19
3.5.4 FEATURES OF SORTING ALGORITHM (BUBBLE SORT)
The bubble sort basically just runs through an array and swaps adjacent
elements if they are out of order until the list is sorted. It’s most common usage is
after insertion sort which just runs through an array and pulls out the lowest item
and appends it to the results list and has a few other interesting properties :
Time-inefficient
o It runs in O(n2)O(n2) time versus the O(nlog(n))O(nlog(n))
of most efficient sorting algorithms
Memory-efficient
o It requires only O(1)O(1) space, the only extra memory it
requires is that of the temporary value created when
swapping adjacent elements.
Stable
o The order of identical items does not change while the arrays
is being sorted.
Outside of educational material, its pretty much only used to be made fun
of. There's almost no reason why anyone would want to use Bubble Sort for any
practical purpose (unless there is some weird limitation that every element is only
allowed to move one space per move). However, it is worth noting that in the
extremely unlikely case that you have only have a few bytes of free memory left,
an O(n2) O(n2) sorting algorithm is pretty much the best you can get (Insertion
20
3.6 SYSTEM DESIGN & MODELING
3.6.1 INTRODUCTION
In this part, we will look into conceptual model that defines the structure,
behavior and details of the system. In modeling process, the system model will be
decision making. It provides a semantic view that developer can easily understand
3.6.2 FRAMEWORK
The figure 2 shows the interaction between the user and the system in
Futsal Plus in Using Sorting Algorithm (Bubble Sort). The manager will gives
information towards the system in order to gives information about the futsal
courts to the customer. Furthermore, customer also can do online booking after
21
3.6.3 CONTEXT DIAGRAM
Context diagram in figure 3.3 show the data flow for the Futsal Plus in
Using Sorting Algorithm (Bubble Sort) System. There are three main actors which
is Manager and Customer. The context diagram shows the overall function of the
system. All the user need to be login as a basic step of using this system.
22
3.6.4 DATA FLOW DIAGRAM (DFD) LEVEL 0
Data flow diagram (DFD) is a graphical representation of the flow of the data
in the system. The DFD show the data flow from an external source or internal source
Through the DFD shown above, figure 3.5 show the whole system flow. There
are four process in this system which are Manage User, Manage Manager, Manage
Futsal Courts, Manage Customer, Manage Booking and Manage Reports. Every
process of the system will interact with their related table or data store in the databases
23
Process 1.0 : Manage User
In this module, customer needs to enter intended information to search
about futsal courts by attribute such as city, country, and futsal court’s name.
In using Bubble Sort Algorithm, customer easy to find the characteristic what
customer finds.
about futsal courts manager by attribute such as city, country, and futsal
on prices and star ratings. Customer can do online booking to book their
futsal courts. Manager are the one who can approve the booking or not.
24
Process 6.0 : Manage Reports
In this process, each of entity will gives their own priority to look for
profiles by add, updating and delete their details. All changes will
25
[Link] MANAGE MANAGER
manager profiles by add, updating and delete their details. All changes
will be updated in the database and display them in the user interface.
26
[Link] MANAGE FUTSAL COURTS
their futsal courts by add, updating and delete their details. All changes
will be updated in the database and display them in the user interface.
27
[Link] MANAGE CUSTOMER
customer profiles by add, updating and delete their details. All changes
will be updated in the database and display them in the user interface.
28
[Link] MANAGE BOOKING
by add, updating and delete their details. The managers will do the
approval process if there are available courts. All changes will be updated
29
[Link] MANAGE REPORTS
In the process of Manage Reports, all entities will request from the
system to get their own reports and the system will display their reports.
30
3.6.6 ENTITY RELATIONSHIP DIAGRAM (ERD)
The figure 11 shows that Entity Relationship Diagram (ERD) for Futsal
Plus in Using Sorting Algorithm (Bubble Sort). The diagram shows that it
contains three entities which are Coordinator, Manager and Customer. In this
diagram, for example Coordinator will manage the Manager. Besides Manager
will manage Futsal Courts and Customer do bookings at the Futsal Courts.
31
MANAGER
COORDINATOR
FUTSAL COURTS
CUSTOMER
BOOKING
32
3.7 CONCLUSIONS
complete this system. This system are using System Development Life Cycle
development phase. Besides, this chapter also discuss more about the
33
REFERENCES
Wan Ainur Afeeqa Binti Wan Azmi (June 2017).” Futsal Management System.
Mohd Rushaimi Bin Idrus (April 2010).” Futsal Courts SMS Booking System of
Kompleks Belia & Sukan Kemaman. GSM Mode Web Base System “.
34