You are on page 1of 113

COVID-19 Distance Safety

System
By

Lee Yi Yang

FACULTY OF COMPUTING AND


INFORMATION TECHNOLOGY

TUNKU ABDUL RAHMAN UNIVERSITY COLLEGE


KUALA LUMPUR

ACADEMIC YEAR
2020/21
COVID-19 Distance Safety System

By

Lee Yi Yang
Supervisor: Mr. Shoong Wai Kin

A project report submitted to the


Faculty of Computing and Information Technology
in partial fulfillment of the requirement for the
Bachelor of Information Technology (Honours)

Department of Information and Communication Technology


Faculty of Computing and Information Technology
Tunku Abdul Rahman University College
Kuala Lumpur

2020/21

Copyright by Tunku Abdul Rahman University College.


All rights reserved. No part of this project documentation may be reproduced,
stored in retrieval system, or transmitted in any form or by any means without
prior permission of Tunku Abdul Rahman University College.
COVID-19 Distance Safety System Declaration

Declaration
The project submitted herewith is a result of my own efforts in totality and in every aspect of
the project works. All information that has been obtained from other sources had been fully
acknowledged. I understand that any plagiarism, cheating or collusion or any sorts constitutes
a breach of TAR University College rules and regulations and would be subjected to
disciplinary actions.

Lee Yi Yang
__________________________

Lee Yi Yang

Bachelor of Information Technology (Honours) in Software Systems Development

ID: 19WMR09621

BACS3413 Project II ii
COVID-19 Distance Safety System Abstract

Abstract
In Malaysia, the current Covid-19 cases has reached 60 thousand and still keep rising
rapidly. Recently, the cases of Covid-19 cases have been found in shopping malls such
as 1Utama, Mid Valley Megamall, Melawati Mall, NU Sentral and so on (CodeBlue,
2020). Based on the online research, the most common reason is from the high
population of places and high-risk areas which easily cause infection (BRAUN Sharing
Expertise. 2020). The objective of the study is to find a way to ensure people keep their
social distance within a safe distance range by using mobile applications when walking
into shopping malls. The project involves developing an application for a shopping mall
that will help the mall owner and customer to speed up the SOP (standard operating
process) process which is declared by the Malaysia government. The application
consists of a staff and member version. Staff version will help in the check in process
and generate reports for future reference. Member versions will assist in detecting social
distance and doing reservations and checking in and out for the main entrance and store.
An interview will be conducted with the shopping mall owner to get their requirements.
Besides, android studio, visual studio and smartphone will be used for development.
Incremental models will be implemented to manage the process of this project. During
the testing process, white-box testing and system testing is carried out to test the
applications in order to ensure the applications bugs free. As a conclusion, the
applications are able to bring people into a safe environment and reduce new cases, yet
the application still requires network connection to communicate with the database.
Without the help of application, we are not able to control all the activity of shopping
mall customers.

BACS3413 Project II iii


COVID-19 Distance Safety System Acknowledgement

Acknowledgement
I would like to express my sincere gratitude to Mr. Shoong Wai Kin for the guidance
and various suggestion while develop COVID-19 Distance Safety System. Without the
guidance and suggestion from my supervisor, I believe I can’t come out many great
features inside this project. Thanks again for his time and effort to this project. It was a
great opportunity for me to learn new knowledge and skills that I never learn during my
whole university courses.

Furthermore, I would also like to thanks to my team member for provide me technical
support when I am facing challenges in the development phases. Without the helps from
my team members, this project would not be able complete on time. Thanks again to
my team members for helping me.

BACS3413 Project II iv
COVID-19 Distance Safety System Table of Content

Table of Contents
Declaration................................................................................................................................ii
Abstract ................................................................................................................................... iii
Acknowledgement ...................................................................................................................iv
Table of Contents ..................................................................................................................... v
1 Introduction ....................................................................................................................... 2
1.1 Objectives ............................................................................................................................. 3
1.2 Background ........................................................................................................................... 3
1.3 Advantages & Contributions ................................................................................................ 4
1.4 Project Plan ........................................................................................................................... 5
1.4.1 Mobile-Based .................................................................................................................................. 5
1.4.2 Web-Based ...................................................................................................................................... 9
1.5 Project Team and Organization ............................................................................................ 9
1.6 Chapter Summary and Evaluation ...................................................................................... 10
2 Literature Review ............................................................................................................ 12
2.1 Company Background ........................................................................................................ 12
2.2 Project Background............................................................................................................. 13
2.3 Literature Review ............................................................................................................... 14
2.3.1 Social Distancing .......................................................................................................................... 14
2.3.2 Bluetooth ...................................................................................................................................... 15
2.3.3 Advantage of Bluetooth ................................................................................................................ 16
2.3.4 Disadvantages of Bluetooth .......................................................................................................... 17
2.3.5 Calculate Distance with Bluetooth................................................................................................ 18
2.4 Feasibility Study ................................................................................................................. 19
2.4.1 Technical Feasibility ..................................................................................................................... 19
2.4.2 Operational Feasibility .................................................................................................................. 20
2.5 Chapter Summary and Evaluation ...................................................................................... 20
3 Methodology and Requirements Analysis..................................................................... 22
3.1 Methodology ....................................................................................................................... 22
3.1.1 Requirement Analysis ................................................................................................................... 22
3.1.2 Design ........................................................................................................................................... 23
3.1.3 Code .............................................................................................................................................. 23
3.1.4 Testing .......................................................................................................................................... 23
3.1.5 Deployment................................................................................................................................... 23
3.2 Requirement Gathering Techniques ................................................................................... 24
3.3 Requirement Analysis ......................................................................................................... 25
3.3.1 Project Scope ................................................................................................................................ 25
3.3.2 Development Environment ........................................................................................................... 27
3.4 Functional and Non-Functional Requirements ................................................................... 30
3.4.1 Functional Requirements .............................................................................................................. 30
3.4.2 Non-Functional Requirements ...................................................................................................... 30
3.5 Chapter Summary and Evaluation ...................................................................................... 31
4 System Design .................................................................................................................. 33
4.1 System Design .................................................................................................................... 33
4.1.1 Use Case Diagram ........................................................................................................................ 33
4.1.2 Activity Diagram .......................................................................................................................... 40
4.1.3 Sequence Diagram ........................................................................................................................ 45
4.2 UI Design ............................................................................................................................ 50
4.2.1 Mobile-Based UI .......................................................................................................................... 50

BACS3413 Project II v
COVID-19 Distance Safety System Table of Content

4.3 Data Design ........................................................................................................................ 56


4.3.1 Entity Relationship Diagram (ERD) ............................................................................................. 56
4.3.2 Class Diagram ............................................................................................................................... 57
4.3.3 Data Dictionary ............................................................................................................................. 58
4.4 Chapter Summary and Evaluation ...................................................................................... 64
5 Implementation and Testing .......................................................................................... 66
5.1 Implementation/ Coding ..................................................................................................... 66
5.1.1 Implementation ............................................................................................................................. 66
5.1.2 Coding .......................................................................................................................................... 67
5.2 Testing Strategies/ Approaches........................................................................................... 81
5.2.1 Unit Testing .................................................................................................................................. 81
5.2.2 White-Box Testing ........................................................................................................................ 81
5.2.3 System Testing.............................................................................................................................. 81
5.3 Test Plan ............................................................................................................................. 82
5.4 Chapter Summary and Evaluation ...................................................................................... 91
6 Discussions and Conclusion ............................................................................................ 93
6.1 Summary ............................................................................................................................. 93
6.2 Achievements...................................................................................................................... 94
6.3 Contributions ...................................................................................................................... 94
6.4 Limitations and Future Improvements ................................................................................ 94
6.5 Issues and Solutions ............................................................................................................ 95
References ............................................................................................................................... 96
Appendices .............................................................................................................................. 99

BACS3413 Project II vi
COVID-19 Distance Safety System Chapter 1

Chapter 1

Introduction

BACS3413 Project II 1
COVID-19 Distance Safety System Chapter 1

1 Introduction
COVID-19 Distance Safety System, literally that the system is tailor made to cope with
the COVID -19 issues that we are facing today. Out of few, one of the purposes that plays
an important role is to keep people in a safe social distance. The purpose of this project is
to solve the social distance problems during COVID-19 especially the public places, high
population density places and places that people must go frequently. For instance,
shopping centres like AEON, Tesco, Giant and so on (UNDP. 2020). The project will also
come up with the solution for the check-in procedure of the shopping centre. The system
will be mobile application-based and web-based. The staff version will help the staff in
the check-in and check-out procedure of the customer in the main entrance. If any
emergency cases occur like customers’ phone battery running out, staff can help them to
check out from the shop. For the application-based, users can use it to check in and out
from the store and track their past location and body temperature of the day. Besides,
application-based also able to notify the user to keep their distance with other people. To
do so, the application will calculate the accurate social distance from the Bluetooth RSSI
(Received Signal Strength Indication) that received from other devices. Furthermore, this
application also allows the user to view the number of people inside the shop that they
wanted to go. So, they may decide whether to continue waiting until their turn or continue
to another shop. Lastly, the web-based system is for the user who has not registered as a
member of the shopping centre. The only function of window-based is for user to check-
in and check-out from every shop that they hope to go.

BACS3413 Project II 2
COVID-19 Distance Safety System Chapter 1

1.1 Objectives
The main objective of this project is to reduce the coronavirus diseases (COVID-19)
cases in the world. This can assist the government in managing and alleviate the
COVID-19 outbreak. Thus, this system enables the user to monitor their health status
for every time they visit the shopping mall. This system will be set on the main entrance
counter to help the customers take their body temperature to achieve a 0 risks cases in
that area. Next objective is to reduce physical contact of the customers when they buy
daily appliances in the shopping mall. By doing so, the percentage of transmission able
to be reduced from the customer that has COVID-19 symptoms. For example,
coughing, sneezing and decompensation. Last but not least, provide locations of nearest
hospitals and clinics for the individuals who wish to screen for COVID-19 and test.
Although supplies of tests are increasing, it may still be difficult to find a place to get a
test. Get a test before so we will know for sure if we are diagnosed. In other words,
prevention is better than cure.

1.2 Background
Coronavirus diseases 2019 pandemic also known as COVID-19. It is a new type virus
that was previously not detected by scientists. It stresses every person in a country
facing an economic and political crisis lives in deep fear (The ASEAN Post. 2020).
COVID-19 cases in the world approximately 8.75 million and still increasing day-by-
day (Y.L.M., D., 2020). The most affected peoples’ places are shopping malls. Because
they have gone to fetch some fresh vegetables and daily appliances for a few days.
Current countermeasure for COVID-19 in shopping centres is that the owner will
prepare a logbook to record down all the customers’ details like name, phone number
and body temperature. Anyway, customers queue to record down their details on the
logbook may still occur virus transmission between the customers if the social distance
is not well controlled (at least 1 meter). However, even a long-term measure has been
taken but still some customers wanted to skip from the security inspection and sneak
into the shopping centre. Besides from the check-in procedure, a serious situation
happened in front of the shop which is a long queue of waiting their turn to visit the
shop. And some of the shops do not limit the number of customers who could walk into
the shop at the same time. If COVID-19 distance safety system could launch in

BACS3413 Project II 3
COVID-19 Distance Safety System Chapter 1

shopping centres, it might reduce the cases happening in the shopping centre and
customers also could be safe to shop.

1.3 Advantages & Contributions


