PRMS - VU Final Project
PRMS - VU Final Project
PRMS - VU Final Project
Project Supervisor
Mr. Arif H. Rashid
Submitted By
S18020224CA
Pg. 1
CERTIFICATE
This is to certify that Tayyab Hussain (MC160200254) have worked on and
completed has Software Project at Software & Research Projects Section,
Department of Computer Sciences, Virtual University of Pakistan in partial
fulfillment of the requirement for the degree of Masters in Information
Technology under my guidance and supervision.
Arif H. Rashid
Supervisor,
Software Projects & Research Section,
Department of Computer Sciences
Virtual University of Pakistan
___________________
(Signature)
___________________
(Signature)
Accepted By:
_____________
(For office use)
Pg. 2
EXORDIUM
Pg. 3
DEDICATION
Pg. 4
ACKNOWLEDGEMENT
Pg. 5
PREFACE
Over the years, these contractors became a mafia. With the help of some,
corrupt elements in the government departments and political influences,
these contractors distributed areas and made a hold on these parking stands
to its roots. An estimated amount of 720 Million was earned annually from
these sites and the Government received 120 Million as contract amount.
This was due to arbitrarily charging at different parking sites and no
security was guaranteed to the public if the vehicles were reported stolen.
Lahore Parking Company (LePark) was one of the companies, with the
aim to put an end to the parking mafia, implement homogeneous parking
rates, and give public a sense of safety and security for their vehicles. The
main aim of the Parking Revenue Management System is to put an end to
the traditional ticket based system and implement and new e-Ticketing
system and the revenue collected on daily basis can be monitored and
effectively utilized by the City District Government.
Pg. 6
Table of Contents
Pg. 7
2.1 Methodology 28
3.1 Purpose: 45
3.2 Scope 45
4 DEVELOPMENT PLAN 63
Pg. 8
4.1.3 Selecting the Vehicle Type 66
4.1.4 Add Parking 67
4.1.5 Reports 69
4.1.6 Date Wise Reports 70
4.1.7 Administration – Synchronization 71
5 DIFFICULTIES 89
Pg. 9
CHAPTER 1
Gathering & Analyzing Info
Pg. 10
1 Gathering Information and Analysis
Parking space in the heart of Pakistan, Lahore, is the need of the people as well as a
revenue-generating source for the City District Government, Lahore (Now MCL). For a
long time, the parking sites were auctioned to contractors by the CDGL. After the
contract was awarded, a small fee was deposited in the Government treasury but the
charges were arbitrarily charged causing revenue loss to the Government.
Looking into the matter above, CDGL moved a summery to the CM for making a
parking authority who would enter into a Private Public Partnership with a single
contractor, who would modernize the parking by introducing latest technology and
develop parking that, would facilitate the public as well as generate revenue for the
Government. The project ran into jeopardy, as the awarding of contract got late and the
authority having no previous Parking Management experience re-employed, either the
contractors themselves who used to run the sites previously or the employees of the
contractors. The contractors where used to the “Parchi System” that still exists, leaving
the government with the same revenue embezzlement and loss as before.
The aim of the project is to develop a Mobile Based Parking Revenue Collection
System, with a Web Based Portal, to facilitate the Government to collect and manage
the revenue and monitor activities at the parking sites on real time basis and get rid of
the Parchi System. Other than the local Governments, this system can be applicable to
Hospital managements or Mall managements to operate their parking and can use this
software to monitor their revenue.
Pg. 11
1.2 Scope of Project:
This project will be developing a Parking Revenue Management System that will run
on a mobile-based technology, and supported by a web based back end services. The
scope is defined as follows:
Investigate the value and the benefits of a system that would assist the
management of the Parking Authority and the City District Government.
Study the loopholes in the existing non-computerized system and fill in
the fragmentation.
Reduce the effects of embezzlement caused by the operational staff, and
report actual revenue to the higher authorities of both the departments on
real time basis.
Eliminate the traditional ticketing System and introduction of the
modernized e-Ticketing system.
Maintain the record on the mobile device on day-to-day basis.
Send real time data to the web server for different analysis
Word Meaning
Pg. 12
cloud.
A graphical representation of interactions among elements of a
Use Case
system
A browser based web page to display information and provide
Web Portal
access to controls to a user.
SQLite A lightweight database usually used to store data in mobile devices.
A database usually on local system. In our case the a lightweight
localDB
database on the mobile device
SDK Software Development Kit
A file format for capturing and sending electronic documents in
PDF
exactly the intended format. An Adobe Product
Create, Read, Update, Delete. A code that the MVC automatically
CRUD
creates for you in controllers and views
GUI Graphic User Interface
MVC Model View Controller
ASP.Net Open source application framework by Microsoft.
Visual C# An object oriented language by Microsoft
ColdFusion An application development server side language by Adobe
Bootstrap is the most popular HTML, CSS, and JavaScript
Bootstrap
framework for developing responsive, mobile-first websites.
HTML Hyper Text Markup Language
CSS Cascade Style Sheets
JavaScript Client side language usually used with HTML
Programing language for mobile devices like Android, iOS and
Xamarin
Windows phone by Microsoft.
Microsoft's relational database management system (RDBMS). It is
SQL Server
a full-featured database.
Ajax Asynchronous JavaScript And XML
JSon JavaScript Object Notation.
Pg. 13
1.4 Use Case Diagram(s):
The system consists of a set of functions to assist in the PRMS. The following use cases
as shown below provides a better understanding and overview of the features and user
requirements included, as well as actors involved. It also represents the Functional
requirements of our system.
Pg. 14
1.5 Usage Scenarios – Mobiles Application:
1.5.1 Login
Use Case Name Main Login
Implementation
Priority
Actor Device User
Summary The device users will login from the main screen providing
the username and a password
Pre-Condition Internet connection either 4G or DSL is required, Bluetooth
Printer should be paired and Bluetooth services activated.
Extends
Uses
Normal Course of The device user will check internet connectivity, the
Action Bluetooth pairing for each device and the login by providing
username and password.
Alternative Path If 4G connection is not available, using the nearest provided
DSL or any hotspot to connect the devices
Exception If the internet, the Bluetooth is not available or either
username or password is not provided, the system will
through exceptions.
Assumption
1.5.2 Check-In
Use Case Name Check-In
Implementation
Priority
Actor Device User, Admin User
Summary The user will select the required vehicle type to perform
operation like car, bike, van or truck.
Pre-Condition Although, Internet is not necessary, but to synchronize data
to live DB internet is required. Bluetooth connectivity with
the printer a prerequisite.
Extends Add Parking activity
Uses
Normal Course of The user clicks on the check-in option and will be taken to
Action the vehicle selection option. There the user will click on the
required vehicle type and will proceed to the Add Parking
activity. Sometimes it is observed that the Bluetooth skips
connectivity with the paired devices, so rather the user wastes
time in un-pairing and the re-pairing to re-gain the
connectivity, a button to re-pair will be available.
Alternative Path N/A
Exception No exception observed at this point.
Assumption
Pg. 15
1.5.3 Add Parking
Use Case Name Add Parking
Implementation
Priority
Actor Device User, Admin User
Summary Takes in the number of the vehicle and prints the E-tickets
Pre-Condition Only Bluetooth connectivity is required, Internet connectivity
is optional.
Extends N/A
Uses N/A
Normal Course of On the arrival of vehicle, the Device user will enter the
Action Numeric number (alpha numeric may cause delay) and hit the
save button, The system will print the ticket with the name of
the parking site, time in, the fare to be paid, a barcode or a
QR code and some disclaimers. The data will be saved
locally; if the internet is available, the data will synchronize
to live DB on the cloud that will be displayed on the web
portal. If due to any reason the internet connectivity is not
available the data will be saved on the local device informing
the user through some message alert or a toast that the data
saved but not synchronized but saved.
Alternative Path N/A
Exception If due to Bluetooth disconnection, which rarely occurs, the
system will throw an exception, the device user will get a
Bluetooth connectivity error, which the user can resolve by
pressing the re-pairing button.
Assumption
1.5.4 Reporting
Use Case Name Reporting
Implementation
Priority
Actor Device user, Admin User
Summary Prints Daily and Date wise reports
Pre-Condition Bluetooth printer should be active
Extends N/A
Uses Daily reports and Date Wise Reports
Normal Course of The user will press the reports button from the main
Action operation screen will be taken to the reports activity. There
the user can print 2 types of reports
Daily report
Date wise report
The devise user will just press the daily report button. The
only exception to be taken care is that the report should be
taken before 12:00 am at day closing. The report will display
the site name, the count of vehicles and the total revenue
Pg. 16
collected from that particular device.
Same actions will be taken for Date Wise reports except that
the user will give the starting, an ending date, and the same
report with the number of tickets showing the count of
vehicles types dispensed from a particular device from a
specific starting and ending date along with the revenue
collected will be printed on the report.
Alternative Path No alternative path
Exception N/A
Assumption
1.5.5 Synchronization
Use Case Name Synchronization
Implementation
Priority
Actor Admin User
Summary Synchronizes data to the cloud DB
Pre-Condition Internet Connectivity is required
Extends
Uses
Normal Course of At the end of the day when the collection team comes to
Action collect the revenue, after getting the reports from the devices,
the admin or the collection team will use their logins to
synchronize the data that was left un-synchronized during the
day due to fluctuation in 4G connection.
Alternative Path If 4G is not available, any DSL Connection can also be used
to sync the data.
Exception During the data transformation, if the 4G is used, there might
be chances that some data might be left un synchronized,
keeping in view the fluctuation nature of 4G, a message that
some data might be left unsynchronized will be displayed to
the user. The user will run the process once again until all of
the data is synchronized and the OK message displayed.
Assumption It is assumed that a high speed DSL is used for this process
Pg. 17
1.6 Use Case: Web Portal
Pg. 18
types
The user can define fares of the vehicles types
here and define that what type of vehicle will be
allowed on which parking site.
In the management section:
o The user can define, update and delete
Parking Locations.
o The user can define, update and delete the
android devices. The user will provide the
location where the device is to be used, the
SIM number and its status, whether the
device should be activated or not.
o The user can define mobile device uses
and web users by defining their username
and passwords. The user can delete or edit
any entry
The Reports section defines 2 types reports,
o Date wise
o Site Wise and Date Wise
The user will provide the start date and an end date and hit
the view report button.
In the second report, the user will provide the start date and
an end date and finally provide the parking site name for
which to view the report.
Both the reports will provide the location name, vehicle type,
ticket number, time in and the amount paid. The user can
down load both the reports by hitting the download PDF
button.
Alternative Path N/A
Exception N/A
Assumption N/A
Pg. 19
1.7 Functional Requirements:
1.7.2 Startup
This would check the internet connectivity and login and fetch data like types of
vehicles and their rates from the internet and store in a local DB (SQLite) and would
facilitate even if the 4G were not available. If the internet connectivity is not available,
an error will be generated
1.7.3 Security
IEMI or SIM number will be stored on the cloud and at the time of login, the app will
compare the numbers (either of the both) and if checked, it will proceed to next
activity.
1.7.4 Connectivity
An SDK will be used to make the connectivity with a portable Bluetooth printer and
use its features. If the device is not paired and error will be generated.
Pg. 20
1.8.2 Dashboard
An attractive dashboard depicting various summaries in form of graphs shall be
presented.
1.8.9 Reporting
Several reports like, Date wise reports of all the vehicles, Vehicles wise reports, for a
particular date, Summary report just the count of vehicles type for a particular period,
Site wise reports etc. can be produced. They can be downloaded in PDF format for
further usage or record purposes.
Pg. 21
nonfunctional requirements of the system. The scope of the supplementary
specifications is limited to all the nonfunctional requirements.
1.9.1 Usability
PRMS is user-friendly system. Both the modules i.e. the Mobile and the Web portal
needs a little bit of training. Following are the steps
1.9.1.3 Reliability
Reliability is the Mean Time between Failures.
Failures like drop signals in the 4G connection can occur while using the
mobile device. It is roughly estimated to be 3 to 4 times during the day.
Another issue, which is, reported that, the printing head Bluetooth device
when exposed to sunlight stops printing.
One major issue, the reason of which is still unknown, that when the
synchronization process is being conducted some duplicate entries are
reported to occur on the web portal.
Pg. 22
1.9.1.3.1 Reliability Requirements
The system handles this issue elegantly
For drop signals of 4G, the system keeps a record on the mobile device in
a SQLite local DB marked as un-synced, which, as an SOP, at the end of
the day is synchronized.
For Bluetooth head issue special belt pouches are used to keep the
printer’s head from being exposed to sunlight. This also gives safety from
dust and water.
To solve the duplicate entry on the web portal, an SQL Query is written,
which is executed by the admin user to remove the duplicates if any. This
issues is also reported as resolved if, the synchronization process is
executed in chunks during the operational hours.
The reliability of the Web Portal is tested and no issues have been reported yet.
1.9.1.4 Supportability
All Android Devices ranging from Android version 4.x Kit Kat to latest Android
Version support the system. However, for the purpose of this project the supportability
is limited to Android Version 4.x Kit Kat. For this purpose, the DLL file of the
Bluetooth printer is built as a separate project and compiled on Android version 4.x
Pg. 23
1.9.2 Non-Functional Requirements:
Pg. 24
CHAPTER 2
Planning the Project
Pg. 25
2 Planning The Project
Before starting a software project, it is essential to determine the tasks to be performed
and properly manage allocation of tasks among individuals involved in the software
development. Hence, planning is important as it results in effective software
development.
Project planning is an organized and integrated management process, which focuses on
activities required for successful completion of the project. It prevents obstacles that
arise in the project such as changes in projects or organization's objectives, non-
availability of resources, and so on. Project planning also helps in better utilization of
resources and optimal usage of the allotted time for a project. The other objectives of
project planning are listed below.
It defines the roles and responsibilities of the project management team
members.
It ensures that the project management team works according to the
business objectives.
It checks feasibility of the schedule and user requirements.
It determines project constraints.
Project planning should be effective so that the project begins with well-defined tasks.
Effective project planning helps to minimize the additional costs incurred on the project
while it is in progress. For effective project planning, some principles are followed.
Planning
Risk analysis
Tracking of project plan
Meet quality standards
A project plan provides information about the end date, milestones, activities, and
deliverables of the project. In addition, it describes the responsibilities of the project
management team and the resources required for the project. It also includes the
description of hardware and software the methods and standards to be used. These
methods and standards include algorithms, tools, review techniques, design language,
programming language, and testing techniques.
A project plan helps a project manager to understand, monitor, and control the
development of software project. This plan is used as a means of communication
between the users and project management team. There are various advantages
associated with a project plan, some of which are listed below.
It ensures that software is developed according to the user requirements,
objectives, and scope of the project.
It identifies the role of each project management team member involved
in the project.
It monitors the progress of the project according to the project plan.
It determines the available resources and the activities to be performed
during software development.
Pg. 26
It provides an overview to management about the costs of the software
project, which are estimated during project planning.
2.1 Methodology
Software development methodology is a process or series of processes used in software
development. Again, quite broad but that it is things like a design phase, a development
phase. It is ways of thinking about things like waterfall being a non-iterative kind of
process. Generally, it takes the form of defined phases. It is designed to describe the
how of the life cycle of a piece of software.
It is also known as a software development life cycle. The methodology may include
the pre-definition of specific deliverables and artifacts that are created and completed
by a project team to develop or maintain an application. Some of the methodologies are
Waterfall Model
Spiral Model
Rapid Application Development (RAD)
Agile Model
Pg. 27
Figure 3 Water Fall Model
In the Waterfall approach, the whole process of software development is divided into
separate phases. The outcome of one phase acts as the input of the next phase
sequentially. This means that any phase in the development process begins only if the
previous phase is complete. The Waterfall Model is sequential design process progress
is flowing downwards steadily through the phases of Conception, Initiation, Analysis,
Design, Construction, Testing, Production, Implementation and Maintenance.
Requirements
System Design
Implementation
Integration and Testing
Deployment of system
Maintenance
Pg. 28
Clearly defined stages.
Well understood milestones.
Easy to arrange tasks.
Process and results are well documented.
Pg. 29
The Spiral Model is widely used in the software industry, as it is coordinated with the
natural development process of any product, i.e. learning with maturity involves
minimum risk for the customer as well as the development firms.
Identification
Design
Construct
Evaluation and Risk Analysis
Pg. 30
2.4 Rapid Application Development Model (RAD)
Rapid Application Development is based on prototyping and iterative
development with no specific planning involved. The process of writing the
software itself involves the planning required for developing the product.
This focuses on gathering customer requirements through workshops or focus groups,
early testing of the prototypes by the customer using iterative concept, reuse of the
existing prototypes (components), continuous integration and rapid delivery.
Pg. 31
It should be used only if the budget permits use of automated code
generating tools.
RAD SDLC model should be chosen only if domain experts are available
with relevant business knowledge.
Planning
Requirements Analysis
Pg. 32
Design
Coding
Unit Testing and
Acceptance Testing.
At the end of the iteration, a working product is displayed to the customer and
important stakeholders.
Pg. 33
Gives flexibility to developers.
In this approach, we see that processes flows in a downward fashion from requirement
phase to accepting phase that meets to client satisfaction. Requirements phase collects
software specifications, functional and non-functional requirements in SRS (software
requirement specification) document of VU final project. Analysis phase analyzes cases
and work plan based on software requirement phase that covers use case scenarios up to
methodology and work plan.
Pg. 34
Figure 7 Water Fall Model
Design phase goes through with flow charts, algorithms and GUI based on analysis
phase. Coding phase generates the actual logic of the application and provide
functionality to the system. The system logic is tested if it is working as it is as in
designing phase. Finally, client acceptance phase verifies if application meets to the
client’s requirement.
Spiral Model
Spiral model overcomes the cons of waterfall model by adding risk analysis to its phase
and one after another iteratively follows these phases in order to avoid maximum risk
during software development. By Iteratively followed means, that task move through
four processes many times until quality ensured.
Pg. 35
Planning phase covers scope, requirements and functionality of the system. Second
phase Risk analysis is most important phase of spiral model that defines cost-effective
strategies in project development. Risk at any stage indicates that requirements must be
reviewed to find out solution for the problem by given data in the previous phase before
proceed to the next. Development phase covers the designing, coding and testing and
finally application is delivered to client for further evaluation. In case of any change, it
is required to iterate the application from all four phases again.
Figure 9 VU Model
This model, as mentioned above is the hybrid model that is developed keeping in
view the pros and cons of both waterfall methodology and the spiral
methodology. In this model, each stage of waterfall is preceded by identification
of alternatives and risk analysis and then followed by evaluation and planning of
Pg. 36
next phase. It enhances the quality of project through documentation of each
phase and minimize risk by doing task analysis.
Why VU Process Model
Some of the reasons for choosing this model is as follows
Documentation driven Model: The VU Process Model is a documentation
driven model. It generates complete documentation and makes maintenance of
tasks such easier because the feedback the user gives must be fulfilled on each
phase of development.
Concise and Advance: Comparing the waterfall model, this model is more
concise and advanced, because at any stage we can go back, do the task and again
move forward, but in waterfall we can cannot move back.
Dependent on Risk Analysis: The VU process model is very much dependent
on risk analysis and contentiously evaluating each phase.
Corrective Measures: Corrective measures are allowed any stage.
Pg. 37
2.8.2 Dependencies
Due to time constraints, project management plans, requirements plan, architecture
plans, and development are all happening simultaneously. An advanced copy of early
stage requirements was received and thus was able to start multiple tasks. Code
development depends on the requirements document which will lead to the first
iteration. Remaining code development after the first (and second) iterations will
require analyzing customer feedback, changing the requirements document as needed,
and changing the architecture as necessary.
Pg. 38
No matter how well the project schedule is prepared, that schedule is useless
unless it is adhered to. It is the project manager's responsibility to withstand
pressure and to assure that the project is developed in an orderly fashion,
according to the schedule. Whenever circumstances change, the project schedule
should then be updated to reflect the new situation.
The goal of a software project schedule is to determine the duration of the software
project and the phases with in the project. A software project schedule enables you to
distribute the estimated effort to be spent in performing the critical activities.
Schedule Calendar
Pg. 39
Figure 11 Gant Chart
Pg. 40
CHAPTER 3
Designing the Project
Pg. 41
3 Designing The Project
Systems are created to solve problems. One can think of the system approach as an
organized way to solve the problem. This subject, i.e. System Analysis and Design
deals with the software development activities.
System Analysis:
System analysis the process of collecting factual data, understanding the process,
identifying the problem and the solution to for an improved, fully functional system.
This involves of understanding the business process, collecting operational data,
understanding the flow of information, identifying the bottlenecks and recommending
the solution for overcoming the weaknesses in the system to achieve the business goals.
It also includes the sub-division of complex problem, involving the entire system,
identification of data store and manual process.
The major object of system analysis is to find the answers for each business process.
What is being done, for how long is it being done, who is doing it, since when is he/she
doing it, why is it being done, and finally, how can it be improved. It is more of a
thinking process and involves the creative skills of the system analyst. It attempts to
create a new efficient system that is more beneficial to the organization and has scope
for feature growth of the business within the organizational constrains.
System Analysis is an iterative process that continues until a new system emerges, this
preferred and acceptable to all stakeholders. It is an essential part of developing a
system. It consists of system elements, process and technology.
To analyze a system, the system analyst has to study the system in detail. Before
designing the system, the system analyst hast to understand the functional parts, and the
concept. For this, the analyst has to carry out a customary approach, for solving the
problem.
The above steps constitute the logical framework, for system analysis. After primary
investigation and feasibility study, the scope of the defined and comparable items are
set, and hence detailed investigation is executed. Then system is designed and coding is
done. The system is tested, training is conducted for the persons to operate the system
and the system is finally implemented.
Pg. 42
System Design:
Based on the user requirements and detailed analysis of the existing system, the new
system is designed. This is the most crucial phase in developing a system. The logical
design arrives as a result of system analysis, which is then converted to physical design.
Usually, the design proceeds in two stages.
Primary or General Design
Structured or Detailed Design
There are several tools and techniques used for describing the system design like,
Flowcharts, Data flow diagrams, Data Dictionary, Decision trees, Decision tables,
Pseudocode.
Pg. 43
System Design Involves
Defining precisely the required system output.
Determining the data requirement for producing the output.
Determining the medium and format of files and databases.
Devising processing methods and use of software to produce output.
Determine the methods of data capture and data input.
Designing Input forms.
Designing Codification Schemes.
Detailed manual procedures.
Documenting the Design.
3.1 Purpose:
The purpose of this document is to describe the reasons for implementation of the
Parking Revenue Management System. For decades the Municipal Corporation or the
City District Government, to collect revenue from different public facilities has been
contracting out its facilities. One of the facilities were the parking sites. During this
period, the contractors grew into mafia and started to operate the sites arbitrarily.
To put an end to this mafia and compete the established CDGs all over the world, the
CM called upon a meeting of the higher officials and hence passed a summary to form
such companies that would uplift the quality of services provided to the public and
place city of Lahore into the top-rated modern cities. One of the companies was the
parking authority that was formed. The core purpose of the authority was to put an end
to the parking mafia and introduce a new modernized Parking Management System.
Looking into the dynamics of the city, the complete parking system was not possible,
but collection of revenue was needed to be ensured as soon as possible. For this
purpose, The Parking Revenue Management System was needed, that would ensure
that the actual amount of revenue collected and give details on real time basis, eradicate
the previous ticketing system and replace with a modernized e-ticketing system on the
parking sites.
To meet the challenges of real time and modernized parking revenue management
system, blend of mobile devices and cloud-based application was required. The parking
operators, hence replacing the previous ticketing system with the new e-ticketing
system and a web-based system to be operated by the revenue department of the
parking authority and the officials of the CGD jointly, will operate the mobile devices.
3.2 Scope
This document describes the implementation of the PRMS. The system will be a
Parking Revenue Management System that will facilitate the staff of the Parking
Authority and the officials of the CDG to jointly operate and manage the system
effectively. The document will define the detailed structure of the software. It is
Pg. 44
assumed that the SRS has been studied and the behaviors of the system understood. It
will be a guideline for the developers who will develop and implement the system. The
system will contain the sequence diagrams, class diagrams and architecture diagrams of
the system.
Pg. 45
3.3.3 The Presentation Layer
The presentation layer is the top most layer of the application is the user interface. The
function of the interface is to translate tasks and results to something the user can
understand.
The following files are part of the presentation layer
Pg. 46
a system will behave and to discover responsibilities a class may need to have in the
process of modeling a new system.
3.4.1.1 Login
The mobile device at its main activity will check for the internet connectivity and
Bluetooth printer connectivity, If both are connected the system will proceed to the
login menu else, it will prompt the user to connect either or both. After the
connectivity, the system will display the login screen. When the user logs in the system
will get the username, password, the SIM number from the cloud DB, if any of the
elements do not match, the system will prompt an error. If the elements match the
system will then get the new fares (if any) of the vehicles against that site and delete the
old data and store new data into the local DB. On success the system will go to the next
activity
Pg. 47
3.4.1.2 Select Vehicle
Upon successful login, the operator will be prompted to a simple menu (the application
GUI) where the user will select the check-in option. After selecting the user will be
taken to activity where he will select the vehicle type, this activity will get the fare of
the selected vehicle from the local DB and move to the next activity where parking is
added.
When the user selects the vehicle, add parking activity will appear prompting the
operator to enter the vehicle number. When the operator enters the vehicle number and
press the save button the first sequence is that it prints the e-ticket then saves the e-
ticket in the local DB and finally using an API saves the ticket to the cloud. If due to
fluctuation in the 4G connection, the user will be prompted but the record is
successfully saved into the local DB.
Pg. 48
3.4.1.4 Reports - Daily Reports
The operator will select the report option from the main menu and then select the daily
reports option. Upon selecting the option the system gets the tickets and list of tickets
for that day is returned which is sent to the Bluetooth printer for printing
.
The other option in the report menu is the Date Wise option. This option is there if the
operator needs to het a report from that particular device for any back date or range of
dated. Upon selecting the option the operator will taken to a UI where he can enter date
range. The system checks the dates and returns a list of tickets which are then sent to
the Bluetooth printer for printing.
Pg. 49
3.4.1.6 Synchronization
To run this activity the user must have the administrative rights. The user logins with
the admin rights and the sync activity will appear in the main menu, upon selecting this
option the sync activity will start. It gets all the tickets that are unmarked as sync. The
tickets are sent to the cloud and when the tickets are all synced, the tickets entry in the
local DB are marked as isSync.
3.4.2.1 Login
Pg. 50
When the system starts the user, is prompted with a login screen. Upon giving the
username and password the system verifies the credentials from the database and the
user is taken to the web portal GUI.
To add the vehicles types, the user clicks on the vehicle option is directed to the GUI
where the admin can perform CRUD operations i.e. Add, Edit and Delete the vehicles.
The system requests the vehicle detail and in response, the list of vehicles is returned.
The user can add a new vehicle type, and saves the changes. The vehicle will appear in
the main list. The user can perform the edit operation, the system will update the list
and display the changes made. The delete operation deletes the vehicle type and the
changes are displayed on the main screen.
Pg. 51
3.4.4 Fares
However, the fares are homogeneous on all the sites, but sometimes the fare for a
particular location needs to be customized. For Example if at any parking site there is
an event and the authorities want to have that sited charged as free or charge
differently, the fare for that location can be changed. So the fares are associated with
the location and the type of vehicles. The CRUD operations are same, like upon adding
a fare the admin selects the parking location, selects the vehicle type, add the amount of
fare to be charged, and saves the changes. The edit operation is no different and the
delete operations are simple to delete the fare. The changes made here reflect in the
mobile devices upon fresh login.
Pg. 52
3.4.5 Locations
The Locations are defined by the Admin User, The CRUD operations are simple and
well defined. Like any other CRUD the system retrieves a list of operating sites. The
Admin can add a new Parking Location or site, Edit and Delete the same.
3.4.6 Devices
Pg. 53
Registration of the devices are a part of the security system, so that misuse of devices
cannot be done. In the current system, the printed parking tickets are used which is very
prone to be misused as they can be printed fraudulently, and used. The security system
will prevent the misuse and even if the operator somehow gets hold of the apk file and
installs the system, the system checks for the registered device. These devises are
registered by the admin user before allotting a mobile device to the supervisor to be
used on the parking location. The CRUD operations are simple and well defined.
The Defining the device user is a very simple CRUD operation. The user selects the
option to add the device user, the list of the available users is displayed. The Admin
user ADD the user name which is usually a site name, allots a username and a
password and saves the data. The Edit and Delete operations are also very simple.
Pg. 54
3.4.8 Web User
Defining the Web Users is also the same as defining the device users. The CRUD
operations are very simple.
The date wise report is very simple report. The Admin user at any given period of time
can retrieve this report. The GUI is very simple. The user selects the dates and the
database returns a date wise report. A simple partial view is used to view the report.
The reports can be downloaded as a PDF file for further use.
Pg. 55
3.4.10 Reports – Location Wise, Date Wise
Same the Date Wise report this report gets the location for which the report is
requested, then the date picker is used to enter the date range and the report is retrieved.
This report can also be downloaded in PDF format for record and analysis purposes.
The purpose of class diagram is to model the static view of an application. Class
diagrams are the only diagrams which can be directly mapped with object-oriented
languages and thus widely used at the time of construction.
UML diagrams like activity diagram, sequence diagram can only give the sequence
flow of the application, however class diagram is a bit different. It is the most popular
UML diagram in the coder community.
Pg. 56
The purpose of the class diagram can be summarized as −
Class - User
Field Type
UserID Int
UserName String
Email String
Password String
This class is used to define the Web Users i.e. the users who will control the web
portal. The fields are self-explanatory.
Locations
AdminPanelCntroller.cs
UserControler.cs
Pg. 57
UserID Int
UserName String
Password String
IsLogin Bool
This class will define the operators who will operate the mobile devices. The isLogin
field is of Boolean type, showing that whether the operator is active or not. The rest of
the fields are self-explanatory.
Locations
DeviceUserController.cs
Index.cshtml (Area\Management\Views\DeviceUsers)
Class – Fares
Field Type
FairID Int
LocationID Int
Vehicle_type_id Int
Charges Double
IsActive Bool
CreatedDate Date
CreatedBy Int
UpdatedDate Date
UpdatedBy Int
The Fares class will be used to define the fares. This class has a relationship with the
Location and vehicle_type. The CreatedBy, CreatedDate, UpdatedBy and UpdatedDate
are check fields in case the something controversial arises regarding the definitions of
fares.
Locations - Areas\vehicles
FareController.cs (Controller)
_Create.cshtml (Views)
_Edit.cshtml (Views)
Class – Locations
Field Type
LocationID Int
IsActive Bool
Name String
CreatedDate Date
CreatedBy Int
UpdatedDate Date
UpdatedBy Int
The location class will be used to define the locations. The fields are very much easy to
understand.
Pg. 58
Locations - Areas\Management
LocationController.cs (Controllers)
_Create.cshtml (Views)
_Edit.cshtml (Views)
Class – Vehicle_type
Field Type
Vehicle_type_id Int
Status Bool
Name String
CreatedDate Date
CreatedBy Int
UpdatedDate Date
UpdatedBy Int
The vehicle_type class will be used to define the types of vehicle. The fields are very
much easy to understand.
Locations – Areas\Vehicles
VehicleTypeController.cs (Controllers)
_Create.cshtml (Views)
_Edit.cshtml (Views)
Class - Devices
Field Type
DeviceID Int
SerialNo String
IsActive Bool
LocationID Int
UserID Int
CreatedDate Date
CreatedBy Int
UpdatedDate Date
UpdatedBy Int
This class defines the Devices, The SerialNo is the serial number of the SIM module,
the locationID is the location on which the device is to be used. The other fields are
simple to understand.
Location – Area\Management
DeviceController.cs (Controllers)
_Create.cshtml (Views)
_Edit.cshtml (Views)
Class – Tickets
Pg. 59
Field Type
TicketID Int
Ticket_no String
Date_created Datetime
User_id Int
Vehicle_type_id Int
Time_in Datetime
Location_id Int
Amount Int
The ticket class is the main class that controls the transections in this system, The
ticket_no is the vehicle number e.g. 8320 or 2392 etc. the Date_creates and Time_in are
the timings when a vehicle enters the parking site and the e-ticket issued. The amount is
the actual amount collected and the location_id is the id of the site where the vehicle is
parked.
Locations – Area\Vehicles
ReportController.cs (Controllers)
SiteAndDateWiseController.cs (Controller)
VehicleReport.cshtml (Views\Reports)
VehicleReport.cshtml (Views\SiteWiseDateWise)
Pg. 60
CHAPTER 4
Development
Pg. 61
4 Development Plan
Architecture Diagram
Mobile Application
Web Application
Pg. 62
4.1 Mobile Application
This is the main starting point where the system checks whether the internet
connectivity is active. Then the system checks for the Bluetooth connectivity and
availability of the Bluetooth printers. If both the conditions meet the criteria, the system
prompts the operator for username and password. The operator provides the username
and password and a call is made to the API. The API returns json result. If there are any
errors mismatch of username, password and the SIM number, the system will prompt
an error else the system will get the fares of the vehicles and create a localBD, create
tables Fares and Tickets, insert fare record. After the process, the system moves on to
the next activity.
Pg. 63
4.1.2 The Main Menu
After the operator or the admin user login, there are three to four options. The Check
In, Check Out (not functional) Reports, and the Admin Operation for Admin user. If
any of the users wants to logout, the logout process makes an API call and marks the
user inactive in the database.
Pg. 64
4.1.3 Selecting the Vehicle Type
In this activity the user, select the vehicle type for dispensing of the ticket. The activity
starts by getting the variable from the previous activity and the gets the fares for all the
vehicle types from the localDB. If due to any reason, the fares table us null the system
generates an error and the user is prompted to logout and login again. This gets the
fares from the cloud DB and stores in the Fare table of the local DB. Then the vehicle
for which the ticket is dispensed is selected. The system checks whether the vehicle
type is allowed on that parking site. This happens when the admin defines a site from
the portal, the admin needs to define the types of vehicles it will cater and their parking
rates. The check is that the operator be in the limits of dispensing tickets rather than
creating ambiguity for dispensing wrong type of tickets.
Pg. 65
4.1.4 Add Parking
Pg. 66
Figure 36 Mobile App - Add Tickets
In this activity, the operator dispenses the ticket. The activity start and checks for the
variable brought from the previous activity. Check the type of vehicle that was select
and checks for the printer connectivity as sometimes the printer gets disconnected due
to any reason line time off or distance more than 10 m etc. Then the user is prompted to
enter the vehicle number. If the number is empty, an error message appears, asking the
operator to reenter the number. The system then prepares the ticket i.e. gets the
graphics and necessary variables and then prints the ticket. Then the system checks the
internet connection and if the connection is ok, the system makes an API call, saves the
data on the net, and then saves the data to the tickets table in the localDB. If for any
reason the internet connection is not on, the system saves the data on the localDB and
prompts that the data has been saved but not synced to the internet. The system then is
again ready for the user to enter the data.
Pg. 67
4.1.5 Reports
In this activity, the operator prints the daily reports. The system gets the tickets from
the local DB, loops over the number of tickets available. Adds all the ticket count for
each vehicle. The system then prepares the ticket and sends the ticket to the printer
Pg. 68
4.1.6 Date Wise Reports
In this activity, the operator prints the date wise reports. The system gets the tickets
from the local DB in a given range of dates, loops over the number of tickets available.
Adds all the ticket count for each vehicle. The system then prepares the ticket and sends
the ticket to the printer.
Pg. 69
4.1.7 Administration – Synchronization
Pg. 70
Figure 39 Mobile App - Sync Records
The admin operation contains two operations, the delete records and the sync data. The
sync operation. Due to the fluctuation in the 4G internet sometimes the data is not save
to the cloud database, but the data is not lost and saved in the tickets table of the local
db. To reconcile the revenue, and looking into the problem of un-synced data the
synchronization process is used. When the process starts it checks the internet
connectivity as it is must to have to send data to the internet. Then the process gets the
list of all tickets not marked as IsSync. If the count is zero the system prompts the user
that there are no records for synchronizing, else it starts a loop for the number of counts
not marked as isSync and makes an API call and saves the data on the cloud DB and
updates the localDB and marks the record as isSync. If there are no errors during
synchronization process the system prompts the user for a successful operation else
prompts for an error.
Pg. 71
4.2 Web Portal
Pg. 72
The system starts and the checks if the username and the password is saved in the
cookies. If the null in cookies the system prompts the user to enter username and
password. If the cookies are present, the username and password are filled in the text
fields. The system then checks for the username and password. If the fields exist the
system displays the Dashboard view and data from the tickets table is shown on the
dashboard.
Pg. 73
4.2.2 CRUDs – Vehicles
Pg. 74
The user selects the Vehicle type to perform CRUDs on vehicles. The system starts by
calling the VehicleType controller and gets the list from vehicles from the vehicles
table of the DB. The system returns the view displaying the list of available vehicles
from the index.cshtml. The user can perform the CRUD operations in the Create, Edit
and Delete functions in the VehicleType controller. The system uses the Entity
framework to perform these operations.
Pg. 75
4.2.3 CRUDs – Fares
Pg. 76
The user selects the Fares to perform CRUDs on Fares. The system starts by calling the
Fares controller and gets the list of fares from the fares table of the DB. The system
returns the view displaying the list of available fares from the index.cshtml of fares
view. The user can perform the CRUD operations in the Create, Edit and Delete
functions in the Fares controller. The system uses the Entity framework to perform
these operations.
Pg. 77
4.2.4 CRUDS – Locations
Pg. 78
The user selects the location to perform CRUDs on locations. The system starts by
calling the Location controller from the Manager Area and gets the list of location from
the locations table of the DB. The system returns the view displaying the list of
available locations from the index.cshtml of Location view in the Area Manager. The
user can perform the CRUD operations in the Create, Edit and Delete functions in the
Location controller. The system uses the Entity framework to perform these operations.
Pg. 79
4.2.5 CRUDs – Mobile Devices
Pg. 80
The user selects the Device option from the Management section to perform CRUDs on
devices. The system starts by calling the device controller from the Manager Area and
gets the list of devices from the devices table of the DB. The system returns the view
displaying the list of available devices from the index.cshtml of Devices view in the
Area Manager. The user can perform the CRUD operations in the Create, Edit and
Delete functions in the Device controller. The system uses the Entity framework to
perform these operations.
Pg. 81
4.2.6 CRUDs – Devices Users
Pg. 82
The user selects the Device User option from the Management section to perform
CRUDs on Device Users. The system starts by calling the Device User controller from
the Manager Area and gets the list of Device Users from the Device Users table of the
DB. The system returns the view displaying the list of available Device Users from the
index.cshtml of Device Users view in the Area Manager. The user can perform the
CRUD operations in the Create, Edit and Delete functions in the Device User
controller. The system uses the Entity framework to perform these operations.
Pg. 83
4.2.7 Reports - Datewise
Pg. 84
The user calls the Reports by selecting the type of dates from the main menu the date
wise report displays the reports on date-to-date basis. The system calls the report
controller and display the view for the user to enter the date range. As the date ranges
are entered, the system calls the Vehicle Report function of the ReportController and
gets the list of vehicles date wise. The view is displayed by the VehicleReport.cshtml in
View\Report folder in Vehicles area.
Pg. 85
4.2.8 Reports – Datewise and Location Wise
Pg. 86
The user calls the Reports by selecting the Site and Date Wise Reports from the main menu the
Site and date wise report displays the reports on date-to-date and site wise. The system calls the
report controller and display the view for the user to enter the date range. As the date ranges are
entered, the system calls the Vehicle Report function of the ReportController and gets the list of
vehicles date wise. The view is displayed by the SiteReport.cshtml in View\Report folder in
Vehicles area.
Pg. 87
5 Difficulties
Overall, this project is a very challenging project. This sort of e-ticketing system did
not exist when the project was initiated. No help was available how to get started.
Working as an accountant throughout the years and being new to parking industry and
at the same time working for the Government Department was not easy. The
requirement collect was all the way challenging. The field staff was not helpful at all
and the manual systems made by the office staff was now reliable and worthy at all. For
this reason, at least three months were spent on the parking sites studying how the
system worked manually. The staff of the revenue department provided some help, that
how the inputs should be and what results are required.
For the technical part, as it was decided to use Xamrin, MVC, ColdFusion and SQL
Server. Though developed, lots of applications using ColdFusion for web and C# or
VB.net for desktop applications with SQL Server as backend DB, but Xamarin and
MVC was totally new, therefore the learning graph was quite deep. Further, the most
difficult part was to write the DLL for the printer. The printer that is used is the MPT-II
Bluetooth thermal printer. The printer came with a Java based SDK in a JAR file
format, which was not possible to use with Xamarin as it uses Microsoft platform and
the technical team of MPT-II were also not very helpful. The challenge was to either
rewrite the whole SDK or somehow convert the Jar file to DLL. Thanks to Microsoft’s
Bindings Library(Android) option, the jar file was converted to DLL after lots and lots
of RND, but still using it in the system was another challenge as the placement of .SO
files were not clear. Ultimately, with lots of googling and SOS messages to different
forums, the help came, and it took around one month to complete the job to use the
printer.
Currently the work is being conducted on preparing the off-street parking solution, like
in malls or hospitals. As the current solution is for on-street parking, on the off-street
parking the mobile device can be used as emergency backup, if the desktop systems
goes off due to any reason. The desktop solutions uses a camera to recognize the
Number Plates at the check-in stage, and saves the images of the vehicles in the DB.
The e-ticket issued prints a barcode on the ticket. When the vehicle checks-out, the
operator scans the barcode, the system displays all the information taken at the time of
check-in including the image of the vehicle, and if the information matches, an Arduino
based device send the signal to the boom barrier, allowing the vehicle to exit.
Pg. 88
6.2 The Parking Machine Approach
Another approach to the desktop application is installing the parking machines. The
hardware consists of a waterproof casing in which a complete desktop machine along
with other required peripherals like a camera, thermal printer and a PoE switch is
preinstalled. A loop sensor and an Arduino device recognizes the car, to automatically
detects the arrival of the car and dispense the e-ticket.
Another extension of the same system is the valet car park application. Usually in
malls, due to congestion in the parking space, the malls management wants to facilitate
their customers, by providing them the valet car park. The valet car park operator issues
an e-ticket using the mobile application and two tickets are generated, one for the valet
operator to be attached to the car keys for reference and a copy for the customer. As
soon as the entry appears on the web portal, the administrator provides necessary
details like the Parking Lot Number, Parking Bay, and Key Number for reference.
Another application, which the customer can either download from Google Play store,
or can approach the valet help desk and use the kiosk to enter the ticket number when
ready to leave. As soon as the customer enters the ticket number to call for the vehicle,
the system administrator receives a notification and upon clicking the notification
message the complete details of the car entered at the time of arrival is displayed. The
system administrator assigns a driver, locates the keys with the key number reference,
and marks the car for arrival. A screen in the waiting lobby displays a queue in which
the customer is notified that his/her car is the arrival queue. Upon the arrival of the
vehicle, the system notifies the customer on the queue screen that the car has arrived.
When the customer leaves the exit gates, the car is marked as exited and is removed
from the queue.
Pg. 89
REFERENCES
“Xamarin Tutorials”
[university.xamarin.com/]
Pg. 90
“Xamarin Training and Tutorials”
[lynda.com/Xamarin-tutorials/8230-0.html]
“JSON Tutorials”
[w3schools.com/Js/js_json_intro.asp]
“Binding a .JAR”
[developer.xamarin.com/guides/android/advanced_topics/binding-a-java-library/
binding-a-jar/]
Pg. 91
APPENDIX
FIGURE 1 USE CASE MOBILE APPLICATION 14
FIGURE 2 USE CASE WEB PORTAL 18
FIGURE 3 WATER FALL MODEL 28
FIGURE 4 SPIRAL MODEL 29
FIGURE 5 RAPID APPLICATION DEVELOPMENT 31
FIGURE 6 AGILE MODEL 33
FIGURE 7 WATER FALL MODEL 35
FIGURE 8 SPIRAL MODEL 35
FIGURE 9 VU MODEL 36
FIGURE 10 TEAM STRUCTURE 38
FIGURE 11 GANT CHART 40
FIGURE 12 DESIGN PHASE 43
FIGURE 13 ARCHITECTURE DIAGRAM - MOBILE APP 45
FIGURE 14 ARCHITECTURE DIAGRAM - WEB PORTAL 45
FIGURE 15 SEQUENCE DIAGRAM - LOGIN MOBILE APP 47
FIGURE 16 SEQUENCE DIAGRAM SELECT VEHICLE MOBILE APP 48
FIGURE 17 SEQUENCE DIAGRAM - ADD PARKING MOBILE APP 48
FIGURE 18 SEQUENCE DIAGRAM DAILY REPORT MOBILE APP 49
FIGURE 19 SEQUENCE DIAGRAM DATE WISE REPORT MOBILE APP 49
FIGURE 20 SEQUENCE DIAGRAM SYNCHRONIZATION PROCESS MOBILE APP 50
FIGURE 21 SEQUENCE DIAGRAM LOGIN WEB PORTAL 50
FIGURE 22 SEQUENCE DIAGRAM ADD VEHICLES WEB PORTAL 51
FIGURE 23 SEQUENCE DIAGRAM ADD FARES WEB PORTAL 52
FIGURE 24 SEQUENCE DIAGRAM ADD LOCATIONS WEB PORTAL 53
FIGURE 25 SEQUENCE DIAGRAM ADD DEVICES WEB PORTAL 53
FIGURE 26 SEQUENCE DIAGRAM ADD DEVICE USERS WEB PORTAL 54
FIGURE 27 SEQUENCE DIAGRAM ADD WEB USERS WEB PORTAL 55
FIGURE 28SEQUENCE DIAGRAM DATE WISE REPORT WEB PORTAL 55
FIGURE 29 SEQUENCE DIAGRAM LOCATION WISE REPORTS WEB PORTAL 56
FIGURE 30 CLASS DIAGRAM 57
FIGURE 31ARCHITECTURE DIAGRAM MOBILE APP 62
FIGURE 32 ARCHITECTURE DIAGRAM WEB PORTAL 62
FIGURE 33 MOBILE LOGIN 63
FIGURE 34 MOBILE APP - MAIN MENU 64
FIGURE 35 MOBILE APP - CHECK IN 65
FIGURE 36 MOBILE APP - ADD TICKETS 67
FIGURE 37 MOBILE APP - REPORTS 68
FIGURE 38 MOBILE APP - DATE WISE REPORTS 69
FIGURE 39 MOBILE APP - SYNC RECORDS 71
FIGURE 40 WEB PORTAL - LOGIN SCREEN 72
FIGURE 41 WEB PORTAL - DASH BOARD 72
FIGURE 42 WEB PORTAL - CRUD VEHICLES 74
FIGURE 43 WEB PORTAL - CRUD FARES 76
FIGURE 44 WEB PORTAL - CRUD LOCATIONS 78
FIGURE 45 WEB PORTAL - CRUD MOBILE DEVICES 80
FIGURE 46 WEB PORTAL - CRUD DEVICE USERS 82
FIGURE 47 WEB PORTAL - REPORTS 84
FIGURE 48 WEB PORTAL - REPORTS DATEWISE LOCATION WISE 86
Figure 49 Database Diagram 87
Pg. 92
Pg. 93