Table of Contents TOC o “1-3” h z u Introduction

Table of Contents TOC o “1-3” h z u Introduction: PAGEREF _Toc524474427 h 1I. GENERAL PRESENTATION OF PAGEREF _Toc524474428 h 4THE PROJECT PAGEREF _Toc524474429 h 4Chapter 1: General presentation of the project PAGEREF _Toc524474430 h 5Introduction: PAGEREF _Toc524474431 h 5I. Project description PAGEREF _Toc524474432 h 5II. Presentation of the host organization PAGEREF _Toc524474433 h 5II.2 6MWT PAGEREF _Toc524474434 h 12II.3 6MWD PAGEREF _Toc524474435 h 13III.6 Sprint Backlog: PAGEREF _Toc524474436 h 25III.7 Analysis Class Diagram: PAGEREF _Toc524474437 h 26III.7 State Machine Diagram: PAGEREF _Toc524474438 h 28III.8 Application Architecture: PAGEREF _Toc524474439 h 28III.8.1 IOS App Architecture: PAGEREF _Toc524474440 h 28III.8.1.1MVC: PAGEREF _Toc524474441 h 29III.8.2 Cordova Plugin Architecture: PAGEREF _Toc524474442 h 29III.8.2.1State Pattern: PAGEREF _Toc524474443 h 29III.9 Conclusion: PAGEREF _Toc524474444 h 30IV. First Sprint PAGEREF _Toc524474445 h 31IV.1 Introduction: PAGEREF _Toc524474446 h 32IV.2 Sprint Backlog: PAGEREF _Toc524474447 h 32IV.3 Analysis: PAGEREF _Toc524474448 h 33IV.3.1 Use case Diagram: PAGEREF _Toc524474449 h 33V.3.2 Sequence Diagram: PAGEREF _Toc524474450 h 37IV.4 Design: PAGEREF _Toc524474451 h 41IV.4.1 Class Diagram: PAGEREF _Toc524474452 h 41IV.4.2 Sprint Results: PAGEREF _Toc524474453 h 42IV.5 Conclusion: PAGEREF _Toc524474454 h 42V. SECOND Sprint PAGEREF _Toc524474455 h 43V.1 Introduction: PAGEREF _Toc524474456 h 44V.2Cordova plugin Role: PAGEREF _Toc524474457 h 44IV.2 Sprint Backlog: PAGEREF _Toc524474458 h 45IV.3 Analysis: PAGEREF _Toc524474459 h 46IV.3.1 Use case Diagram: PAGEREF _Toc524474460 h 46V.3.2 Sequence Diagram: PAGEREF _Toc524474461 h 48III.7 State Machine Diagram: PAGEREF _Toc524474462 h 51IV.4 Design: PAGEREF _Toc524474463 h 52IV.4.1 Class Diagram: PAGEREF _Toc524474464 h 53IV.4.2 Sprint Results: PAGEREF _Toc524474465 h 53IV.5 Conclusion: PAGEREF _Toc524474466 h 53VI. Third Sprint PAGEREF _Toc524474467 h 54VI.1 Introduction: PAGEREF _Toc524474468 h 55VI.2 Sprint Backlog: PAGEREF _Toc524474469 h 55IV.3 Analysis: PAGEREF _Toc524474470 h 55IV.3.1 Use case Diagram: PAGEREF _Toc524474471 h 55V.3.2 Sequence Diagram: PAGEREF _Toc524474472 h 58V.4 Design: PAGEREF _Toc524474473 h 59V.4.1 Class Diagram: PAGEREF _Toc524474474 h 59V.4.2 Sprint Results: PAGEREF _Toc524474475 h 60V.5 Conclusion: PAGEREF _Toc524474476 h 60VII. Fourth Sprint PAGEREF _Toc524474477 h 61V.1 Introduction: PAGEREF _Toc524474478 h 62V.2Cordova plugin Role: PAGEREF _Toc524474479 h 62VII.2 Sprint Backlog: PAGEREF _Toc524474480 h 62IV.3 Analysis: PAGEREF _Toc524474481 h 63IV.3.1 Use case Diagram: PAGEREF _Toc524474482 h 63V.3.2 Sequence Diagram: PAGEREF _Toc524474483 h 65V.4 Design: PAGEREF _Toc524474484 h 66V.4.1 Class Diagram: PAGEREF _Toc524474485 h 66V.4.2 Sprint Results: PAGEREF _Toc524474486 h 67V.5 Conclusion: PAGEREF _Toc524474487 h 67VII. Fifth Sprint PAGEREF _Toc524474488 h 68VI.1 Introduction: PAGEREF _Toc524474489 h 69VI.2 Sprint Backlog: PAGEREF _Toc524474490 h 69IV.3 Analysis: PAGEREF _Toc524474491 h 70IV.3.1 Use case Diagram: PAGEREF _Toc524474492 h 70V.3.2 Sequence Diagram: PAGEREF _Toc524474493 h 73V.4.1 Class Diagram: PAGEREF _Toc524474494 h 75V.4.2 Sprint Results: PAGEREF _Toc524474495 h 76V.5 Conclusion: PAGEREF _Toc524474496 h 76VII. Sixth Sprint PAGEREF _Toc524474497 h 77I Introduction: PAGEREF _Toc524474498 h 78II Cordova plugin Role: PAGEREF _Toc524474499 h 78III Sprint Backlog: PAGEREF _Toc524474500 h 78IV Analysis: PAGEREF _Toc524474501 h 79IV.1.1 Use case Diagram: PAGEREF _Toc524474502 h 79IV.1.2 Sequence Diagram: PAGEREF _Toc524474503 h 83IV.1.3 State Machine Diagram: PAGEREF _Toc524474504 h 85V Design: PAGEREF _Toc524474505 h 85V.1.1 Class Diagram: PAGEREF _Toc524474506 h 85V.1.2 Sprint Results: PAGEREF _Toc524474507 h 86VI Conclusion: PAGEREF _Toc524474508 h 86
List Of Figures
TOC c “Figure” Figure 21: Class Diagram OF the Cordova Plugin PAGEREF _Toc524474509 h 27
Figure 23: State Machine Diagram OF the Cordova Plugin PAGEREF _Toc524474510 h 28
Figure 24: MVC PAGEREF _Toc524474511 h 29
Figure 25: State Pattern PAGEREF _Toc524474512 h 29
Figure 26: Sprint 1 Use case PAGEREF _Toc524474513 h 33
Figure 27: AUTHentification Use case PAGEREF _Toc524474514 h 34
Figure 28: Authentification Sequence Diagram PAGEREF _Toc524474515 h 38
Figure 29: PERMISSIONS Sequence Diagram PAGEREF _Toc524474516 h 39
Figure 30: gps Accuracy updates Sequence Diagram PAGEREF _Toc524474517 h 40
Figure 31: STOP Sequence Diagram PAGEREF _Toc524474518 h 41

List Of Tables
TOC c “Table” Table 1: Product Backlog PAGEREF _Toc524474519 h 25
Table 2: Sprint Backlog PAGEREF _Toc524474520 h 26
Table 3: Sprint 1 Backlog PAGEREF _Toc524474521 h 33
Table 4: Register Use case PAGEREF _Toc524474522 h 34
Table 5: LOGIN Use case PAGEREF _Toc524474523 h 35
Table 6: Permissions Use case PAGEREF _Toc524474524 h 35
Table 7: Permissions Use case PAGEREF _Toc524474525 h 36
Table 8: Stop 2mwt Use case PAGEREF _Toc524474526 h 37
Table 15: Sprint 2 Backlog PAGEREF _Toc524474527 h 70

We Will Write a Custom Essay Specifically
For You For Only $13.90/page!


order now