The first competitive advantages for this project are lower the risk of the staff contact
with customers. This project will systemize the process of check-in and check-out of
customers which instead record their personal details and body temperature in a
logbook by sharing one pen. Besides that, it also speeds up the process of every
customer check-in and check-out from the shop by using applications built in QR code
scanner so they no need to queue and wait until its turn. Next competitive advantages
are providing a social distance restricting environment to the customers. By doing so,
this project able help to lower the rate of virus transmission distance between each
other. Thus, staff no need to monitor the customer's social distance all the time by
creating a peaceful environment. Last but not least, this project helps in giving a win-
win situation to shopping centers’ owners, customers, and government. In shopping
centers’ owners' side, they can continue their business as usual without being under
pressure. On the customers' side, they still can buy groceries every day without
surveillance by the staff. Lastly, the government will not face the complaint from
civilians that they are confronted with the resource shortage and lead to famine
situations.

BACS3413 Project II 4
COVID-19 Distance Safety System Chapter 1

1.4 Project Plan

Figure 1 .1: Overall system hierarchy of COVID-19 Distance Safety System

This system is specially designed for COVID-19 pandemic outbreak solution (Figure
1.1). This project consists of four different parts. Mobile application staff version will
be implemented in the main entrance of the shopping centre and mobile based will help
customers with shopping centre’s membership to check-in and out from the shopping
centre. Besides, there is a web-based version for the customer who does not download
the application for check-in and out purpose.

1.4.1 Mobile-Based
▪ Staff Version

Check-In and Out Module

This module allows staff to scan member’s QR code. Every time the staff scan
QR code, the system will check the customer social distance score. If the
member’s score is low than 20, the system will not allow the staff to allow
member pass through main entrance. For check-out, the staff will help the
member to check out if the member facing phone issue.

BACS3413 Project II 5
COVID-19 Distance Safety System Chapter 1

Number of People Limitations

This module allows staff to change the number of customers they can visit at
the same time. After the limit has been set, the system will follow the number
of the staff had set and notification will prompt out if the number of customers
exceeds the limit.

Customer’s Data Analysis Module

This module enables the staff to view the overall user gender and latest 3 months
of member record by analysis their data from the pie chart and bar chart. For
example, total number of male users and female users.

Generate Report Module

There are three reports generated by this module which is daily report. Daily
report will generate a pdf file to show the total customers, check-in and out
customers.

Contact Tracing Module

This module enables the staff to select a time slot to view the number and details
of customer walked in the shop. Besides, line chart also will be display on the
top of the screen for staff to monitor.

Store Control Module


New store will be registered through this module. During registration process,
the details of store are required like store icon, name, slot, floor and so on.

Staff Registration Module


When a new staff has been required to operate the tablet of the shopping center,
the data is needed to register for next time login to the system. For example, the
staff name. email, phone number and so on.

BACS3413 Project II 6
COVID-19 Distance Safety System Chapter 1

Body Status Check Questionnaire Module


The questionnaires consist of three questions which able to proof the safety
status of the user. The most important use of this module is to avoid the customer
that have hidden danger of coronavirus.

- Member Version

Login and Member Registration Module

Login and registration are for customers to sign up a new account or login to the
system by using their smartphone. Furthermore, if they forgot their account
password, they may reset their password instead of the old password. The
system will send a validation code to the user email for verification purposes.

Number of Persons Inside the Store Module

This module will show the number of customers inside all the shops in a list.
So, they no need to stand outside the shop to wait their turn. Moreover, they
may also view the number of customer limitations of the specific shop to
consider whether want to stand outside of the shop or continue their shopping
to other shop.

Location History and Today Body Temperature Module

This module displays all the user visited shops and body temperature of that
day. They may be able to select a desired date to view the record. This module
might help them to monitor their body temperature if an emergency case
happened.

Check Distance and notification

This module required users to authorise the permission for Bluetooth to check
their distance with another individual. This module will also keep checking the
user Bluetooth status for every few seconds in order to keep this module
working. If the user is in close contact with another user, a notification will be
sent to them to announce them to keep social distance between each other.

BACS3413 Project II 7
COVID-19 Distance Safety System Chapter 1

Display QR code Module

Display QR code Module will show the QR code that generated by the system
with the member Id for every time check in from main entrance.

Check-in & Out Module (Store)

In this module, users are required to scan the shop QR code in order to check-
in. After scanning, users no need to fill in their information again once they step
into the shopping centre. For check-out, users only need to press the check-out
button in the application. Name of the shop will be recorded in the database
after members scan the shop QR code.

Hospital detection Module

Nearest hospital location will be shown in this module. If a user needs to get a
COVID test, they may refer to the hospital location. The details of hospital such
as hospital name, address, distance, phone number and rating will show to user
as a reference.

Store Slot Reservation Module

Purpose of this module is to allow the member to reserve a slot based on their
likely shop. They may select a time slot that available to visit the store. 10
minutes before reserved time, a notification will send to user and when the
member didn’t check in to the reserved store, his/ her reservation will cancel by
the system.

Social Distancing Score

Social distancing score module is a module that will display a score for the user.
The score will start from 100 and deduct when user distance is close with
another individual in certain distance. If the score is less than 70%, 50% and
30% will send a notification to warn the user.

BACS3413 Project II 8
COVID-19 Distance Safety System Chapter 1

Review Customer Satisfaction

This module is for member to review their satisfaction to application in different


aspect. They may from performance, effective of the system to rate the system.
The rating will provide from 1 to 5 star for member to do selection.

1.4.2 Web-Based

Website Check-in and out Module

Check-in and out module for the web-based is for non-member of the shopping centre.
They are required to fill in their name, phone number and body temperature (after staff
scanned) to check-in before walk in to main entrance and store. For check-out, they just
need to press the check-out button to change status. If an emergency case happened,
staff may help them by using the system implemented in the entrance.

1.5 Project Team and Organization


Table 1.1: Task Schedule
COVID-19 Distance Safety Choo Yao Quah Jian Lee Choon
System Lee Yi Yang
Song Sheng Meng

Check In and Out Module X


(Shopping Centre)
Website Check in and out X
Module
Store Control Module X
Staff Registration Module X
Customer’s data analysis X
module
Generate Report Module X
Contact Tracing Module X
Display QR code Module X
Body Status Questionnaire X

BACS3413 Project II 9
COVID-19 Distance Safety System Chapter 1

Login and Registration X


Module (Member)
Number of persons inside X
the shop
Location History and Today X
Body Temperature
Distance Tracking Module X
Check In and Out Module X
(shop)
Hospital Detection Module X
Store Slot Reservation X
Module
Social Distancing Score X
Module
Review Customer X
Satisfaction
Check In and Out Module X
(web-based shop and
shopping centre)

1.6 Chapter Summary and Evaluation


This chapter about the problem currently facing by the shopping centers’ owner and
customers. For example, long queue when check-in procedure, social distance between
customers, customer limitation out of control. Other than that, this system may help
them in increase the efficient of check-in procedure and keep customer social in a safety
distance. The project plan is briefly stated in this chapter. COVID-19 distance safety
system is bringing all people into a harmony and low virus infected environment.

BACS3413 Project II 10
COVID-19 Distance Safety System Chapter 1

Chapter 2

Literature Review

BACS3413 Project II 11
COVID-19 Distance Safety System Chapter 2

2 Literature Review
This chapter describes the review of literature for some keywords and terminologies
related to the research including the discussion of similar and past research. All data are
collected from existing literature and research reports, articles, and web articles as well.
In order to understand the problem that are facing, research related to covid-19 also will
be discussed.

2.1 Company Background


Coronavirus 2019 outbreak is a global pandemic caused by the severe acute respiratory
syndrome coronavirus also known as SARS-COV-2 in scientific name. COVID-19 is
the global health crisis that is the same as SARS (severe acute respiratory syndrome)
virus had in 2002-2004. The virus originated in bats which sell in a wildlife wet market
in the city of Wuhan in China, like selling snakes and bats for consumption. There are
many coronaviruses in nature, which are found in all kinds of animals like bats, dogs,
cats, cows, mice, etc. Most of the coronavirus are harmless to humans. Yet, still have
exceptions for some coronaviruses are harmful and may cause illness to humans which
will affect the human respiratory system. The most serious may bring death to humans.
and able to increase frequency in a short time through cross-species transmission. But
cases occur in the world that just flows, like a river of blood to every country. Recently
the statistics show that more than 9.2 million confirmed cases have been reported in
226 countries and 26 cruise ships around the world. And there is more than 4 million
active cases and 474609 deaths cases. Besides from virus transmission cases, many
news reporters have reported that market shares drop sharply and surpass the previous
financial tsunami record in 2008 during COVID-19 outbreak in the world.

Based on the research that was done by a group of scientists, they found out coronavirus
will outbreak within 14 - 24 weeks. Anyway, COVID test must be done to confirm a
person infected by the virus caused by COVID-19. Sample will take from a persons’
nose or throat to do a test and test result will come back with a cost of 1 hour. People
infected by coronavirus diseases have to self-quarantine in hospitals and get treatments.
Since COVID-19 pandemic outbreak globally, every country's government has come
out with its own solution to reduce the cases in their country. Most of the solutions used
by the government are to keep civilians’ social distance more than 1 meter, wear masks,

BACS3413 Project II 12
COVID-19 Distance Safety System Chapter 2

take body temperature when entering the building and strengthen the legal provisions
into their own country. Based on the by Robert A.J. Signer, Assistant Professor of
Medicine at University of California San Diego, shows that social distancing can reduce
the spread of virus. However, these solutions bring effectiveness to every civilian in
each country.

2.2 Project Background


The aim of COVID-19 Distance Safety System is to achieve a low risk of COVID-19
cases happening in the whole world. This system is similar to the existing COVID-19
application that was launched by other countries. This system is able to speed up the
process of check-in and record customers details into the system, whereby the
customers can save their queueing time and enjoy their shopping time as usual.

Target users for this project mainly focus on the shopping centre which is still using the
ordinary way to record their customer details in the logbook and also for the customers
to adhere to the rule of social distance limitation. The government may review the walk-
in record from the system if someone is infected in the shopping centre. They are two
category users who are shopping centres’ owners and customers.

System flow for members show their QR code to the staff scan and update body
temperature. Bluetooth status should be on once walk into the shopping center in order
to keep track of their social distance. Scan shop’s QR code if you want to visit the
desired shop. Check out from the shop just press the checkout button in the application
to change the status as well as check out from the shopping center. For non-member
they may register their details on the website for check-in and as well as enter the shop.

This system develops social distance tracking features by using the advantages of
Bluetooth to come out with a social distance tracking solution which is able to calculate
the distance between two individuals and inform them if they have close contact
through the mobile application. Other than that, Bluetooth also able to consume less
battery compare than using GPS when tracking and calculate user distance.

BACS3413 Project II 13
COVID-19 Distance Safety System Chapter 2

2.3 Literature Review


2.3.1 Social Distancing
Social Distancing is one of the guidelines from the World Health Organization (WHO)
to slow the spread of COVID-19 during this pandemic outbreak situation. Based on the
studies from Jennison, he shows that social contact that evidence from WHO with 1-2
metre limit by using high-speed exposure photography technicque to detect atomized
secretions and found that the majority of droplets were expelled within 1 metre (Bahl,
P., Doolan, C., de Silva, C., Chughtai, A.A., Bourouiba, L. and MacIntyre, C.R. ,2020).

Figure 2.1: Infographic shows the vital importance of social distancing