Dedication
From the depths of my heart
And with the greatest pleasure in this world?
I dedicate this work, to my dear father Mahmoud and dear mother Naima
And to my brothers Habib, Jed and Mounir and my sister Hela.
For all the guidance, and support that they gave me?
For all the sacrifices and the great love?
For all they have endured to satisfy all my needs and wishes?
To reach this specific day
To Khouloud Zayati the one and only
It is in this testimony that?
I wish to show them my sincerest gratitude and appreciation
Special thanks to all my friends for their fraternities and their continuous support
Always giving me support?
Always helping me to succeed?
Always helping me to find self-confidence?
Always pushing me to do anything I put my mind to?
Thank you for being there when I needed you
To all of you,?I dedicate this work.

Acknowledgements
I would like to express my sincere gratitude to the people who have allowed me to carry out my work through their sincere collaborations.
First, I would like to give special thanks to my honourable supervisor Mr. Ahmed Ayari and Ms. Manel Khiari for their proper direction, supporting assistance and guidelines in coordinating during the whole project. I am really grateful for their patience and the trust they have put on me.
Then, I would like to say thank you to all of the staff of Digit-U for their guidance and support and especially Ms. Asma Dridi our talented Scrum Master and project manager, Mr. Abderrahmen Ben Chaâbén, our tester and quality manager and Marwa Ben Salem a mobile developer, who by their judicious advice, criticism, encouragement, availability and their permanent monitoring of work, was able to enlighten me on the route to follow to complete this work and for their criticism, their encouragement, their availability as well as for welcoming me and given the means to complete this course in the best conditions.
Furthermore, I would also like to acknowledge all the jury members for their presence today for their collaboration during the examination of this work. Last but not least, my personal thanks go to all my professors for their efforts and the quality of the education during our study
Introduction:Insuring Houses or cars by paying for a contract with incomprehensible content and sometime useless option, is what characterize insurance.

Having to understand the needs and apply them in choosing the insurer, is what make it difficult to get the contract that we really need.
Smartphone’s market is in full evolution from year to another. Those phones, who have the intelligence equivalent to a computer, are no longer a mean of communication only, but, they became an inseparable gadget that people are using daily. And by providing internet within them, they went from just a way to communication to a way of getting information, achieving task remotely and even buying and paying without the need of been present physically.

In recent years, the digital transformation has been a major challenge, and one that has not escaped this emergence is the insurance sector. It is now essential to know and adapt to new consumer habits, to propose new relationships between insurers and policyholders, and to meet their needs for simplicity, efficiency and immediacy.

Mobile applications are thus an integral part of the innovation and digitization initiatives that are required in the insurance world, which result the presence of two strong trends standing out today: integrating mobile into an Omni-channel strategy and creating a positive mobile experience.

For the past few years, we have been seeing a presence of mobile applications in this sector. In fact, according to the article published in LesEchos.fr, Mai 2014, 80% of the French insurance players offered at least one mobile application. Basically, those Mobile application could be categorized into three families:
The essentials: they present the basic features of contract management and claims, which are the heart of the insurance business.

Practices: services that troubleshoot and simplify the lives of users like sending needed document to make contract.

The specific: often the subject of full applications, they are proposals and ancillary services that sometimes address a very specific clientele.

With this project, we aim to solve those issues and put technology in service of insurer and their client by developing an android mobile application: Leocare.
The remaining of this report is organized into 9 chapters:
Chapter 1 is a description of the project environment. It covers the presentation of Digit-U Company, the hierarchy of all contributors in this project,
Chapter 2 is about the problem description and the objective of the internship, and also a look at the requirement aimed to be satisfied and goals to be achieved and explains some concepts related to the general context of the project. We will finish by presenting the agile development environment in which I was able to work, by comparing to other developing environment and the means used within the process.

Chapter 3 describes the architecture, the technology used and the steps taken to design and model the application core.

Chapter 4 represents Sprint 1: User Management
Chapter 5 represents Sprint 2: House/Apartment Quote
Chapter 6 represents Sprint 3: Car Quote
Chapter 7 represents Sprint 4: Contract
Chapter 8 represents Sprint 5: Wallet
Chapter 9 represents Sprint 6: Chat, Visio and Event
Chapter 1:
I. GENERAL PRESENTATION OFTHE PROJECT
Chapter 1: General presentation of the projectIntroduction:This first preliminary chapter will have as objective the presentation of the general
framework of the project, it gives us first a description of the project and its working
environment, then a presentation of the hosts organizations as well as a presentation of the
subject, and finally, we present our methodological framework.

I. Project descriptionThe present project, “2MWT”, is being carried out as part of the preparation of the Graduation Project for the Engineering Diploma at the Private Higher School of Engineering and Technology (ESPRIT). This work was conducted by Ben Abeda Mouti at Orikami B.V and MS Sherpa B.V in Nijmegen. It consists in developing a mobile application and Cordova Plugin to Collect Sensors Data
II. Presentation of the host organizationII.1 Orikami
Figure 1: Presentation of the logo of OrikamiOrikami is a Dutch data Science Company, it is located in the Center of Nijmegen, which for the most part works on a commission basis. There are about 15 employees and there is a good mutual atmosphere.

Orikami’s mission is to make the data that a company collects transparent to the company itself. They do this with a team of people who each have their own expertise. The way to the comprehensible data is written down step by step, so that it is reproducible for use in studies. Orikami provides results that can be shared directly by the company. Orikami also has two own products; namely MOMALA and MS Sherpa.
Website: https://www.orikami.nl/Address: Ridderstraat 27, 6511 TM Nijmegen
Telephone: +31 024 301 0100II.2 MS Sherpa

Figure2: Presentation of the of MS Sherpa
MS Sherpa is a project in which Multiple Sclerosis (MS) patients can make a prediction of how the course of their disease will look through various self-tests. Patients receive a daily schedule in a mobile application, asking for specific questions or tests. With the results of these questions and tests, a profile predicts how the progression of their disease will look like. The project currently consists of three applications, namely;
1. A mobile app for both iOS and Android. This allows the MS patients to see their personal prediction and do different tests.

2. A dispatcher, this is a server that runs in the background and ensures that tasks and tests for MS patients are scheduled.

3. A wearable application. For the collection of medical data, one can use a fitbit. The data collected from it goes via an application to the database.

Website: https://www.orikami.nl/Address: Ridderstraat 27, 6511 TM Nijmegen
Telephone: +31 024 301 0100III. Presentation of the university

Figure 3: Presentation of Esprit Logo
ESPRIT (‘Private Higher School of Engineering and Technology): Is a private engineering
school in Tunisia based in Ariana and approved by the Ministry of Higher Education and
Scientific Research.

Website: http://esprit.tn/
Address: 18, rue de l’Usine – ZI Aéroport Charguia II 2035 Ariana
Telephone: (+216) 71 94 15 41
IV. Description of the subject
The core objective of this internship is to create a Mobile Application and a Cordova Plugin to provide the 2MWT, the 2MWT is a variant of the frequently used 6-Minute Walking Test
to assess walking endurance, that takes less time to perform and is a smaller burden to persons with MS, especially to those with decreased mobility.

V. Tools Used
V.1 Slack
In order to facilitate communication between the members of all Orikami teams, we resorted to using the Slack tool.

It is a communication tool that allows each team to gather all their exchanges and documents in a single application.

He offered us several features that facilitated the workflow in our team 😕 Instant messaging: Slack offers the possibility to compose different
focus groups according to the teams and projects of each company.

? Archiving and Content Search: Allows you to index all documents
shared and all related conversations.

Figure 4: logo of Slack
V.2 TrelloIn Orikami we use Trello to manage Sprints, it is a visual collaboration tool that gives you, and everyone you work with, perspective on what needs to get done. A Trello board is flexible and open to interpretation, meaning you can use it to apply any productivity frameworks you’re learning about here to your daily routine. From creating powerful to-do lists to organizing all of your documents and brainstorms, Trello is a great productivity tool to help you manage your time and projects effectively.

Figure 5: Example of Trello Dashboard
V.3 Asana
Asana is an online project management system. In Orikami we use Asana to create projects, assign tasks to our team members, comment,share documents and set schedule all in one interface.

Figure 6: Example of Asana Dashboard
Conclusion
In this chapter we exposed the background of the project, the host organism and the context of the internship. The next chapter will cover the State of the art by presenting the problematic and some existent solution, also the aim of this project by the solution proposed and the methodology adopted for our project.

Chapter 2:
STATE OF THE ART
Chapter 2: State of the art
Introduction
Throughout this chapter, we will first present briefly the problematic, what solution is
already in the market , what we propose as a solution and what technologies used .We conclude by the chosen methodology to manage our project life cycle.
I. PROBLEMATIC
Multiple sclerosis (MS) is an unpredictable, often disabling disease of the central nervous system in which the immune system attacks and damages the insulating covers (myelin) of the nerve cells in the brain and spinal cord. This disrupts communication within the nervous system, resulting in a range of signs and symptoms, including physical, mental, and sometimes psychiatric problems
About half of the MS population is cognitively impaired, affecting their employment status and social functioning. Walking limitations are also among the most visible manifestations of MS.Some people with severe MS may lose the ability to walk independently or at all.

II. Study of the existing
In order to deepen our understanding of the subject and to have a clearer idea of our project, we conducted a study on some mobile applications that fit into the same framework as our work and to achieve a better understanding of Application framework of our project.

II.1 Vyntus WALK

Figure 7: Sample Screenshot of the Vyntus WALK
Vyntus WALK lets patients perform a six-minute walk test (6MWT) wearing wireless sensors that communicate data to a tablet PC. The workflow-driven application seamlessly integrates with our SentrySuite® diagnostic platform for central data management and reporting.

• Recommended protocol by the American Thoracic Society (ATS)
• Mobile solution—works with a 7″ tablet PC and interfaces with the Nonin WristOx2® 3150 pulse oximeter using secure Bluetooth® communication
• Complementary data—lets you manually enter blood pressure, oxygen supply, oxygen supply type, rate of perceived exertion and Bode index
• Quality checks—helps check the credibility of your data
• Sensor-type flexibility—can be used with soft, flex, and forehead and earclip SpO2 sensor types
• Connect—can be used as a stand-alone device or connected to SentrySuite software
• Ideal for patients in pulmonology, cardiology, pediatrics, physical therapy, rehabilitation medicine, rheumatology, geriatrics and neurology
II.2 6MWT
Figure 8: Sample Screenshots of the 6MWT
The six-minute walk test (6MWT) measures the distance an individual is able to walk over a total of six minutes on a hard, flat surface. The goal is for the individual to walk as far as possible in six minutes. The individual is allowed to self-pace and rest as needed as they traverse back and forth along a marked walkway. Clinicians such as Doctors, Nurses, Exercise Physiologists, Physiotherapists and other Allied Health Staff are involved in the process of 6MWT.

II.3 6MWD
Figure 9: Sample Screenshots of the 6MWD
This a simple app that makes it easy to calculate predicted 6 minute walk for your patients. You can calculate using metric or imperial system.

III.OUR SOLUTION
As mentioned in the introduction, the 2MWT (2-Minute Walking Test) has been proposed as a variant of the frequently used 6-Minute Walking Test to assess walking endurance.

It takes less time to perform and is a smaller burden to persons with MS, especially to those with decreased mobility.

The 2MWT test will collect more and good quality data (Accelerometer, Battery ,Device Motion, Gyroscope..).

IV. Working environment
IV.1 Swift
Swift is a fantastic way to write software, whether it’s for phones, desktops, servers, or anything else that runs code. It’s a safe, fast, and interactive programming language that combines the best in modern language thinking with wisdom from the wider Apple engineering culture and the diverse contributions from its open-source community. The compiler is optimized for performance and the language is optimized for development, without compromising on either

Figure 10: Logo Swift
IV.2 Xcode is a Mac application which provides a programming environment (editor, documentation, project manager, debugger and compiler) for writing scripts and applications. It is especially suited for writing programs in C, C++, Objective C, Cocoa, Ruby and Python. XCode is installed on all the CoMPLEX computers and can also be downloaded for free from the Mac Dev Center after you sign up for a free account.

Figure 11: Xcode Tool
IV.5 CocoaPodsCocoaPods manages library dependencies for your Xcode projects.

The dependencies for your projects are specified in a single text file called a Podfile. CocoaPods will resolve dependencies between libraries, fetch the resulting source code, then link it together in an Xcode workspace to build your project.

Ultimately the goal is to improve discoverability of, and engagement in, third party open-source libraries by creating a more centralized ecosystem.

Figure 12: Xcode Tool
IV.6 Apache Cordova
Apache Cordova is an open-source mobile development framework. It allows you to use standard web technologies – HTML5, CSS3, and JavaScript for cross-platform development. Applications execute within wrappers targeted to each platform, and rely on standards-compliant API bindings to access each device’s capabilities such as sensors, data, network status, etc.

Use Apache Cordova if you are:
a mobile developer and want to extend an application across more than one platform, without having to re-implement it with each platform’s language and tool set.

a web developer and want to deploy a web app that’s packaged for distribution in various app store portals.

a mobile developer interested in mixing native application components with a WebView (special browser window) that can access device-level APIs, or if you want to develop a plugin interface between native and WebView components.

Figure 13: Apache Cordova
IV.7 JavaScript
Javascript is a dynamic computer programming language. It is lightweight and most commonly used as a part of web pages, whose implementations allow client-side script to interact with the user and make dynamic pages. It is an interpreted programming language with object-oriented capabilities. JavaScript was first known as LiveScript, but Netscape changed its name to JavaScript, possibly because of the excitement being generated by Java. JavaScript made its first appearance in Netscape 2.0 in 1995 with the name LiveScript. The general-purpose core of the language has been embedded in Netscape, Internet Explorer, and other web browsers.

Figure 14: Logo JavaScript
IV.8 AWS Mobile SDK
The AWS Mobile SDK helps you build high quality mobile apps quickly and easily. It provides access to AWS Mobile services, mobile-optimized connectors to popular AWS data and storage services, and easy access to a broad array of other AWS services.

Figure 15: Logo AWS
V. Chosen Methodology
To reduce the complexity of problems and meet business requirements in a shorter time and in a cost-effective way, software development requires following a working methodology that guarantees control throughout the development cycle and provides a clear visibility on projects. At Orikami , we opt for agile methodologies and more specifically the Scrum methodology.

V.1 Agile Methodology
Agile software development is based on an incremental, iterative
approach. It is apt to changing requirement over time and encourages constant feedback from
end users. Teams work on iterations of product over a period of time, where this work is
organized into a backlog that is prioritized based on functionality or customer value and
needs. The main goal for each iteration is to deliver a functional product. Business
stakeholder along with developers work together to put customer needs and company goals
within the product.

Figure 16: Agile Methodology
V.1.1 ADVANTAGES OF AGILE:
The dislike of the rigid and linear methodologies leads to the evolution of Agile methodology
which focus on flexibility, continuous improvement and speed. below some advantages of
Agile:
• Change is embraced: Agile methodology embrace changes. It’s easy to make changes
at any time during any phases. There is always an opportunity for the team to refine
and include changes to the project in a matter of weeks.

• Customers are heard: Every iteration result a functional delivery, which gives the
opportunity to the customers to have a vision about the final product and to express
more his needs.