Furthermore, Assistant Professor of Medicine at the University of California San Diego,


also shows that social distance can be an effective way to reduce the spread of the virus.
From the infographic (Figure 2.1) we can see that one person infected but social as
usual will pass to 2.5 people within 5 days. After 30 days, the infection cases would
increase rapidly to 406 persons. The number of cases significantly could be reduced
though by engaging less social contact. If 50 percent is reduced, the average of persons
infected after 30 days will result in 15 persons getting infected. Results of 75 percent
less contact after 30 days could be even lower than 2.5 new cases. Obviously from the

BACS3413 Project II 14
COVID-19 Distance Safety System Chapter 2

infographic, contact reducing can greatly minimize the infect cases in the world. If
everyone obeys the social distance rule, the whole may enter a blissful circumstance
and get rid of the COVID-19 (Armstrong, M., 2020).

2.3.2 Bluetooth

Figure 2.2: Diagram of how Bluetooth works

Bluetooth (Figure 2.2) also known as a short-range wireless communication technology


which allows electronic devices to connect and interact with other devices. It is used on
various gadgets nowadays, from smartphones, speakers, earphones and more.
Bluetooth was invented in 1994 to replace cable. It uses the same 2.4GHz as some other
wireless technologies in the home devices or office. For example, cordless phones and
Wi-Fi routers (Melanie Pinola, 2019). However, it’s mainly designed for
communicating over short distances less than 10m (33-foot) radius wireless network,
called personal area network (PAN) or piconet which allows connecting up to eight
devices at one time (Explain that Stuff ,2018). Bluetooth electronic gadgets that work
this way have built-in radio antennas (transmitters and receivers) so they can
simultaneously send and receive wireless signals to other Bluetooth gadgets. Bluetooth
does not rely on WI-FI, or mobile data or a cell network. If Bluetooth compatible and
in close proximity to each other, they may take part in the wireless, two-way
communication (AndroidPIT, n.d.). Bluetooth consumes less power and costs compare
than Wi-Fi. However, the speed of transferring data is slower than Wi-Fi because the
maximum data transferring rate is 3Mbps. On the other hand, Wi-Fi transferring speed
may up to 1300+ Mbps depending on the devices have “g”, “n”, or “ac” Wi-Fi plus on
any boosting from adaptors and router’s support (Akemi Iwaya, 2014). As technology
has evolved day by day, Bluetooth speed has increased with a new version.

BACS3413 Project II 15
COVID-19 Distance Safety System Chapter 2

Bluetooth 4.0 was published on July 6, 2010. Bluetooth 4.0 is also named Bluetooth
low energy or Bluetooth LE or BLE. The new features of Bluetooth 4.0 included low
energy consumption, low cost, multi-vendor interoperability, and enhanced range. This
makes many device manufacturers replace their sensor technology with Bluetooth
which is widely compatible with most of the standard devices in the market. Examples
of gadgets that control with Bluetooth 4.0 in the market are fitness trackers, medical
devices, key fobs of the cars, home lightning controls and etc (The Gadget Square.
,2013). On 6 December 2016, Bluetooth 5.0 has invented with the new features that
mainly focused on new Internet of Things technology. Differences between Bluetooth
5.0 and 4.0 is has maximum of four timers the range, eight times the bandwidth, and
twice the speed.

2.3.3 Advantage of Bluetooth

1. Wireless
One of the biggest benefits of Bluetooth is allowing wireless communication
between devices. Through this we may conveniently send and receive the files
without needing any cables. Along with improving safety as a consequence of
eliminating wires once a necessity, wireless also offers plenty of alternate
advantages. If travelling with a laptop or other wireless devices, forgetting
cables would not be annoying.

2. Low power consumption


Because Bluetooth uses low power signals. It requires a little amount of battery
to function which results in less power consumption. This is an excellent and
friendly to smartphone that with low amount of battery. For example, Samsung
Galaxy A10 with 3400mAh (Beaconstac.com, 2018).

3. Sharing data and Voice Communications


Standard Bluetooth nowadays allows sharing the compatible devices to share
the data and voice communications with each other. This is great for the
Bluetooth headset which makes you safely driving and talking at the same time
(www.streetdirectory.com, n.d.).

BACS3413 Project II 16
COVID-19 Distance Safety System Chapter 2

4. Low Prices
Bluetooth is a cost-effective technology for companies to implement it to their
product which also lowers expenses to the companies. This result may become
cheaper when passed down to the customer (liGo Magazine, 2014).

2.3.4 Disadvantages of Bluetooth

1. Security Vulnerabilities
Bluetooth technology operates on radio frequency and therefore the hacker may
enter via walls. Thus, this technology is not suitable for transferring personal
data due to low security guarantee (daneelyunus, 2018).

2. Limited Range
The range of Bluetooth is very limited compared than Wi-Fi. This is because
the range of Bluetooth is depending on the specific class of radio it uses. Paired
devices only allow to maintain wireless communication within the range that
had limited (Ivankov, 2019). For example, Bluetooth devices with class 1 are
only able to establish and maintain the operating range within 100 meters. Class
2 has a more limited range up to 10 meters. Class 3 radios operating range more
limited than the two classes before with lower than 10 meters (Laird Connect,
n.d.)

3. Slower Data Transmission Rate


Another disadvantage of Bluetooth is slower data transfer rate when compared
with other hardware interface. To be more specific, Bluetooth 4.0 version and
5.0 version only able to transfer 24 ~ 25 Megabits per second (Mbps). Wired
hardware interfaces such as USB 3.0 or Thunderbolt 3 support transfer rate up
to 10 Gigabits per second (Gbps) (Help Desk Geek, 2019).

4. Energy Inefficient
Bluetooth requires low energy requirement, especially BLE. However, in the
real-world technology still can’t avoid from the fact of battery drain on a device.
Devices such as smartphone and tablet use their battery for other software
processes and keep the hardware components running (Ivankov, 2019).

BACS3413 Project II 17
COVID-19 Distance Safety System Chapter 2

2.3.5 Calculate Distance with Bluetooth

Figure 2.3: RSSI raw data and average data

To calculate distance between two unpaired devices and the beacon, RSSI
values of the BLE beacon will be used for calculation. RSSI stands for Received
Signal Strength Indicator. It accurately reflects the strength of the beacon’s
signal as seen on the receiving device like a smartphone. The signal strength
depends on distance and Broadcasting Power value. Broadcasting Power value
is around 2 -4 dBm and the RSSI ranges will be around -26 (a few inches) to -
100 (40-50m distance) (dzone.com, 2015). Besides from RSSI, there are few
parameters that are indispensable in this calculation which is Measure Power
and Advertising Interval.

Measured Power is a factory-calibrated, read-only constant which indicates


what is the expected RSSI at 1-meter distance to the beacon. It allows to
estimate the distance between the device and the beacon (Estimote Community
Portal, n.d.).

BACS3413 Project II 18
COVID-19 Distance Safety System Chapter 2

Beacons do not broadcast constantly like Wi-Fi. They ‘blink’ instead.


Advertising Interval refers to the time between each blink. The value ranges of
blinking will be between 100ms to 2000ns. The shorter the advertising interval
value, the more stable the signal strength (iotbymukund, 2016).

Figure 2.4: Calculation of Distance

Formula to convert RSSI value to distance = 10 ^ ((Measures Power –


RSSI)/(10*N) (Figure 2.4). BLE uses Measured Power is also known as the 1
Meter RSSI. To make this system calculate the difference distance accurately,
distance for RSSI value have to be -73, -69 and -63. Therefore, to calculate the
distance from the RSSI value the following calculation will be used.
1. Distance for RSSI -73 = 10 ^ ((-69-(-73)) ÷ (10*2))
= 1.5 Meter
2. Distance for RSSI -69 = 10 ^ ((-69-(-69)) ÷ (10*2))
= 1 Meter
3. Distance for RSSI -63 = 10 ^ ((-69-(-63)) ÷ (10*2))
= 0.5 Meter

2.4 Feasibility Study


2.4.1 Technical Feasibility
COVID-19 Distance Safety System is a system that was developed to alleviate and
reduce coronavirus disease outbreak in the whole world. To use this system, shopping
centre owners have to set up a desktop computer or laptop and thermometer to install
this system. Specification for desktop computers required Windows 7 64 bit and above
with internet access in order to use COVID-19 Distance Safety System. Minimum
hardware environment needed includes CPU with Intel i5 or above, any GPU that is
compatible with OpenGL 3.2 (integrated graphics cards Intel HD 4000 or above), 4 GB
RAM, 10 GB Hard Disk Free Space and Proper peripherals like coloured monitor,

BACS3413 Project II 19
COVID-19 Distance Safety System Chapter 2

keyboard and Mouse. Configuration lower than that stated above will also do but will
provide degraded performance and may reduce the expected efficiency by increasing
the query response time. For customers, they only need their smartphone to use the
mobile application version with operating system Android Ice Cream Sandwich 4.0 and
above. To ensure the system work with all features, Bluetooth and Camera are also one
of the indispensable tools. Other than that, the shopping centre is not required to spend
money on building up a server to interact with the data from customers' phones.

2.4.2 Operational Feasibility


This system provides end users friendly user interface, accurate and usefully formatted
information. The information handling in the current system is done manually. Thus,
the information handling in the proposed system will be computerized and will
automatically update the data from the database. The human errors will be minimal.
Other than that, the data also can be easily updated, modified when required and will
be validated before the data processed into the system in order to avoid wrong data
correction. After this project has been launched successfully, customer is required to
download the application from the Google Play Store and install into their own devices.
However, staff and customers still need some basic knowledge on the computer
knowledge and mobile application to operate the system correctly. Without the
knowledge, they will be unable to perform something they intended and don’t know
what is actually happening if something is out of their expectations.

2.5 Chapter Summary and Evaluation


This chapter review researchers done, background and feasibility study that related to
the project. The resource is taken from journals and internet resources. In this chapter,
history about COVID-19 and brief introduction of Bluetooth RSSI followed by review
of existing RSSI distance calculation to get a brief idea on how to measure the 1.5 to
0.5 meters distance between two devices.

BACS3413 Project II 20
COVID-19 Distance Safety System Chapter 3

Chapter 3

Methodology and Requirements


Analysis

BACS3413 Project II 21
COVID-19 Distance Safety System Chapter 3

3 Methodology and Requirements Analysis


This chapter will discuss about the process to develop the system from beginning to the
end, requirement analysis based on the requirement of the user. It will also explain the
process at every step that will be conducted to develop COVID-19 Distance Safety System.
This chapter will also provide a detail explanation of the selected mode of analysis used
and data collection method.

3.1 Methodology
The software development used in this project is an incremental model. This system
development will be broken down into modularity projects. Incremental models
produce the system at each increment. If there is any correction, it can be done in the
middle of the process. The product in this development model is done through analysis,
design, coding, testing and maintenance incrementally. The process is repeated until
the entire product is completed. The reason we choose this development process is
because only a low budget, user requirement is well defined, short development time
and few staff is needed. The major or core product functions will be developed first.
Figure 3.1 below are the incremental model phases.

Figure 3.1: Incremental model phase

3.1.1 Requirement Analysis


In this phase, developers will communicate with the customer and note down all the
requirements of the customer. This phase has two main elements namely user
requirement and the requirements of hardware and software. All the requirements will

BACS3413 Project II 22
COVID-19 Distance Safety System Chapter 3

be analysed if suitable to develop the system through different type of gathering


technique. The result of this phase is a system-requirements document.

3.1.2 Design
In this phase, after the system-requirements document created in the previous phase and
develops that specific technical details required for the system. It is in this phase that
the business requirements are translated into specific technical requirements. The
design for the user interface, database, data inputs and outputs and reporting are
developed here. Some of the high-end function are designed during this stage. The
result of this phase is a system-design document.

3.1.3 Code
Coding parts will be done in this phase by using the system-design document as a guide
for us to develop the program. All the components of the software are implemented in
this phase. The result of this phase is an initial working program that will meets the
requirements of customer in the system requirement analysis phase and design
developed in the design phase.

3.1.4 Testing
In the testing phase, the system developed in the previous phase is put through a series
of structured tests with the test plan. The first is a unit tests, which tests the individual
parts of the code for error or bugs. Next is a system test, where the different components
of the system are tested to ensure that they work together properly. For example, passing
parameter between two modules. Finally, the user acceptance test that allows the end-
user that will be using the software to test the system to ensure the system is meets their
standards. If any bugs, errors or problem found during testing are founded and will test
again.

3.1.5 Deployment
After the system is free from error and bugs, the system will be deployed for the
shopping center. This phase include training the user, providing documentation, and
conversion from any previous system to the new system. It is mandator to monitor the
system time to time to make sure that if any changes had to be done, it is noticed.

BACS3413 Project II 23
COVID-19 Distance Safety System Chapter 3

3.2 Requirement Gathering Techniques


The first gathering techniques that we used in this system is questionnaires. In order to
easily analyze the user requirements, we have prepared 7 close-ended questions for the
target user to answer in google-form. The questionnaires will be posted to social media
such as Facebook, Instagram, Twitter and so on to collect the data as much as possible.
In order to encourage participation from the respondents, we have briefly explained
the purpose of study and made it clear to the participants that participation in the
project was voluntary and anonymous. In addition, we also explained to the
participants how to complete the questionnaire and allowed them to take their time to
complete the questionnaires.

Second fact gathering is observations. The target of observation is the customer and
the staff of the shopping center. The reason why we observe the staff and customer is
because we wanted to know the process and average of spending time per person to
check-in which include writing name and taking body temperature to the shopping
centre’s main entrance and store, the number of customers follow the social distance
guidance and customer limitation inside the store.

The third method is literature review which needs plenty of time to do some research
on the internet. The literature review consists of data gathered from journals and internet
resources regarding the social distance and recent system used in. This will provide a
wide variety of viewpoints making the project more valid. We also use current available
system in the market as our reference in developing and user interface design of the
system.

BACS3413 Project II 24
COVID-19 Distance Safety System Chapter 3

3.3 Requirement Analysis

Figure 3.2: Hierarchy Structure Chart of COVID-19 Distance Safety System

3.3.1 Project Scope


Table 3.1: Brief description of each module in the system
Check In and Out User required to scan the member qr code before allows the member
Module (Shopping
to walk through the main entrance. This is to ensure that the shopping
Centre)
centre not missing any customer in getting every customer’s data.
Website Check In Beside from convenience member of the shopping centre there is also
and Out (Store)
website version for customer without membership. Websites check in
and out is special for the customer without install the application inside
their phone. This module need customer to scan the QR code that will
lead them to our webpage to type the name, phone number and body
temperature.
Store Slot To make the customer have chance to visit the shop, member may
Reservation
reserve any available time slot to visit the store by following the terms
Module
and conditions.
Contact Tracing Staff can check the record of customers checked-in in the shop they
Module
desired to display of specific time of the day from the database.

BACS3413 Project II 25
COVID-19 Distance Safety System Chapter 3

Furthermore, the line chart also will be displayed for the staff to
monitor.
Login and Member This module is for customer to login and register their information in
Registration
the system such as name, email, IC number, phone number and so on.
Forget function will be include in this module for the member who
forgot his password and let them to reset their password by enter the
valid verification code in their email.
Location History If member wanted to check the location that he/she have visited, they
and Body
may refer to the scanned QR code location and body temperature of
Temperature
the day also will be displayed in the application.
Check In and Out When member wanted to visit the store, they required to open the QR
(Store)
code scanner inside the application and scan the store QR code for
check-in purpose.
Display QR code During the main entrance check in process, member required to show
the QR code that generated by this module. The QR code will be based
on the member id.
Customer’s Data This module will help manager level or above to view the gender of
Analysis Module
end user of entire application. The dashboard that generated could be
analysis for future decision and reference.
Generate Report This module consists of three reports which is daily report. For
Module
example, daily report will display the abnormal status of customer who
did not check out after leaving the shopping centre.
Body Status Check Questionnaire to track the staff and member’s body health to ensure
Questionnaire
the risk that bring to the shopping centre is low. The result will be
Module
saved in the database for future use. The questionnaires are alike with
the COVID-19 questionnaires which will let the system record the staff
and member’s current health status for every time login to the system.
Store Control When a new company wanted to open an outlet inside the shopping
Module
centre, they need to register the slot of store or any other related data
to the database.
Distance Tracking This module is the focus part in this system. It responsible to maintain
Module
the social distance of the member and warning them if less than 1.5

BACS3413 Project II 26
COVID-19 Distance Safety System Chapter 3

meters by using the Bluetooth RSSI to calculate the distance between


two individuals.
Number of Person The application shows current number of customers in the shop. By
Inside the Store
doing so, customer may decide to wait for his/her turn to walk into the
Module
shop or continue walk to other shop and come back later.
Hospital Detection If member wanted to have a COVID-19 test or treatment, they may
Module
open this function to view the hospital that near to them. The display
location of hospital will within ten kilometres from the member current
location.
Social Distancing Social distance module is a module to motivate the member to
Score Module
maintain their social distance by setting some rules to minus their
marks once they break the rule. The marks will be deducted once the
member is close contact within certain distance. For example, less than
1.5 will minus 2 marks, less than 1 meter will minus 3 marks and lower
than 0.5 meter will minus 5 marks from the score. The marks will auto
set to 100 once they check-in from the main entrance. If their score
less than 70, 50, 30 percent a warning message will sent to them for
alert purpose.
Review Customer Customer may response their satisfaction level to use by giving
Satisfaction
feedback and rating the questionnaires inside the application. The will
from 1 star which represents dissatisfaction to 5 stars very satisfaction.
Staff Registration This module responsible to help the new staff who need to be involved
Module
in the system. For example, the entrance guard, department manager
and other related stakeholders.

3.3.2 Development Environment


• Programming Language

In this project, we will be using Html, CSS, Kotlin language to develop the window-
based, web-based, and mobile application of the COVID-19 Distance Safety System.
The reason we choose these languages is because we are used to it in our college
course and easy for us to build the back end-services and user interface. Besides that,
Html and CSS are the popular language that usually used by developer to develop
website in the programming language market. Kotlin is rarely use in mobile
application for Android platform.

BACS3413 Project II 27
COVID-19 Distance Safety System Chapter 3

• Development tools

For software development, we decide to use android studio to develop Android mobile
application. Android Studio is the official Integrated Development Environment
(IDE) for Android app development, IntelliJ IDEA. Android Studio offers various
feature that will enhance our productivity when building apps. Android Studio have
feature rich emulator that easy for us to test the application in different devices
simulator without finding any physical devices. Furthermore, android studio also easy
for us when apply changes to running application without restarting the app.

Besides that, we also choose visual studio 2017 for our window-based development.
Visual studio is an open source, lightweight, and full featured text editor that supports
a multitude of extensions for all kind of developer. Visual Studio Code is built on a
platform called Electron, and is available for Windows, macOS and Linux. This
learning module will be as platform-independent possible.

Lastly, NetBeans is our third development tools that use for web-based development.
NetBeans is an integrated development environment (IDE) for java. NetBeans allows
application to be developed from a set of modular software components called
modules. NetBeans runs on Windows, macOS, Linux and Solaris. Applications based
on NetBeans, including the NetBeans IDE, can be extended by third party developers.

• Database

Database we use in this project will be firebase. Firebase is a Cloud-hosted and


NoSQL database that uses a document-model. The reason for choosing firebase is
because it can be horizontally scaled while letting us to store and synchronize data in
real-time among users. Firebase is a great application that are used across multiple
devices especially mobile application. The most challenging part in this project which
is we have zero experience in using firebase. So, we need to take some time to learn
it and make it useful.

• Hardware Requirement

Hardware plays an important role in developing this system in order to run smoothly
and efficiently without any problem. Thus, hardware that needed are the computer for

BACS3413 Project II 28
COVID-19 Distance Safety System Chapter 3

running the system, external hard disk for backup. Below is the minimum requirement
for the computer to develop the system.

Table 3.2 Minimum Hardware Requirement for Developer


Operating System Windows 7 64bit
Processor Intel I5 Processor with 2.7 Ghz or above
RAM DDR3 4GB
Solid State drive 240 GB
Screen Resolution 1366 x 768 or higher

Table 3.3 Minimum Hardware Requirement for Customer Version


Operating System Android 7.0+
Memory 2GB RAM
Storage 8GB or more
Browser Chrome Browser with version 84.0.4147.89 or
any
Bluetooth Bluetooth Version 4.0 or above with BLE
Network Access yes
Camera yes
GPS yes

Table 3.4 Minimum Hardware Requirement to Staff Version


Operating System Android 7.0+
Memory 2GB RAM
Storage 8GB or more
Screen Resolution 1024 x 600 or higher
Camera yes

• Operating Environment

To ensure the system can run in a smooth environment in different devices. We have
come out with a list of minimum hardware requirements to deal with computers (Table
3.2), mobile phones (Table 3.3) and tablets (Table 35). All devices that are used to
launch this program are needed for network access in order to connect to the database.
• External Interface Requirements

The user interface design of window-based, web-based and mobile applications must
be user friendly and consistent. The interface should be consistent in that, wherever
possible and comparable operations should be activated in the same way. Besides,
user guidance must provide by giving meaningful feedback when errors occur and
provide context-sensitive user help facilities. Moreover, language in the system must
be command language that is usually used by the people of that country. By doing so,

BACS3413 Project II 29
COVID-19 Distance Safety System Chapter 3

novice and expert users will be easy to learn and feel flexible when operating the
system. Else, it will make the users hard to learn, especially novice users.

3.4 Functional and Non-Functional Requirements


3.4.1 Functional Requirements
a. Number of people inside the shop
- The system should allow user to view the number of customers inside the store.
- The system should be able to retrieve the accurate number of customers from
the database.
b. Check Distance and Notification
- The system should be able to send the notification to the customers.
- The system should calculate the accurate distance.
c. Hospital Detection Module
- The system should allow user to view the nearest hospital location.
- The system should retrieve the correct hospital location.
d. Social Distancing score
- The system should allow user to view the social distance score record history.
- The system should be able retrieve the social distance score details such as date
and score.
- The system should be able to update the social distance score.
e. Review Customer Satisfaction
- Allows the member rate their satisfaction about the system.
- The system should be able to save the review from customer into the database.

3.4.2 Non-Functional Requirements


a. Reliability
• The system shall be completely operational at least 99% of the time.
• The possibility percentage failure mush be lower than 0.5%.
• The system down time after a failure shall not exceed more than one hour.
b. Usability
• Staff should be able to use the system in the shopping centre after 3 days of
training.

BACS3413 Project II 30
COVID-19 Distance Safety System Chapter 3

• People without training and no understanding of English shall be able to use


the system.
c. Security
• The system shall ensure that the customer data can be accessed only by
authorized users.
• The system shall distinguish between authorized and non-authorized users.
d. Availability
• The system should be online 24/7.
• The COVID-19 Distance Safety System shall achieve 100 hours MTBF (mean
time between failure).
e. Efficiency
• The system restart cycle must execute completely in less than 60 seconds.
• Any interface between a user and the system shall have a maximum response
time of three second.

3.5 Chapter Summary and Evaluation


This chapter reports on the requirement analysis of the proposed application. This chapter
describes the project scope, developing environment, hardware requirement, database,
operation requirement and also the lifecycle of the system used. In collecting data,
questionnaires, observations and literature review are used. Other than that, I also
describe the software development tools that will be used to develop this system.
Function requirements also clearly listed to understand what is the minimum
requirements that we have to meet.

BACS3413 Project II 31
COVID-19 Distance Safety System Chapter 4

Chapter 4

System Design

BACS3413 Project II 32
COVID-19 Distance Safety System Chapter 4

4 System Design
The chapter focus on the design of the completed COVID-19 Distance Safety System. The
content will include overall use case diagram, user interface design, and the some
related/appropriate diagram to build this system. This chapter will also contain Data Flow
Diagram (DFD), use case diagram, sequence diagram, ERD and other diagrams. Besides,
this chapter will also cover the data type for building the databases of this system by listing
down in a data dictionary.

4.1 System Design


4.1.1 Use Case Diagram
• Overall Use Case Diagram

BACS3413 Project II 33
COVID-19 Distance Safety System Chapter 4

▪ Detailed Use Case Diagram – Number of people inside the store Module

Use Case: View Store (Number of People Inside the store module)
Number of Customer Limitation

Brief The use case allows the customer to view the number of
Description: people inside the store in order to convenience them to make
decision.

Actors: Customer

Pre- User must login their account before using view the lists.
condition: Network also should be connected.

Main
Flows: Actor Action System Action
2. User key in their name 1. System will display a
and password to login to login page for user
the system
4. Choose the “View Store” 3. System will direct the
button user to homepage.
4. System will display the
number of people inside the
store. All the store inside
the shopping centre will
display in a list.

Alternative A2: Wrong Password or account name


Flows: 1. System will pop a notification to notify the user that the
account name or password is invalid.

BACS3413 Project II 34
COVID-19 Distance Safety System Chapter 4

Post- If the use case was successful, the system should show the
condition: number of people in every store.

• Detailed Use Case Diagram - Distancing and Notification Module

Use Case: Distance Tracking (Distancing and Notification Module)


Brief The use case allows the system to keep track the user social
Description: distance.

Actors: Customer

Pre- User must login to the system and Bluetooth status should be
condition: on.

Main
Flows: Actor Action System Action
2. User key in their name 1. System will display a
and password to login to login page for user.
the system
4. User change the status 3. System will notify user
become on by pressing the on their Bluetooth.
Bluetooth icon.
5. System will direct user to
check in page.

Alternative A2: Invalid Password or username.


Flows: 1. System will pop a message “Invalid username or
password”.

A4: Bluetooth status is off.


1. System will notify user to activate the Bluetooth inside the
phone.

BACS3413 Project II 35
COVID-19 Distance Safety System Chapter 4

Post- If the use case was successful, the system able to track the
condition: distance between two smartphones.

• Detailed Use Case Diagram - Hospital Detection Module

Use Case: Nearby Hospital (Hospital Detection Module)

Brief The use case allows user to search the hospital near by them.
Description:
Actors: Customer

Pre- The customer must be logged in.


condition:
Main
Flows: Actor Action System Action
2. User enter his credential. 1. System display the login
page.
4. User select Hospital icon. 3. System will direct user to
the homepage
6. User select a hospital to 5. System will direct user to
display its location. a nearby hospital.
7. Display hospital location.

Alternative A2: Wrong username or password.


Flows: 1. An error messages are displayed if username or password
does not exist in database.

Post- User may find the hospital location around them.


condition:

BACS3413 Project II 36
COVID-19 Distance Safety System Chapter 4

• Detailed Use Case Diagram - Social Distancing Score Module

Use Case: New Score (Social Distancing Module)

Brief The use case allows the system to reset the marks once
Description: check-in in the main entrance.
Actors: Customer

Pre- The customer must access to the system.


condition:
Main
Flows: Actor Action System Action
2. User login to the 1. System display the login
application as the member. page.
3. Open member QR code 4. Retrieve the customer
for scanning. details.
5. Reset user social
distance marks to 100.

Alternative A2: Username and password does not match.


Flows: 1. The system will inform the user that password does not
match with the username.

A5. Check-in more than one times within one day.


1. The system will not reset to 100 and a notification will
send to user.

Post- User may reset it marks to 100 once he check-in in the main
condition: entrance.

Use Case: Display Score (Social Distancing Module)

BACS3413 Project II 37
COVID-19 Distance Safety System Chapter 4

Brief The use case allows user to view their current social distance
Description: score in shopping centre.
Actors: Customer

Pre- The customer must be logged in.


condition:
Main
Flows: Actor Action System Action
2. User login to the 1. System display the login
application as the member. page.
4. Select able to view his 3. System will direct user to
current score in home page. the homepage.

Alternative A2: Username and password does not match.


Flows: 1. The system will inform the user that password does not
match with the username.

Post- User may view the latest social distance score.


condition:

Use Case: View Score History (Social Distancing Module)

Brief The use case allows user to view the history of calculation of
Description: the social distance score in the system.
Actors: Customer

Pre- The actor is registered as a member of the shopping centre


condition:
Main
Flows: Actor Action System Action
2. The actor logs into the 1. System display the login
system page for the actor.
4. Select view score history 3. System will direct user to
icon. the homepage.
5. Score history will be
display.

Alternative A2: The system fails to authenticate the actor.


Flows: 1. The system informs the actor and doesn’t allow the actor to
proceed.

Post- User may view their deducted score records in the database.
condition:

BACS3413 Project II 38
COVID-19 Distance Safety System Chapter 4

• Detailed Use Case Diagram - Review Customer Satisfaction Module

Use Case: Write review (Social Distancing Module)

Brief The use case describes customer leave reviews about their
Description: feeling to the system.
Actors: Customer

Pre- The actor must exist in the database.


condition:

Main
Flows: Actor Action System Action
2. The actor logs into the 1. System display the login
system. page for the actor.
4. clicks “Write a Review” 3. Home page is displayed.
button.
6. Actor rates the system. 5. Review form will pop out
for the user to fill in.
7. Actor clicks “Submit” 8. The new review will
button to send his/her record in the database.
review
9. “Thank you for your
review” will displayed for
the user.

Alternative A2: Actor’s account does not exist in the database.


Flows: 1. System informs the user “Account does not exist”.

Post- Review will save into the database after user click submit
condition: button.

BACS3413 Project II 39
COVID-19 Distance Safety System Chapter 4

4.1.2 Activity Diagram


• View Store

BACS3413 Project II 40
COVID-19 Distance Safety System Chapter 4

• Distance Tracking

BACS3413 Project II 41
COVID-19 Distance Safety System Chapter 4

• Nearby Hospital

BACS3413 Project II 42
COVID-19 Distance Safety System Chapter 4

• New Score

BACS3413 Project II 43
COVID-19 Distance Safety System Chapter 4

• Display Score

• View Score History

BACS3413 Project II 44
COVID-19 Distance Safety System Chapter 4

• Write Review

4.1.3 Sequence Diagram


• View Store

BACS3413 Project II 45
COVID-19 Distance Safety System Chapter 4

• Distance Tracking

BACS3413 Project II 46
COVID-19 Distance Safety System Chapter 4

• Hospital Detection

BACS3413 Project II 47
COVID-19 Distance Safety System Chapter 4

• New Score

• Display Score

BACS3413 Project II 48
COVID-19 Distance Safety System Chapter 4

• View Score History

• Write Review

BACS3413 Project II 49
COVID-19 Distance Safety System Chapter 4

4.2 UI Design
4.2.1 Mobile-Based UI

Figure 4.1: Store List UI


This UI shows the Store List to the customer to view the current number of customers
inside the store and customer limitation for every store. The text box in provided to the
user to search the store.

BACS3413 Project II 50
COVID-19 Distance Safety System Chapter 4

Figure 4.2: Distance Tracking Module UI

Distance Tracking UI will show the Bluetooth button to the customer to activate the
Bluetooth inside the phone. When the device detects other smartphone around the user,
the notification will pop up at the top of the screen.

BACS3413 Project II 51
COVID-19 Distance Safety System Chapter 4

Figure 4.3: Hospital Detection Module UI

This UI is showing the location of Hospital near to the user with the red pin. User also may
locate his own location by clicking the “show current location” icon. The details of the hospital
will be show when user click on the red pin.

BACS3413 Project II 52
COVID-19 Distance Safety System Chapter 4

Figure 4.4: Display Score Module UI

This module shows the current score in the main page for the user to view. The score will keep
updating once the database is updated.

BACS3413 Project II 53
COVID-19 Distance Safety System Chapter 4

Figure 4.5: Score History Module UI

Basically, score history module UI will show the record of deducted marks and date. When the
user check-in in the main entrance, the reset marks also will show in this UI.

BACS3413 Project II 54
COVID-19 Distance Safety System Chapter 4

Figure 4.6: Write A Review Module UI

This UI shows the user satisfaction review form for the customer to fill up. The user may
click the star to rate for each question. Feedback textbox is for the user to write the feedback
on any bugs or dissatisfaction to the developer.

BACS3413 Project II 55
COVID-19 Distance Safety System Chapter 4

4.3 Data Design


4.3.1 Entity Relationship Diagram (ERD)

BACS3413 Project II 56
COVID-19 Distance Safety System Chapter 4

4.3.2 Class Diagram

BACS3413 Project II 57
COVID-19 Distance Safety System Chapter 4

4.3.3 Data Dictionary

Member Table

Variable Data Type Size Description Example

Member_Id (PK) varchar 7 Unique ID for M00001


member

Password varchar 20 A secret word “hello69”


with the
combination of
alphabets and
numbers to login
into the apps

Name varchar 50 Name of the ‘Lee Yao


person Sheng’

IC_Number varchar 15 National “990914-15-


Registration 2323”
Identity Card or
Passport number
of the staff

PhoneNumber varchar 11 The contact “016-7874458”


number of the
person

HealthStatus varchar 20 The Health “Safety”


status of
customer after
answering the
question

Email varchar 60 The email


address of the ‘hello69@yaho
member when o.com’
registered as a
member.

BACS3413 Project II 58
COVID-19 Distance Safety System Chapter 4

CurrentScore int 3 Member’s ‘100’


current social
distance score

DistanceScoreSt int 1 Use to record ‘1’


atus member current
check-in status

Role varchar 6 Declare the role ‘staff’


of the user

SocialDistanceScore Table

Variable Data Type Size Description Example

Score_Id varchar 7 Unique ID to S00001


represent the
score of the user

Score int 3 Score of the user 80


reset and
deducted

Score_Date date - Date of the 20201130


score record
(yyyyMMdd)

Title varchar 15 The reason of the “Close Distance”


record

Member_Id varchar 7 Unique ID for M00001


(FK) member

BACS3413 Project II 59
COVID-19 Distance Safety System Chapter 4

Review Table

Variable Data Type Size Description Example

Review_Id(PK) varchar 7 Unique ID for RV00001


the review form

ReviewStar1 int 1 Level of 2


satisfaction on
first question

ReviewStar2 int 1 Level of 3


satisfaction on
second question

ReviewStar3 int 1 Level of 4


satisfaction on
third question

ReviewStar4 int 1 Level of 5


satisfaction on
fourth question

Feedback varchar 200 Feedback of the “Time slot that


app from user I have reserved
is missing,
please solve
this problem.
Otherwise 1
star review”

Member_Id( FK) varchar 7 Id of the M00001


member

BACS3413 Project II 60
COVID-19 Distance Safety System Chapter 4

ShoppingCentre Table

Variable Data Type Size Description Example

customerId(PK) varchar 15 Unique Id for “2Wu6L1qdzJd


customerID tfsf” or
“M00001”

Check_In_date(P varchar 8 Date when the 20201205


K) person check in
(yyyyMMdd)

bodyTemperature varchar 6 Body “36.5°C”


temperature of
the customer

status varchar 8 Status of “checkIn” or


whether the “checkOut”
person inside the
shopping centre

checkInTime varchar 8 Time customer “06:46 PM”


check in into
shopping centre

checkOutTime varchar 8 Time customer “08: 45 PM”


check out from
shopping centre

customerIc varchar 14 Customer Ic “990917-13-


Number 3395”

name varchar 50 Customer’s “Quah Jian


name Shoong”

phone varchar 12 Customer’s “018-4322334”


phone number

BACS3413 Project II 61
COVID-19 Distance Safety System Chapter 4

Reservation Table

Variable Data Type Size Description Example

Reservation_Date varchar 7 Date of the 20201205


reservation
(yyyyMMdd)

Reservation_Time varchar 8 Time of the “10:00 AM”


reservation

status varchar 9 The status of the “accepted” or


reservation “active” or
“cancelled”

Store_Id(PK, FK) varchar 9 Unique Id for “ST00001”


store

Member_Id(PK, varchar 7 Unique Id for “M00001”


FK) member

Store Table

Variable Data Type Size Description Example

Store_Id(PK) varchar 7 Unique ID for ST00001


the store

Store_Password varchar 20 A secret word ‘hello69’


with the
combination of
alphabets and
numbers to
login into the
apps

Store_Name varchar 50 Name of the ‘McDonald's’


store

Store_Slot varchar 10 Slot of the store ‘A-003’


currently
located

BACS3413 Project II 62
COVID-19 Distance Safety System Chapter 4

Store_Floor varchar 7 Floor of the ‘F1’


store currently
located

Store_Description varchar 100 Description of ‘A fast food


the store restaurant’

Store_Limitation integer 2 Maximum 20


number allowed
in the store

Store_Image varchar 150 Url link of the "https://firebas


store image estorage.googl
eapis.com/v0/b
/fypdatabase-
dce2b.appspot.
com/o/GUAR
DIAN.jpg?alt=
media&token=
e09b803f-d8fa-
499c-8f26-
d8616b9911ea
"

CheckInStore Table

Variable Data Type Size Description Example

checkIn_Date(PK) varchar 8 Date of 20201130


customer check
in into store (yyyyMMdd)

Customer_Id(PK, varchar 15 Unique Id for “2Wu6L1qdzJd


FK) customer tfsf” or
“M00001”

Store_Id(PK, FK) varchar 7 Unique ID for “ST00001”


the store

checkInTime varchar 8 Time of “09:07 AM”


customer check
(hh:mi a)
in into store

BACS3413 Project II 63
COVID-19 Distance Safety System Chapter 4

checkOutTime varchar 8 Time of the “10:07 PM”


customer check
(hh:mi a)
out from the
store

status varchar 6 Status of “pass” or


customer in the “active”
store

4.4 Chapter Summary and Evaluation


In this chapter, all the related diagrams are designed to clearly define the function and
attributes that are used in this system. Besides, user interface design of the COVID-19
Distance Safety System has been illustrated with explanations for different modules.

Problem that we are facing in this chapter is the theme colour of the application. Because
our first colour is too monotonous. To overcome this problem, we search a lot of internet
resources and have discussions to get the colour that could let the user feel comfortable.
Finally, we have come out plum plate gradient colour as our application theme colour.

BACS3413 Project II 64
COVID-19 Distance Safety System Chapter 5

Chapter 5

Implementation and Testing

BACS3413 Project II 65
COVID-19 Distance Safety System Chapter 6

5 Implementation and Testing


The purpose of this chapter is to check the fulfillment of functionalities based on the
requirement. Topics that will be described include the implementation of system, testing
strategies, test plan, test data and test cases.

5.1 Implementation/ Coding


5.1.1 Implementation
In this project, several tools have been used for implementing which include android
studio and visual studio. Android studio is used to develop front-end system of mobile
application which is member version and staff version. Microsoft Visual Studio used to
develop front-end system of web version which is the website for customer who does
not download COVID-19 Distance Safety application. Furthermore, there are two
programming languages used which are HTML and Kotlin to build up this system. In
order to easily control the data, Firebase also been used in this project (Figure 5.1).
Firebase is a platform that developed by Google for mobile and web applications
(Doug, 2020).

Figure 5.1: Firebase and Traditional Database

The table below shows the lowest requirement hardware and software in order to
implement the system (Table 5.1).

BACS3413 Project II 66
COVID-19 Distance Safety System Chapter 6

Table 5.1: Minimum Hardware Requirement Implementation Resources

Role Required Tools


Staff Operating System Android 7.0+
Memory 2GB RAM
Storage 8GB or more
Screen Resolution 1024 x 600 or higher
Camera yes
Member Operating System Android 7.0+
Memory 2GB RAM
Storage 8GB or more
Bluetooth Bluetooth Version 4.0 or above with BLE
Network Access yes
Camera yes
GPS yes
Non-Member Browser Chrome Browser with version
84.0.4147.89 or any

Software

o Google Play Store

o Google Chrome – Use to Connect Firebase

5.1.2 Coding
▪ Number of persons inside the shop Module

Figure 5.2: Text Listener of Textbox inside Store List Page

BACS3413 Project II 67
COVID-19 Distance Safety System Chapter 6

Figure 5.3: Search store to reserve a slot

BACS3413 Project II 68
COVID-19 Distance Safety System Chapter 6

In the store list page, user is able to type the store name to reduce the time to scroll
down and view one by one. The code above shows that, when the user types the first
character, it will trigger the code to retrieve the store details from the database. Besides,
Figure 5.2 also shows that when the user types lowercase it will auto change to
uppercase. This is because the store name in database is uppercase.

▪ Distance Tracking Module

Figure 5.4: Variable Declaration of Bluetooth Function

Figure 5.5: Bluetooth and Location Request Permission Function

BACS3413 Project II 69
COVID-19 Distance Safety System Chapter 6

Figure 5.6: Button Clicked Function

BACS3413 Project II 70
COVID-19 Distance Safety System Chapter 6

Figure 5.7: Start Bluetooth Function

Figure 5.8: Close Bluetooth Function

BACS3413 Project II 71
COVID-19 Distance Safety System Chapter 6

Figure 5.9: Class to Receive Bluetooth Result

When the user enters distance tracking page, the system will require the Bluetooth and
Location permission (Figure 5.5). After the user click the button, the start Bluetooth
function will be triggered (Figure 5.7). At the same time, every three second the system
will auto detect the Bluetooth status and request user to enable it if the Bluetooth status
is off (Figure 5.6). In order to allow the device keep scanning the devices with the same

BACS3413 Project II 72
COVID-19 Distance Safety System Chapter 6

name, every ten seconds will call the close function and clear value inside the
BleScanCallBack class (Figure 5.9).
▪ Hospital Detection Module

Figure 5.10: Variable Declaration for Hospital Detection Module

Figure 5.11: Verify User Permission

BACS3413 Project II 73
COVID-19 Distance Safety System Chapter 6

Figure 5.12: Get User Current Location

Figure 5.13: Search Hospital by Url Link

BACS3413 Project II 74
COVID-19 Distance Safety System Chapter 6

Figure 5.14: Get Nearby Hospital Function

Figure 5.11 shows that the system will verify user location permission and get the
current location when the user allows as Figure 5.12. After the current location is
retrieved the system will pin user location with green pin and start to search nearby
hospital by using the link with attached current user longitude and latitude, radius start
from user location in meters, Api key and place type as shown in Figure 5.13. The return
result from the Url link will be mark by red pin (Figure 5.14).

BACS3413 Project II 75
COVID-19 Distance Safety System Chapter 6

Figure 5.15: Url Link for Place Details and Photo

Figure 5.16: Function to Set Variable


When the user clicks on the red pin, user will be direct to viewPlace activity. The service
shown in Figure 5.16 will the triggered the Url link in Figure5.15 to search the place
details which include the hospital name, address, phone number, longitude and latitude
and photo link. The distance from the user to hospital will be calculate by using
Haversine Formula in Figure 5.16. Once the system retrieved the photo link
successfully, the Picasso will display the hospital image.

▪ Social Distancing Score Module

BACS3413 Project II 76
COVID-19 Distance Safety System Chapter 6

Figure 5.17: Reset User Marks

BACS3413 Project II 77
COVID-19 Distance Safety System Chapter 6

Figure 5.18: Marks Deduct Function

BACS3413 Project II 78
COVID-19 Distance Safety System Chapter 6

Figure 5.19 Marks Deduct Function (Continued)

Figure 5.20 Bar User with Score Below Than 20

BACS3413 Project II 79
COVID-19 Distance Safety System Chapter 6

Figure 5.21 Display Score History


When the user check in the main entrance the score will reset to 100 marks. Besides the
Figure in 5.17 shows that the system will verify the user status to avoid reset the marks
two times when the user hasn’t check out from the main entrance. When the Bluetooth
return device with -73, -69, -63 will trigger the marks deduct function to deduct user’s
social distance marks (Figure 18,19). During the main entrance check in process, the
system will verify user’s social distance score and stop the user when his/her mark is
low than 20 (Figure 5.20). Figure 5.21 shows the code that retrieve social distance score
from database.

▪ Review Customer Satisfaction Module

Figure 5.22 Verify Null Values for Rating Bar

Figure 5.22 shows that the system shows an alert dialog when the rating bar value is 0.

BACS3413 Project II 80
COVID-19 Distance Safety System Chapter 6

5.2 Testing Strategies/ Approaches


5.2.1 Unit Testing
Unit testing is the essential testing for every software developer. Unit Testing defined
as the process of ensure independent component of a software are functional and work
as designed. One of the advantages of unit testing is make the cycle become easier
because it able to take less time to find the error and fix than fixing after the integration
process. Moreover, unit testing also able to reduce the cost of testing because every
error will be fix in early phase (Software Testing Methodologies, 2020).

5.2.2 White-Box Testing


White-Box Testing is one of the testing methodologies which is based on the interna
structure of the unit or system. During white box testing carried out, tester will choose
an appropriate input to test the value passing through the code and get the expected
results (SOFTWARE TESTING Fundamentals, 2020).

5.2.3 System Testing


System testing is similar with black box testing method which used to evaluate and
validates the fully and complete integrated system. The purpose is to ensure the system
fulfil the requirements and every input will have desired output. System testing will
also test the interaction between one another component which called end to end testing
scenario (Guru99.com, 2020).

BACS3413 Project II 81
COVID-19 Distance Safety System Chapter 5

5.3 Test Plan


Project Details
Student’s Lee Yi Yang Programme RSD3G6
Name
Project Title COVID-19 Distance Safety System Test Case No. 1
Module Store Current Customer Module Reference No.
(Diagram)
Actor(s) Member
Pre-requisites 1. User have to login as a member.
2. Store is available.
Dependencies 1.Member able to search store to make reservations.
Test Case

ID Test Description Test Actions/ Inputs Expected Results Actual Results Pass (P)/ Remarks
Fail (F)
1. Test search 1. Key in ‘seiko’ The system will retrieve data As expected P -
function by using from database and display store
lowercase. details
2. Test search 1. Type ‘SEIKO’ The system will retrieve data As expected P
function by using from database and display store
uppercase. details
3. Test search 1. Type ‘Seiko’ The system will retrieve data As expected P
function by mixing from database and display store
details

BACS3413 Project II 82
COVID-19 Distance Safety System Chapter 6

uppercase and
lowercase.

Project Details
Student’s Lee Yi Yang Programme RSD3G6
Name
Project Title COVID-19 Distance Safety System Test Case No. 2
Module Review Customer Satisfaction Reference No.
Module (Diagram)
Actor(s) Member
Pre-requisites 1. User have to login as a member.

Dependencies 1.Member able to submit their own feedback.


Test Case

ID Test Description Test Actions/ Inputs Expected Results Actual Results Pass (P)/ Remarks
Fail (F)
1. Test submit 1. Click Submit button Display Error Message As expected P -
function without
rating star
2. Test submit 1. Click 5th star at “Overall Display Error Message As expected P -
function by only Satisfaction” column.
rate “Overall 2. Click Submit button
Satisfaction”

BACS3413 Project II 83
COVID-19 Distance Safety System Chapter 6

3. Test submit 1. Click 5th star at “Service Display Error Message As expected P -
function by only Satisfaction” column.
rate “Service 2. Click Submit button
Satisfaction”
4. Test submit 1. Click 5th star at “Check-In Display Error Message As expected P -
function by only Time” column.
rate “Check-In 2. Click Submit button
Time”
5. Test submit 1. Click 5th star at “User Display Error Message As expected P
function by only Interface Design” column.
rate “User 2. Click Submit button
Interface Design”
6. Test submit 1. Type “Good service Display Error Message As expected P
function by only provided” in feedback
type text inside textbox.
“Feedback” 2. Click Submit button
textbox.
7. Test submit 1. Click 5th star at “Overall The system creates a new As expected P -
function by type Satisfaction” column. review id and upload
text inside 2. Click 5th star at “Service member review to
“Feedback” Satisfaction” column. database.
textbox and rate all 3. Click 5th star at “Check-In
the star. Time” column.
4. Click 5th star at “User
Interface Design” column.
5. Type “Good service
provided”
6. Click Submit button

BACS3413 Project II 84
COVID-19 Distance Safety System Chapter 6

Project Details
Student’s Lee Yi Yang Programme RSD3G6
Name

Project Title COVID-19 Distance Safety System Test Case No. 3

Module Hospital Detection Module Reference No.


(Diagram)
Actor(s) Member

Pre-requisites 1. User have to login as a member.

2. User have to ensure GPS is enable.

Dependencies 1.Member able to see all the nearby hospital with 10 km radius.

Test Case

ID Test Description Test Actions/ Inputs Expected Results Actual Results Pass (P)/ Remarks
Fail (F)
1. This module able to show 1. Click the red pin inside The system shows user As expected P -
hospital details. the map. current location and pin the
nearest hospital. The details
of hospital will be display.
2. Try to open nearby 1. Click nearby hospital The system will direct user The nearby F Add function
hospital function without button. back to home page. hospital that able to
enable GPS. activity does make user
not take back to home
action. page.

BACS3413 Project II 85
COVID-19 Distance Safety System Chapter 6

3. Try to open nearby 1. Click nearby hospital Maps will show user current As expected P -
hospital function with button. location with green pin and
enable GPS. 2. Click accept GPS request. the nearby hospital with red
pin.
4. Try to open nearby 1. Click nearby hospital Request user to allow The system F Detect
hospital by enable button. location permission does not permission
location and disable after 2. Enable location display any status for
nearby hospital loaded. permission. permission every 3-5
3. Disable location request to the seconds.
permission. user.

Project Details
Student’s Lee Yi Yang Programme RSD3G6
Name

Project Title COVID-19 Distance Safety System Test Case No. 4

Module Distance Tracking Module Reference No.


(Diagram)
Actor(s) Member

Pre-requisites 1. User have to login as a member.

2. User have to ensure Bluetooth is enable.

Dependencies 1.Member device able to detect other nearby devices.

BACS3413 Project II 86
COVID-19 Distance Safety System Chapter 6

Test Case

ID Test Description Test Actions/ Inputs Expected Results Actual Results Pass (P)/ Remarks
Fail (F)
1. Click Bluetooth button 1. Accept the Bluetooth 1. Status will show “ON” As expected P -
inside distance permission. 2. Show “start scanning
tracking. nearby device” toast
2. Click the Bluetooth
message.
image.
3.The system will inform
user when there is a
device’s RSSI value lower
than -79
2. Try to open distance 1. Click distance tracking Show Bluetooth request As expected P -
tracking without button.
enable Bluetooth. 2. Disable Bluetooth
request.
3. Try to open distance 1. Click distance tracking Show Bluetooth request. As expected P -
tracking by enable button.
Bluetooth and disable 2. Enable location
after Bluetooth button permission.
is on. 3. Disable location
permission.
4. Enable Bluetooth after 1. Click distance tracking Phone will start scan the The system require F Change the
open distance tracking button. nearby device. user to click the distance
2. Enable location button manually to tracking auto
permission. start the scanning. detect nearby
devices once
enable the
permission.

BACS3413 Project II 87
COVID-19 Distance Safety System Chapter 6

5. Click second time on 1. Click distance tracking 1. Status will show “off” As expected P -
Bluetooth button button. 2. Stop scanning Bluetooth
distance tracking 2. Enable location device.
permission.
3. Click Bluetooth button
inside distance tracking
page.
4. Click second time on
Bluetooth button inside
distance tracking page.

Project Details

Student’s Lee Yi Yang Programme RSD3G6


Name

Project Title COVID-19 Distance Safety System Test Case No. 5

Module Social Distance Score Module Reference No.


(Diagram)

Actor(s) Member, Staff

Pre-requisites 1. User have to login as a member or staff.


2. Staff have accepted camera permission.
Dependencies 1. Member able to reset their marks to 100.

2. Staff able to view member details.

BACS3413 Project II 88
COVID-19 Distance Safety System Chapter 6

Test Case

ID Test Description Test Actions/ Inputs Expected Results Actual Results Pass (P)/ Remarks
Fail (F)

1. Reset marks to 100 when 1. Member click on navigation The system will reset As expected P -
check in from main entrance drawer. member marks to
100.
2. Member click “Check in Main
Entrance”.
3. Staff click “Customer Check In”.
4. Staff Scan member qr code.
2. This module will deduct 1. Member click on “Distance The system will As expected P -
user’s social distance score. Tracking” button from navigation deduct specific marks
drawer. when Bluetooth
detected devices
2. Accept the Bluetooth permission.
close to member. The
3. Click the Bluetooth image. system will also
upload to social
distance score table.
3. Show social distance marks 1. Member click on “Social Distance The system will As expected P -
record. Score” button from navigation retrieve data from
drawer. database and display
4. Check In two times 1. Member click on navigation The system shall not As expected P -
drawer. show any error
message
2. Member click “Check in Main
Entrance”.
3. Staff click “Customer Check In”.

BACS3413 Project II 89
COVID-19 Distance Safety System Chapter 6

4. Staff Scan member QR code.


5. Staff scan member QR code for
second time.
5. Bar customer for score 1. Member click on navigation The system will show As expected P -
below than 20 drawer. error message to the
staff
2. Member click “Check in Main
Entrance”.
3. Staff click “Customer Check In”.
4. Staff Scan member QR code.

BACS3413 Project II 90
COVID-19 Distance Safety System Chapter 5

5.4 Chapter Summary and Evaluation


In this chapter, implementation and coding has been described in detail. There are few testing
methodologies implemented in this project. Testing is one of the most important part of entire
project. By using test plan and test case, the project will be clear and easy to test. By doing this,
it also reduces the error or missing part in every single component until the interaction between
modules.

BACS3413 Project II 91
COVID-19 Distance Safety System Chapter 6

Chapter 6

Discussions and Conclusion

BACS3413 Project II 92
COVID-19 Distance Safety System Chapter 6

6 Discussions and Conclusion


This chapter will discuss the summary of entire project. The summary is based on the
chapters that have been written in this report. Moreover, this chapter will also briefly
discuss the project contributions, issues and solutions of the project and also the future
works that can be take into considerations.

6.1 Summary
The purpose of this project is to help Malaysia to reduce the cases of COVID-19. Due
to the number of keep increasing rapidly day by day, every Malaysian are facing the
problem when going to shopping center. However, purchase groceries are necessary for
every people especially during MCO, CMCO and EMCO period. Before walk into the
shopping center, every customer has to queue for long time and not in a suitable safety
distance, yet this may be one of the causes of suffer coronavirus from the hidden danger.
Thus, customer and staff have to hand in hand to meet the desired effect of this system.

In this project, there is two version of mobile application for shopping centers’ member
and staff and one web-based for non-member who does not download the application.
To develop the mobile application, android studio is the only tools that selected to
develop it by using Kotlin programming language. The reason to use android studio is
because the drag and drop function in the software have increase the efficiency of
developing. On top of that, the greatest feature of the android studio for developer is
have a preview window for the developer to view without debug and run the application
for every single code when doing user interface design.

Beside from develop mobile application for the member and staff, the web-based
version also develops for non-member. This purpose of develop web-based is because
some of the customer who have not memory space inside their phone or IOS user.
Microsoft visual studio has chosen to develop the website by using Html, CSS and
JavaScript programming language. To make the process of overall project work
smoothly, incremental model has been implemented. The reason is incremental model
is flexible to change requirements which suit to our project which will be easy to
identify the error easily.

BACS3413 Project II 93
COVID-19 Distance Safety System Chapter 6

6.2 Achievements
After several months of developing, COVID-19 Distance Safety System has been fully
developed and fulfill all the requirements that listed in this project 1. All the team
members have completely built the proposed system in the time period. Moreover, user
interface of the system is easily understood by the novice and expert user. The greatest
strengths of this project are able to detect another user when walk close with the user
as what was expected. Besides, the project achieves the efficiency of check in process
in main entrance. It also has many features that allow user to shorten their time expose
in crowd. For example, the reservation to visit a store, find the nearest hospital and so
on.

In the other hand, the project required user to keep the internet connection once the
application is running. Without the internet connection, the application will not be able
to retrieve data from firebase.

6.3 Contributions
This project is a project that able to compare with the exist application that used by
Malaysian, My Sejahtera. This is because My Sejahtera are only allowed user to check
in to the place by scanning the registered qr code. Although, Malaysian are abiding the
Malaysia rule that declared by the government (scan qr code before walk into every
shop or place) yet Malaysian still not keep their social distance with other people. Thus,
this project has brought the greatest advantages to Malaysian which will makes them
follow the social distance rule. The application will keeps notify the user when the
distance with the other user is below than 1.5 meters.

From the shopping center operator perspectives, current Malaysia will give fine with
more than RM1000 to the operator who have the customer without scanning the
provided qr code. By using this COVID-19 Distance Safety System, it required the staff
to scan members’ qr code once the member step into the main entrance. So, the
shopping center operator may reduce the percentage of getting fine from the police or
plainclothes police.

6.4 Limitations and Future Improvements

BACS3413 Project II 94
COVID-19 Distance Safety System Chapter 6

The Limitations of this project are lack on the Bluetooth will deduct user marks when
other smart devices are around the user. For example, smart tv, Bluetooth earphone,
Fitness tracker and so on. This is because the smart devices also one of the devices that
using Bluetooth Low Energy to work. This limitation can be solved by upload the local
Bluetooth address and device name to the firebase. So, every time Bluetooth get the
device close with the user it will check with the data inside the firebase and deduct user
marks if the device name and address is existing in the firebase.

Second Limitation is the current user interface of the mobile application and website
still much room for improvement. For example, change the theme color to the color
which able to let the user eyes feel comfort during using the application and website.

6.5 Issues and Solutions


In this project, the greatest challenge that I faced is when dealing with Bluetooth Low
Energy (BLE) and Google Maps code. This is because I am not familiar with Kotlin
programming language and also a beginner in develop mobile application. Besides, BLE
and Google Maps also took long time to understand the logic flow of these two modules.
To shorten the time of developing, I started collect all the related research during doing
project 1 and I saw the effect soon after when develop Distance Tracking and Hospital
detection modules.

Second challenge that I faced in this project is during the initial phase, we have to come
out a technology from the hardware perspectives to reduce the cases of covid-19. We try
to do research on the NFC (Near-Field-Communication), RFID (Radio-Frequency
Identification) tag, Bluetooth Beacon and smartphones’ Bluetooth. After our discussion
with our supervisor, we decide to choose Bluetooth with Low Energy. The reason we
choose Bluetooth is because BLE consume less battery and also low cost when using the
application.

The third challenge is when develop and testing distance tracking module. During doing
testing on the physical device, the application keeps failed because Bluetooth does not
function as normal and this makes me stuck for few days to solve. After do a little
research on this problem, I able to make it work as expected and my development has
back on track.

BACS3413 Project II 95
COVID-19 Distance Safety System References

References
1. AndroidPIT. (n.d.). What is Bluetooth and how do I use it? [online] Available at:
https://www.androidpit.com/what-is-bluetooth [Accessed 15 Jul. 2020].

2. Akemi Iwaya, (2014). Is Bluetooth Faster than Wi-Fi? [online] How-To Geek. Available at:
https://www.howtogeek.com/191546/is-bluetooth-faster-than-wi-fi/ [Accessed 16 Jul. 2020].

3. Armstrong, M., 2020. Infographic: The Vital Importance Of Social Distancing. [online] Statista
Infographics. Available at: <https://www.statista.com/chart/21198/effect-of-social-distancing-
signer-lab/> [Accessed 5 December 2020].

4. Bahl, P., Doolan, C., de Silva, C., Chughtai, A.A., Bourouiba, L. and MacIntyre, C.R. (2020).
Airborne or Droplet Precautions for Health Workers Treating Coronavirus Disease 2019? The
Journal of Infectious Diseases.

5. Beaconstac.com. (2018). BLE beacon technology made simple: A complete guide to Bluetooth
Low Energy Beacons. [online] Available at: https://blog.beaconstac.com/2018/08/ble-made-
simple-a-complete-guide-to-ble-bluetooth-beacons/.

6. BRAUN Sharing Expertise. 2020. Outbreak And Spread Of The Novel Coronavirus. [online]
Available at: <https://www.bbraun.com.my/en/patients/infection-prevention-for-
patients/coronavirus.html> [Accessed 1 December 2020].

7. CodeBlue. 2020. Mysejahtera Covid-19 Hotspots Based On Infection Source, MOH Says Amid
Missing Malls | Codeblue. [online] Available at:
<https://codeblue.galencentre.org/2020/09/28/mysejahtera-covid-19-hotspots-based-on-
infection-source-moh-says-amid-missing-malls/> [Accessed 1 December 2020].

8. daneelyunus (2018). Advantages and disadvantages of Bluetooth. [online] daneelyunus.


Available at: https://daneelyunus.com/2018/09/06/advantages-and-disadvantages-of-bluetooth/
[Accessed 17 Jul. 2020].

9. dzone.com. (2015). Formula to Convert the RSSI Value of the BLE (Bluetooth Low Energy)
Beacons to Meters/Feet - DZone Open Source. [online] Available at:
https://dzone.com/articles/formula-to-convert-the-rssi-value-of-the-ble-bluet [Accessed 16 Jul.
2020].