•Continuous improvement: Team members will make use of the feedbacks received
from customers throughout the project, to improve the next iterations. Those iterations
are a manageable unit that help to focus on high-quality development, testing andcollaboration, they help on minimizing bugs and solving them in a quick pace.

V.1.2 DISADVANTAGES OF AGILE:
It is true that flexibility is positive, but it presents some drawbacks. Delivery date is hard to
fix and in many case, final product can be different than original view.

Next is some disadvantage of Agile:
• Planning can be less concrete: Agile is based on time-boxed delivery which can’t be
neglected in many cases as project managers reprioritizing tasks and re-schedule items
and that cause delay on delivery time. In addition, sprints or iterations can be added at
any time and that increase the timeline period.

• Team must be knowledgeable: Agile teams are usually small, and that impose that
they must be skilled in a variety of area.

• Documentation can be neglected: team members may give less importance to
documentation over working software which is the preference of Agile Manifesto.

Team members should balance their focus between documentation and discussion to
guaranty the project success.

V.2 Scrum Framework
Agile is a philosophy implemented by many frameworks like Scrum. Scrum focus on
delivering software early and every iteration, it embraces changes and continuous
improvement. Fixed-length iterations, called sprints allow the team to ship software on a
regular pace. after each one, Scrum members meet to plan next steps. Scrum have a set of
roles, responsibilities and meetings that never change. There are four type of meeting: sprint
planning, daily stand-up, sprint demo, and sprint retrospective.

Figure 17: Scrum Model
Scrum have three main roles:
• Product Owner: Agile is based on time-boxed delivery which can’t be neglected in
many cases as project managers reprioritizing tasks and re-schedule items and that
cause delay on delivery time. In addition, sprints or iterations can be added at any
time and that increase the timeline period.

• Scrum Master: Agile teams are usually small, and that impose that they must be
skilled in a variety of area.

• Scrum Team: team members may give less importance to documentation over
working software which is the preference of Agile Manifesto. Team members should
balance their focus between documentation and discussion to guaranty the project
success.

V.3 Choice of Scrum Methodology
As a piece of software is being developed using traditional methods, the release intervals slow down and become less frequent over time. This is a result of having too many features that need to be incorporated and not enough time to implement them. This common occurrence can be avoided with scrum because of techniques like sprints and backlogging. And to conclude, the reason why to choose Scrum is the fact that it’s about humanizing the process so that a team can optimize its pursuit of a goal. It can make your team better and in turn it can make a better product.

IV. CONCLUSION
This chapter allowed a brief description of the problematic, the presentation of some existent solution and the working environment . this chapter presented the aim of this project by the solution proposed and will conclude by the methodology adopted for our project. The next chapter will cover the the Sprint 0 about Specification Analysis.

Chapter 3:
III SPRINT 0: SPECIFICATIONS
ANALYSIS
Chapter 3: III SPRINT 0: SPECIFICATIONS
ANALYSIS
Introduction
In this section, we will start by introducing the actors for the IOS Application. Then, we will specify the different requirement of the mobile app and Cordova Plugin. After, we will present the general use case diagram and Class
Class diagram, the Product Backlog, the Sprint Backlog and we conclude with the chosen
Architecture for every Application and Plugins.

III.2 ACTORS IDENTIFICATION:
We have two actors:
? Mobile application and Cordova plugin user: MS Patient plays a main role, he will be the responsible of the 2MWT Test.

III.3 REQUIREMENTS SPECIFICATION:
Each and every software or application has a set of functional and non-functional
requirements describing the tasks or services that it is built to deliver or execute. These tasks
essentially specify what the system should do and should have in order to prevent failure. In
next two subsections we will specify the functional and non-functional requirement.

III.3.1 FUNCTIONAL REQUIREMENTS:
Functional requirements describe the set of tasks and services that within a software or
application, that is built to deliver or execute. they define the core of the software
Following are the functional requirements for this project:
?The plugin and the app should use a a cross-platform library (Sensing Kit) to collect sensor data.

?The app and the Cordova should records sensor data to CSV files.

?Zip files and upload them to S3.

?A recording should be split in multiple stages. Every stage should have own directory of CSV Files:
Stage 1: Will send GPS accuracy updates, so we can wait for a good GPS signal.

Stage 2: Will playback countdown audio (5 … 1), so the user can put the smartphone in his pocket.

Stage 3: Will automatically finish after 2 minutes.

. Screen ON or OFF : collecting data from Sensors.

.The Cordova Plugin uses events instead of callbacks.In the callback model – which is default for Cordova – every method invocation receives a single response through a callback.In the event model, there is a single event emitter which emits events. Every methodinvocation emit an event as a response. Native code can emit additional events to notifyabout matters such as GPS accuracy
. Retry failed uploads with a back off policy until upload succeeds
. Restart upload from beginning after app crash
III.3.2 NON-FUNCTIONAL REQUIREMENTS:
. Resume upload from the middle after app crash (Multipart upload)
. Show notification per upload
III.4 GENERAL USE CASE DIAGRAM:
Often, project management and users are not computer scientists. These people need a simple
way to express their needs. This is precisely the role of use cases diagrams that collect,
analyze and organize the needs and to identify key features of a system. It is thus the first step
of analyzing a UML system.

A use case diagram capture the behavior of a system, a subsystem, a class or a component
such as a user sees the outside. It divides the system functionality into coherent units, use
cases, that makes sense to the actors. Use cases are used to express the needs of users of a
system, so they are user-oriented vision of what needs instead of a computer vision.

For our projects, we have elaborated a general use case diagram for the Mobile App and Cordova plugin describing the different scenarios that the user can do when using the application or the plugin featured in the next diagrams:

FIGURE 18: 2MWT APP USE CASE DIAGRAM

FIGURE 19: 2MWT PLUGIN USE CASE DIAGRAM
III.5 PRODUCT BACKLOG:
As Scrum guidelines present, the product owner, the Scrum Master and the Scrum team must
elaborate an artefact called “product Backlog” to specify the different requirement, the
priorities of the tasks and the dates of sprints. It includes the number of sprints with the
specification of the tasks to realize during each sprint. Below is the backlog product
ID Name Story Priority Effort
1 2MW Test Stage One As a product owner I want users to be authenticated to access 1 30
As a user I want to sign In 2 As a user I want to set 2MWT Test Name 3 As a product owner I ask the user to enable Sensors Permissions , GPS Permissions, Notification Permissions even if they are not enabled. 4 As a product owner I Create and I save a Document containing Stage One Folder with the name of 2MWT Test in the phone storage. 5 As a user I want to start looking for best GPS Accuracy. 6 As a product owner I start Stage One: I send GPS accuracy updates. 7 As a product owner I start collecting Data sensors. 8 As a product owner I record Data sensors into CSV files. 9 As a product owner I save CSV files into folder Stage One. 10 As a user I want to confirm for the best GPS Accuracy 11 As a product owner if the user ask to stop the 2mwt test I stop collecting data and I delete the entire folder. 12 2 2MW Test Stage Two As product owner I create Stage Two folder into 2MWT document. 12 30
As a product owner I want the user to wait for 5 seconds 13 As a product owner I play 5 Countdown Audio. 14 As a product owner I start collecting Data sensors. 15 As a product owner I record Data sensors into CSV files. 16 As product owner I play a notification Sound and the vibration to notify the user that the stage 2 is finished. 17 As a product owner I save CSV files into folder Stage Two. 18 3 2MW Test Stage Three As a user I want to Start 2mwt Countdown Stage. 19 30
As a product owner I ask the user to wait for 2 minutes , lock and put his phone into his pocket. 20 As a product owner I create Stage Three folder into 2MWT document. 21 As product owner I record Data sensors into CSV files. 22 As a product owner I notify the user that 2mwt test is finished with sound notification and vibration. 23 As a product owner I save CSV files into folder Stage Three. 24 As a product owner I notify the user if he want to stop the 2mwt test. 25 As a product owner if the user ask to stop the 2mwt test I stop collecting data and I delete the entire folder. 26 As a user I want to finish the 2mwt test. 27 4 2MWT Uploader As a product owner I zip the folder . 28 15
As a product owner I check if there is other 2mwt Tests in the phone storage and upload all the tests into S3 storage 29 As a product owner I delete all the tests from the phone storage. 30 Table SEQ Table * ARABIC 1: Product BacklogIII.6 Sprint Backlog:After product backlog scrum team and scrum master elaborate the Sprint backlog to specify task to be done for each Sprint. Those tasks are chosen according to priority and information about it. If a task is not clear or depend on other task it will be delayed to the next sprint till all requirement is prepared.