10. Doug, S., 2020. What Is Firebase? The Complete Story, Abridged.. [online] Medium. Available
at: <https://medium.com/firebase-developers/what-is-firebase-the-complete-story-abridged-
bcc730c5f2c0> [Accessed 5 December 2020].

11. Estimote Community Portal. (n.d.). What are Broadcasting Power, RSSI and other
characteristics of a beacon’s signal? [online] Available at:
https://community.estimote.com/hc/en-us/articles/201636913-What-are-Broadcasting-Power-
RSSI-and-other-characteristics-of-a-beacon-s-signal- [Accessed 16 Jul. 2020].

BACS3413 Project II 96
COVID-19 Distance Safety System Chapter 6

12. Explain that Stuff. (2018). How does Bluetooth work? [online] Available at:
https://www.explainthatstuff.com/howbluetoothworks.html [Accessed 15 Jul. 2020].

13. Guru99.com. 2020. What Is System Testing? Types & Definition With Example. [online]
Available at: <https://www.guru99.com/system-
testing.html#:~:text=SYSTEM%20TESTING%20is%20a%20level,a%20larger%20computer
%2Dbased%20system.> [Accessed 5 December 2020].

14. Help Desk Geek. (2019). A Breakdown of File Transfer Speeds. [online] Available at:
https://helpdeskgeek.com/networking/a-breakdown-of-file-transfer-speeds/ [Accessed 17 Jul.
2020].