Sprint Task
Sprint 0 Specifications and analysis
Sprint 1 Stage One For The IOS App
Sprint 2 Stage One for The IOS Cordova Plugin
Sprint 3 Stage Two for The IOS App
Sprint 4 Stage Two for The IOS Cordova Plugin
Sprint 5 Stage Three for The IOS App
Sprint 6 Stage Three for The IOS Cordova Plugin
Table SEQ Table * ARABIC 2: Sprint BacklogIII.7 Analysis Class Diagram:
Figure 20:Class Diagram OF THE MOBILE APP

Figure SEQ Figure * ARABIC 21: Class Diagram OF the Cordova PluginIII.7 State Machine Diagram:
Figure 2 SEQ Figure * ARABIC 3: State Machine Diagram OF the Cordova PluginIII.8 Application Architecture:III.8.1 IOS App Architecture:For our IOS App we use MVC pattern as structure to our project in order to simplify development, testing, and maintenance. However, rather than focusing on the relationship or interaction between specific objects and types, the MVC pattern is applied to the entire application.
III.8.1.1MVC:The MVC pattern is the idea of separation of concerns, which is why this phrase often comes up. Separation of concerns just means keeping the different sections of an application apart from one another and is done to make those parts easier to develop, maintain, and test.
The MVC pattern follows a convention of using four different sections in an application:
The model, which is the M in MVC. The model contains the application’s data. ?
 The view, which is the V in MVC. The view generates the output from the model ?that is shown to the user. ?
 The controller, which is the C in MVC. The controller responds to user interaction and is responsible for updating the model and the view to reflect change in the application state. ?

Figure 2 SEQ Figure * ARABIC 4: MVCIII.8.2 Cordova Plugin Architecture:For our Cordova plugin we have multiple states: IDLE, RUNNING, STOPPED, ERROR
So for that we need to have an object that represent the state of the plugin and we want to change the state by changingthat object so The State Pattern is useful for that.

III.8.2.1State Pattern:The State Pattern allows an object to alter its behavior when its internal state changes. The object will appear to change its class.

The benefit of the State pattern is that state-specific logic is localized in classes that represent that state.

Figure 2 SEQ Figure * ARABIC 5: State PatternContext: • defines the interface of interest to clients, • maintains an instance of a Concrete State subclass that defines the current state.
State: defines an interface for encapsulating the behavior associated with a particular state of the Context.
Concrete State: each subclass implements a behavior associated with a state of Context.

III.9 Conclusion:This chapter allowed a brief introduction the actors. Then, we will specify the different requirement of the project. After, we will present the general use case diagram, Class diagram, state machine diagram, the Product Backlog, the Sprint Backlog and we conclude with the chosen architecture for each one
Chapter4:
IV. First SprintIV.1 Introduction:The term Sprint is defined as an iteration in Scrum where an application is in a period of production. For this project, each Sprint would finish with a release version that would be tested and delivered to the product owner for revision and feedback. a release is product of sufficient value to the end users that can be used.

Sprint duration vary from 2 to 4 weeks. it is defined during the sprint planning by the different collaborator in a Scrum team. the duration of Sprints are not the same, First sprint is about 3 weeks and the last is about 2 weeks. In this chapter, we will discuss the user stories of our sprints to produce a potentially deliverable product after each sprint.

IV.2 Sprint Backlog:Once we have defined the goal of our sprint, it’s time to decide which stories to include in it. Specifically, what stories from our product backlog will be included in the sprint backlog. The following table summarizes the backlog of our first sprint.

ID Name Story Priority Effort
1 2MW Test Stage One As a product owner I want users to be authenticated to access 1 30
As a user I want to sign In 2 As a user I want to set 2MWT Test Name 3 As a product owner I ask the user to enable Sensors Permissions , Gps Permissions, Notification Permissions even if they are not enabled. 4 As a product owner I Create and I save a Document containing Stage One Folder with the name of 2MWT Test in the phone storage. 5 As a user I want to start looking for best GPS Accuracy. 6 As a product owner I start Stage One: I send GPS accuracy updates. 7 As a product owner I start collecting Data sensors. 8 As a product owner I record Data sensors into CSV files. 9 As a product owner I save CSV files into folder Stage One. 10 As a user I want to confirm for the best GPS Accuracy 11 As a product owner if the user ask to stop the 2mwt test I stop collecting data and I delete the entire folder. 12 Table SEQ Table * ARABIC 3: Sprint 1 BacklogThis Sprint is about handling Authentication, Permissions, and Manage GPS accuracy updates
Next, I will define the main four activities in a sprint which are functional specifications, design, coding and testing.

IV.3 Analysis:IV.3.1 Use case Diagram:Modelling:
For best defining of functional specifications, I will use a use case diagram to illustrate the different needed functionalities to be built during this sprint

Figure 2 SEQ Figure * ARABIC 6: Sprint 1 Use caseNext, I will describe each use case from the point of view of actors, objectives, pre-condition, post-condition and scenarios.

Use Case Description:
In the following tables, I will explain precedent points for each use case.

First, Authentification:

Figure 2 SEQ Figure * ARABIC 7: AUTHentification Use caseUse Case Register
Actors MS Patient
Pre-condition The account to be created does not already exist.

User connected to an internet network.

Post-condition Added user
Main flow of events User launch 2MWT App
The System show a form to fill out
User enters his mail and his password
User clicks on the button ‘ACCOUNT AANMAKEN’
System checks the entered fields
Alternative flow Empty or invalid fields
User already exists
Table SEQ Table * ARABIC 4: Register Use caseUse Case Login
Actors MS Patient
Pre-condition User has an account
User connected to an internet network
Post-condition A connected user
Main flow of events User launch 2MWT App.

User clicks the ‘LOGIN’ button.

User enters his mail and his password
User clicks on the button ‘INLOGGEN’
System checks the entered fields
Alternative flow Empty fields
Incorrect login or password
Table SEQ Table * ARABIC 5: LOGIN Use caseSecond, Permissions:
Use Case Permissions
Actors MS Patient
Pre-condition User has an account
User connected to an internet network
Post-condition A connected user
Main flow of events System ask User to enable Location, Sensors and Notification Permissions,
User clicks the ‘Enable’ button.

System checks if the Permissions are enabled
Alternative flow Location or Sensors or Notification are not Authorized
Table SEQ Table * ARABIC 6: Permissions Use caseThird, GPS accuracy updates:
Use Case Manage GPS accuracy updates
Actors MS Patient
Pre-condition User have permissions to access to Device Motion, Location.

Post-condition Get the good GPS accuracy
Main flow of events User set the name of experiment.

User start looking for best GPS accuracy
System access to Loaction Sensor and Start sending Gps accuracy
System Create a folder experiment and Stage one
System start collecting data from all the sensors and save them to CSV files
User confirm for the best GPS accuracy
System save all CSV files into folder with name Stage One
Alternative flow Bad GPS signal
Table SEQ Table * ARABIC 7: Permissions Use caseFourth, Stop 2mwt Use Case Description:
Use Case Stop 2mwt
Actors MS Patient
Pre-condition GPS accuracy updates is running
Post-condition Folder experiment is deleted and 2mwt is stopped
Main flow of events 1. User could stop the 2mwt at any seconds.

2. System stop sensing.

3. System delete current experiment.

4. System back to form UI.
Alternative flow There is no exception
Table SEQ Table * ARABIC 8: Stop 2mwt Use caseV.3.2 Sequence Diagram:This part implements the sequence diagrams as well as the class diagram.

Sequence diagrams are a dynamic modelling UML presentation as they specifically focus on the processes and objects that live simultaneously, and the messages exchanged between them to perform a function before the lifeline ends. The figures below are sequence diagrams associated with each use case per actor.

Authentication:
Next the sequence diagram for Authentication’s use case. Within this functionality a MS Patient will have the opportunity to register and sign in to 2MWT App.

Figure 2 SEQ Figure * ARABIC 8: Authentification Sequence DiagramPermissions:
Next the sequence diagram for Permission’s use case. Within this functionality a MS Patient will enable the Location, Device Motion and Notification Permissions.

Figure 2 SEQ Figure * ARABIC 9: PERMISSIONS Sequence DiagramGPS accuracy updates:
Next the sequence diagram for GPS accuracy update’s use case. Within this functionality a MS Patient will confirm about the GPS accuracy

Figure SEQ Figure * ARABIC 30: gps Accuracy updates Sequence DiagramStop:
Next the sequence diagram for stop 2mwte’s use case. Within this functionality a MS Patient stop the 2mwt.

Figure SEQ Figure * ARABIC 31: STOP Sequence DiagramIV.4 Design:IV.4.1 Class Diagram:A class diagram represents the static aspect of an application. By showing a collection of classes, interfaces, associations, collaborations and constraints, it describes the attributes and operations of a class.

Next image presents the class diagram for this Sprint:

Figure 32: Sprint 1 Class Diagram
IV.4.2 Sprint Results:IV.5 Conclusion:Throughout this Sprint, we have presented the design and analysis part of the application by putting different diagram and the most important scenarios.?In the next Sprint, we will present in detail Stage One for the Cordova Plugin.
Chapter5:
V. SECOND SprintV.1 Introduction:Sprint is the heart of Scrum. it is a block of time during which an increment of product will be realized. All sprints have a constant duration and never overlap, which means that a sprint cannot start until the previous one is finished. In case of a task cannot be done in a specific sprint it should be scheduled during the next one.

This Sprint’s goal is to Create a Cordova plugin containing the function of the first sprint Sending GPS Accuracy, Collect Data from Sensors and save Data to CSV files.

V.2Cordova plugin Role:The Cordova Plugin uses events instead of callbacks.

In the callback model – which is default for Cordova – every method invocation receives a single response through a callback.
In the event model, there is a single event emitter which emits events. Every method invocation emit an event as a response. Native code can emit additional events to notify about matters such as GPS accuracy.

V.2.1 Methods:
In this Sprint ,The Cordova plugin have 3 methods:
Start, Start Experiment, Stop.

The 2 methods Start and Start Experiment have 3 parameters: id, the name of s3 bucket and the s3 prefix
Every method have will emit a event
V.2.2 Events:
All events have the same structure
A JSON Object with 2 parameters:
{
“experiment Status”: “…”,
“value”: “…”
}
“experimentStatus” “value” trigger
“STARTED” n/a After “start()” or “startWalkingExperiment()”
“STOPPED” n/a After “stop()” or COMPLETED
“ERROR” 1 = No Permission After “start()” or “startWalkingExperiment()”, when an error occurs.

“SEARCH_GPS” Accuracy (float)
After “startWalkingExperiment()” while in stage 1
IV.2 Sprint Backlog:Once we have defined the goal of our sprint, it’s time to decide which stories to include in it. Specifically, what stories from our product backlog will be included in the sprint backlog. The following table summarizes the backlog of our first sprint.

ID Name Story Priority Effort
2 2MW Test Stage One As a product owner I ask the user to enable Sensors Permissions , Gps Permissions, Notification Permissions even if they are not enabled. 1 As a product owner I Create and I save a Document containing Stage One Folder with the name of 2MWT Test in the phone storage. 2 As a user I want to start looking for best GPS Accuracy. 3 As a product owner I start Stage One: I send GPS accuracy updates. 4 As a product owner I start collecting Data sensors. 5 As a product owner I record Data sensors into CSV files. 6 As a product owner I save CSV files into folder Stage One. 7 As a user I want to confirm for the best GPS Accuracy 8 As a product owner if the user ask to stop the 2mwt test I stop collecting data and I delete the entire folder. 9 Table 9: Sprint 2 Backlog
This Sprint’s goal is to Create a Cordova plugin containing the function of the first sprint with Sending GPS Accuracy, Collect Data from Sensors and save Data to CSV files.

IV.3 Analysis:IV.3.1 Use case Diagram:Modelling:
For best defining of functional specifications, I will use a use case diagram to illustrate the different needed functionalities to be built during this sprint

Figure 33: Sprint 2 Use case
Next, I will describe each use case from the point of view of actors, objectives, pre-condition, post-condition and scenarios.

First, Permissions:
Use Case Permissions
Actors MS Patient
Pre-condition App already launched
Post-condition Permissions authorized
Main flow of events System call start or start Experiment function
2mwt plugin ask User to enable Location, Sensors and Notification Permissions,
User clicks the ‘Enable’ button.

System checks if the Permissions are enabled
Alternative flow Location or Sensors or Notification are not Authorized
Table 10: Permissions Use case
Fourth, GPS accuracy updates:
Use Case Manage GPS accuracy updates
Actors MS Patient
Pre-condition User have permissions to access to Device Motion, Location.

Post-condition Get the good GPS accuracy
Main flow of events System show GPS UI
2mwt plugin send GPS accuracy updates.

2mwt plugin Create a folder experiment and Stage one.

System show GPS accuracy updates.

2mwt plugin start collecting data from all the sensors and save them to CSV files
System verify best accuracy.

System notify user that the best accuracy is captured
User confirm to start the countdown stage
System save all CSV files into folder with name Stage One
Alternative flow Bad GPS signal
Table 11: Manage GPS Accuracy updates Use case
Stop 2mwt Use Case Description:
Use Case Stop 2mwt
Actors MS Patient
Pre-condition The 2mwt countdown Stage is running
Post-condition Folder experiment is deleted and 2mwt is stopped
Main flow of events 1. User could stop the 2mwt at any seconds.

2. System call stop function.

3. 2mwt plugin stop sensing.

4. 2mwt plugin delete current experiment.

5. 2mwt plugin send “stopped” message to system.

6. System show GPS UI.
Alternative flow There is no exception
Table 12: Stop 2mwt Use case
V.3.2 Sequence Diagram:This part implements the sequence diagrams as well as the class diagram.

Sequence diagrams are a dynamic modelling UML presentation as they specifically focus on the processes and objects that live simultaneously, and the messages exchanged between them to perform a function before the lifeline ends. The figures below are sequence diagrams associated with each use case per actor.

Permissions:
Next the sequence diagram for Permission’s use case. Within this functionality a MS Patient will enable the Location, Device Motion and Notification Permissions.

Figure 34:plugin PERMISSIONS Sequence Diagram
GPS accuracy updates:
Next the sequence diagram for GPS accuracy update’s use case. Within this functionality a MS Patient will confirm about the GPS accuracy