15. iotbymukund (2016). How to Calculate Distance from the RSSI value of the BLE Beacon.
[online] IOT and Electronics. Available at:
https://iotandelectronics.wordpress.com/2016/10/07/how-to-calculate-distance-from-the-rssi-
value-of-the-ble-beacon/#:~:text=The%20signal%20strength%20depends%20on [Accessed 16
Jul. 2020].

16. Ivankov, A. (2019). Advantages and Disadvantages of Bluetooth | Profolus. [online] Profolus.
Available at: https://www.profolus.com/topics/advantages-and-disadvantages-of-bluetooth/
[Accessed 17 Jul. 2020].

17. Laird Connect. (n.d.). What is Bluetooth Class? [online] Available at:
https://www.lairdconnect.com/support/faqs/what-bluetooth-class [Accessed 17 Jul. 2020].

18. liGo Magazine. (2014). Enjoy the Top 10 Benefits of Bluetooth. [online] Available at:
https://www.ligo.co.uk/blog/enjoy-top-10-benefits-bluetooth/#:~:text=Energy%2Defficient
[Accessed 17 Jul. 2020].

19. Melanie Pinola(2019). What Bluetooth Is and How It Works. [online] Lifewire. Available at:
https://www.lifewire.com/what-is-bluetooth-2377412 [Accessed 15 Jul. 2020].