Figure 35: Plugin gps Accuracy updates Sequence Diagram
Stop:
Next the sequence diagram for stop 2mwte’s use case. Within this functionality a MS Patient stop the 2mwt.

Figure 36: STOP Sequence Diagram
III.7 State Machine Diagram:
Figure 37: Sprint two State Machine Diagram
IV.4 Design:IV.4.1 Class Diagram:A class diagram represents the static aspect of an application. By showing a collection of classes, interfaces, associations, collaborations and constraints, it describes the attributes and operations of a class.

Next image presents the class diagram for this Sprint:

Figure 38: Sprint 1 Class Diagram
IV.4.2 Sprint Results:IV.5 Conclusion:Throughout this Sprint, we have presented the design and analysis part of the Cordova plugin by putting different diagram and the scenarios.?In the next Sprint, we will present in detail Stage Two for the IOS Application.
Chapter6:
VI. Third SprintVI.1 Introduction:This Sprint’s goal is to present the third iteration of this project: Stage two. We continue like previous sprints, by following the same section’s schema.
VI.2 Sprint Backlog:Below the Sprint backlog:
ID Name Story Priority Effort
2 2MW Test Stage Two As product owner I create Stage Two folder into 2MWT document. 12 30
As a product owner I want the user to wait for 5 seconds 13 As a product owner I play 5 Countdown Audio. 14 As a product owner I start collecting Data sensors. 15 As a product owner I record Data sensors into CSV files. 16 As a user I could stop the 2mwt Test 17 As product owner I play a notification Sound and the vibration to notify the user that the stage 2 is finished. 18 As a product owner I save CSV files into folder Stage Two. 1ç Table 13: Sprint 2 Backlog
This Sprint is about handling Countdown Stage
Next, I will define the main activities in a sprint which are functional specifications, design, coding and testing.

IV.3 Analysis:IV.3.1 Use case Diagram:Modelling:
For best defining of functional specifications, I will use a use case diagram to illustrate the different needed functionalities to be built during this sprint

Figure 39: Sprint 3 Use case.

Use Case Description:
Use Case Handle Countdown Stage
Actors MS Patient
Pre-condition User has an account
User have confirmed the GPS accuracy.

Post-condition Countdown Stage is Finished
Main flow of events User Click button “start”
System Create a Stage two folder into the experiment folder.

System start the countdown
System play countdown audio
System start collecting data from all the sensors and save them to CSV files
User can stop Countdown stage.

System play notification sound and the vibration to notify that the stage 2 is finished
System save CSV files into stage two folder.
Alternative flow There is no more space in the file storage’s phone
Table 14: Handle CountDown stage Use case
Stop 2mwt Use Case Description:
Use Case Stop 2mwt
Actors MS Patient
Pre-condition The Countdown Stage is running
Post-condition Folder experiment is deleted and 2mwt is stopped
Main flow of events 1. User could stop the 2mwt at any seconds.

2. System stop sensing.

3. System delete current experiment.

4. System back to form UI.
Alternative flow There is no exception
Table 15: Stop 2mwt Use case
V.3.2 Sequence Diagram:
Figure 40: Handle CountDown stage Sequence Diagram

Figure 41: Stop 2mwt Sequence Diagram
V.4 Design:V.4.1 Class Diagram:Below we present a partial class diagram that represent application’s class till this Sprint.

Figure 42: Sprint 3 Class Diagram
V.4.2 Sprint Results:V.5 Conclusion:Throughout this Sprint, we have presented the design and analysis part of the application by putting different diagram and the most important scenarios.?In the next Sprint, we will present in detail Stage Two for the Cordova Plugin.
Chapter6:
VII. Fourth SprintV.1 Introduction:This Sprint’s goal is to Continue working with the Cordova plugin, this plugin will have the function of the third sprint Starting Countdown Stage.

V.2Cordova plugin Role:In this sprint The Cordova Plugin will use events instead of callbacks similar to the second sprint.

V.2.1 Methods:
In this Sprint, we will add to The Cordova plugin two methods:
nextStage:
This method will have two result one for creating multiple stages and the other one is creating the Countdown stage
The stop method will stop the 2mw test and delete the experiment
V.2.2 Events:
The event will have the same structure as before
An object JSON with 2 parameters:
{
“experiment Status”: “…”,
“value”: “…”
}
“experimentStatus” “value” trigger
“STARTED_NEXT_STAGE” Stage number (int) After “nextStage()”
“COUNTDOWN” Remaining seconds (float) After “nextStage()”
“STOPPED” n/a After “stop()” or COMPLETED
VII.2 Sprint Backlog:Below the Sprint backlog:
ID Name Story Priority Effort
2 2MW Test Stage Two As product owner I create Stage Two folder into 2MWT document. 12 30
As a product owner I want the user to wait for 5 seconds 13 As a product owner I play 5 Countdown Audio. 14 As a product owner I start collecting Data sensors. 15 As a product owner I record Data sensors into CSV files. 16 As a user I could stop the 2mwt Test 17 As product owner I play a notification Sound and the vibration to notify the user that the stage 2 is finished. 18 As a product owner I save CSV files into folder Stage Two. 1ç Table 16: Sprint 4 Backlog
IV.3 Analysis:IV.3.1 Use case Diagram:Modelling:
For best defining of functional specifications, I will use a use case diagram to illustrate the different needed functionalities to be built during this sprint

Figure 43: Sprint 4 Use case.

Handle Countdown Stage Use Case Description:
Use Case Handle Countdown Stage
Actors MS Patient
Pre-condition User have confirmed the GPS accuracy.

Post-condition Countdown Stage is Finished
Main flow of events User Click button “start”
System call nextStage function
2mwt plugin create stage2 folder
2mwt plugin send “started_nextStage” message
2mwt plugin play Countdown audio
2mwt plugin send Countdown remaining seconds
System show remaining seconds.

2mwt plugin collect data from sensors and save them to csv files
2mwt plugin play notification sound and vibration.

Save CSV files to stage 2 folder
Alternative flow There is no more space in the file storage’s phone
Table 17: Handle Countdown Stage Use case
Stop 2mwt Use Case Description:
Use Case Stop 2mwt
Actors MS Patient
Pre-condition The 2mwt countdown Stage is running
Post-condition Folder experiment is deleted and 2mwt is stopped
Main flow of events 1. User could stop the 2mwt at any seconds.

2. System call stop function.

3. 2mwt plugin stop sensing.

4. 2mwt plugin delete current experiment.

5. 2mwt plugin send “stopped” message to system.

6. System show GPS UI.
Alternative flow There is no exception
Table 18: Stop 2mwt Use case
V.3.2 Sequence Diagram:
Figure 44: sprint 4 Sequence Diagram

Figure 45: STOP Sequence Diagram
V.4 Design:V.4.1 Class Diagram:Below we present a partial class diagram that represent application’s class till this Sprint.

Figure 46: Sprint 4 Class Diagram
V.4.2 Sprint Results:V.5 Conclusion:Throughout this Sprint, we have presented the design and analysis part of the Cordova plugin by putting different diagram and the scenarios.?In the next Sprint, we will present in detail Stage Three for the IOS Application.
Chapter7:
VII. Fifth SprintVI.1 Introduction:This Sprint’s goal is to present the fifth iteration of this project: Stage three. Stage three will handle the 2mwt updates and uploading experiment to S3 bucket. We continue like previous sprints, by following the same section’s schema.
VI.2 Sprint Backlog:Below the Sprint backlog:
ID Name Story Priority Effort
5 2MW Test Stage Three As a user I want to Start 2mwt Running Stage. 19 30
As a product owner I ask the user to wait for 2 minutes , lock and put his phone into his pocket. 20 As a product owner I create Stage Three folder into 2MWT document. 21 As product owner I record Data sensors into CSV files. 22 As a product owner I notify the user that 2mwt test is finished with sound notification and vibration. 23 As a product owner I save CSV files into folder Stage Three. 24 As a product owner I notify the user if he want to stop the 2mwt test. 25 As a product owner if the user ask to stop the 2mwt test I stop collecting data and I delete the entire folder. 26 As a user I want to finish the 2mwt test. 27 2MWT Uploader As a product owner I zip the folder . 28 15
As a product owner I check if there is other 2mwt Tests in the phone storage and upload all the tests into S3 storage 29 As a product owner I delete all the tests from the phone storage. 30 Table 19: Product Backlog
Table SEQ Table * ARABIC 15: Sprint 2 BacklogThis Sprint is about handling third Stage: 2mwt running updates and uploading experiment to s3 Bucket
Next, I will define the main activities in a sprint which are functional specifications, design, coding and testing.

IV.3 Analysis:IV.3.1 Use case Diagram:Modelling:
For best defining of functional specifications, I will use a use case diagram to illustrate the different needed functionalities to be built during this sprint

Figure 47: Sprint 5 Use case.

Handle 2mwt running stage Use Case Description:
The 2mwt running stage will start automatically after the countdown stage.
Use Case Handle 2mwt running Stage
Actors MS Patient
Pre-condition The Countdown stage is finished
Post-condition 2mwt running Stage is Finished.

Main flow of events System show 2mwt UI
System create stage Three.

System show remaining seconds
System collect Data from sensors
System save data to CSV files
System play notification sound and vibration
System stop sensing

Alternative flow There is no more space in the file storage’s phone
Table 20: Handle 2mwt Running stage Use case
Stop 2mwt Use Case Description:
Use Case Stop 2mwt
Actors MS Patient
Pre-condition The 2mwt running Stage is running
Post-condition Folder experiment is deleted and 2mwt is stopped
Main flow of events 1. User could stop the 2mwt at any seconds.

2. System stop sensing.

3. System delete current experiment.

4. System back to form UI.
Alternative flow There is no exception
Table 21: Stop 2mwt Use case
Upload to S3 Bucket Use Case Description:
In this use case the Stop we will have another role is to upload the experiment to s3 bucket using AWS SDK (transfer utility
Use Case Upload to S3 bucket
Actors MS Patient
Pre-condition The 2mwt running Stage is Finished.

Post-condition Folder experiment is uploaded to s3 bucket.

Main flow of events System zip folder experiment
System check if there any older experiments in iPhone ‘storage and upload them to s3 bucket and delete them at the end.

System upload current experiment and delete it at the end
System back to the form UI
Alternative flow There is no internet connection
Table 22: Upload to S3 bucket Use case
V.3.2 Sequence Diagram:
Figure 48: Handle 2mwt Running stage Sequence Diagram

Figure 49: Stop 2mwt Sequence Diagram

Figure 50: Upload to S3 bucket Sequence Diagram
V.4.1 Class Diagram:Below we present a partial class diagram that represent application’s class till this Sprint.

Figure 51: Sprint 4 Class Diagram
V.4.2 Sprint Results:V.5 Conclusion:Throughout this Sprint, we have presented the design and analysis part of the application by putting different diagram and the most important scenarios.?In the next Sprint, we will present in detail Stage Three for the Cordova Plugin.
Chapter8:
VII. Sixth SprintI Introduction:This Sprint’s goal is to Continue working with the Cordova plugin, this plugin will have the function of the Fifth Sprint Starting 2mwt running stage, stop and upload experiment to S3bucket
II Cordova plugin Role:In this sprint The Cordova Plugin will use events instead of callbacks similar to the pervious sprints.

II.1.1 Methods:
In this Sprint, we keep working with nextStage and stop method
The nextStage method will have another two result one for starting the 2mwt running stage and one for the finish of 2mwt running stage.

The stop method will stop the 2mw test and delete the experiment.

II.1.2 Events:
The event will have the same structure as before
A JSON Object with 2 parameters:
{
“experiment Status”: “…”,
“value”: “…”
}
“experimentStatus” “value” trigger
“RUNNING” Remaining seconds (float)
After “nextStage()”
“COMPLETED” n/a
When using “nextStage()”,after 120 seconds in stage 3
“STOPPED” n/a After “stop()” or COMPLETED
III Sprint Backlog:This sprint will be different from the pervious the experiment will be uploaded automatically after the 2mwt remaining seconds finished.

Below the Sprint backlog:
ID Name Story Priority Effort
6 2MW Test Stage Three
As a product owner I ask the user to wait for 2 minutes , lock and put his phone into his pocket. 20 As a product owner I create Stage Three folder into 2MWT document. 21 As product owner I record Data sensors into CSV files. 22 As a product owner I notify the user that 2mwt test is finished with sound notification and vibration. 23 As a product owner I save CSV files into folder Stage Three. 24 As a product owner I notify the user if he want to stop the 2mwt test. 25 As a product owner if the user ask to stop the 2mwt test I stop collecting data and I delete the entire folder. 26 As a user I want to stop the 2mwt test in any second 27 As a product owner I zip the folder . 28 15
As a product owner I check if there is other 2mwt Tests in the phone storage and upload all the tests into S3 storage 29 As a product owner I delete all the tests from the phone storage. 30 Table 23: Product Backlog
IV Analysis:IV.1.1 Use case Diagram:Modelling:
For best defining of functional specifications, I will use a use case diagram to illustrate the different needed functionalities to be built during this sprint

Figure 52: Sprint 6 Use case.

Handle 2mwt running stage Use Case Description:
In this use case we add another role is to stop collecting data from sensors, save stage 3 to our experiment folder and uploading the experiment to s3 bucket using AWS SDK (transfer utility).

Use Case Handle 2mwt running Stage
Actors MS Patient
Pre-condition The Countdown stage is finished
Post-condition 2mwt running Stage is Finished and experiment uploaded to s3 bucket.

Main flow of events System show 2mwt UI
System call nextStage function.

2mwt plugin send “Running” message.

2mwt plugin create stage Three.

2mwt plugin send remaining seconds to System
System show remaining seconds
2mwt plugin collect Data from sensors
2mwt plugin save data to CSV files
2mwt plugin play notification sound and vibration
2mwt plugin stop sensing
2mwt plugin zip folder experiment
2mwt plugin check if there any older experiments in iPhone ‘storage and upload them to s3 bucket and delete them at the end.

2mwt plugin upload current experiment and delete it at the end
2mwt plugin send “Completed” message to System
System show 2mwt finished UI
Alternative flow There is no more space in the file storage’s phone
There is no internet connection.

Table 24: Handle 2mwt running Stage Use case
Stop 2mwt Use Case Description:
Use Case Stop 2mwt
Actors MS Patient
Pre-condition The 2mwt running Stage is running
Post-condition Folder experiment is deleted and 2mwt is stopped
Main flow of events 1. User could stop the 2mwt at any seconds.

2. System call stop function.

3. 2mwt plugin stop sensing.

4. 2mwt plugin delete current experiment.

5. 2mwt plugin send “stopped” message to system.

6. System show GPS UI.
Alternative flow There is no exception
Table 25: Stop 2mwt Use case
IV.1.2 Sequence Diagram:
Figure 53: Handle 2mwt running Stage Sequence Diagram

Figure 54: STOP Sequence Diagram
IV.1.3 State Machine Diagram:
Figure 55: State Machine Diagram OF Sprint 6
V Design:V.1.1 Class Diagram:Below we present a partial class diagram that represent application’s class till this Sprint.

Figure 56: Sprint 6 Class Diagram
V.1.2 Sprint Results:VI Conclusion:Throughout this Sprint, we have presented the design and analysis part of the Cordova Plugin by putting different diagram and the most important scenarios.