20. smartbear.com. 2020. Software Testing Methodologies. [online] Available at:


<https://smartbear.com/learn/automated-testing/software-testing-methodologies/> [Accessed 5
December 2020].

21. SOFTWARE TESTING Fundamentals. 2020. White Box Testing - SOFTWARE TESTING
Fundamentals. [online] Available at: <https://softwaretestingfundamentals.com/white-box-
testing/> [Accessed 5 December 2020].

22. The ASEAN Post. 2020. Tracking COVID-19 To Its Genetic Origins. [online] Available at:
<https://theaseanpost.com/article/tracking-covid-19-its-genetic-origins> [Accessed 5
December 2020].

23. The Gadget Square. (2013). What is Bluetooth 4.0 and its Features? [online] Available at:
https://thegadgetsquare.com/what-is-bluetooth-4-0-and-its-
features/#:~:text=Features%20Of%20Bluetooth%204.0%3A [Accessed 16 Jul. 2020].

BACS3413 Project II 97
COVID-19 Distance Safety System Chapter 6

24. UNDP. 2020. Coronavirus Disease COVID-19 Pandemic | UNDP. [online] Available at:
<https://www.undp.org/content/undp/en/home/coronavirus.html> [Accessed 5 December
2020].

25. www.streetdirectory.com. (n.d.). 10 Benefits Of Bluetooth. [online] Available at:


https://www.streetdirectory.com/travel_guide/34455/phones/10_benefits_of_bluetooth.html
[Accessed 17 Jul. 2020].

26. Y.L.M., D., 2020. Aside From Covid-19, These Viruses Also Go From Bats To Humans.
[online] The Star Online. Available at: <https://www.thestar.com.my/lifestyle/health/tell-me-
about/2020/02/13/aside-from-the-coronavirus-these-viruses-go-from-bats-to-man> [Accessed
5 December 2020].

BACS3413 Project II 98
Appendices

Appendix A User Guide

In order to run the system, there are two documents included in the user guide.

System Document

• System (hardware and software requirements)

Hardware

Role Required Tools


Staff Operating System Android 7.0+
Memory 2GB RAM
Storage 8GB or more
Screen Resolution 1024 x 600 or higher
Camera yes
Member Operating System Android 7.0+
Memory 2GB RAM
Storage 8GB or more
Bluetooth Bluetooth Version 4.0 or above with BLE
Network Access yes
Camera yes
GPS yes
Non-Member Browser Chrome Browser with version
84.0.4147.89 or any

Software

o Android Studio

o Microsoft Visual Studio

o Google Chrome – Use to Connect Firebase


COVID-19 Distance Safety System Chapter 6

• Installation

1. Click “Open an Existing Project”

2. Select “COVID19ShoppingCentre” project from your document and click


“Ok”.

BACS3413 Project II 100


COVID-19 Distance Safety System Chapter 6

3. Enable the USB Debugging option under Settings > Developer options.
*Make sure developer mode is turned on.

4. Connect Smartphone to laptop with a usb cable.

5. Select the connected phone from the device list.

BACS3413 Project II 101


COVID-19 Distance Safety System Chapter 6

6. Click run button as the diagram show at above.

7. Wait for Android Studio install the application to the phone.

Operational Document

▪ Distance Tracking Module (Member Version)

a) Start scan distance

i. Click allow to on Bluetooth inside the phone.

ii. Click on the Bluetooth image to change the status to on.

Notice: User have to keep the application in this page to make the Bluetooth scan nearby
device.

▪ Hospital Detection Module (Member Version)

BACS3413 Project II 102


COVID-19 Distance Safety System Chapter 6

a) Get Nearby Hospital Details

i. Users have to click on one of the options except “Deny”.

BACS3413 Project II 103


COVID-19 Distance Safety System Chapter 6

ii. If user would like to view the details of the location, the user may click on the
desired red pin from the map.

BACS3413 Project II 104


COVID-19 Distance Safety System Chapter 6

iii. Click on the phone button and phone number will direct user to phone call.

iv. Click “SHOW ON GOOGLE MAP” to direct to google map and the direction will
be show to the user.

BACS3413 Project II 105


COVID-19 Distance Safety System Chapter 6

This page is intentionally left blank to indicate the back cover. Ensure that the back cover is black in
color.

BACS3413 Project II 106

You might also like