0% found this document useful (0 votes)
23 views59 pages

FINAL REPORT-App For Prisoners

final year engineering project report .

Uploaded by

Priya shivam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views59 pages

FINAL REPORT-App For Prisoners

final year engineering project report .

Uploaded by

Priya shivam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 59

+

APP FOR PRISONERS REHABILITATION

A PROJECT REPORT

Submitted by

POOJA M (111420104077)
SAKSHI KUMARI P (111420104086)
YUVALAKSHMI G (111420104106)

in partial fulfillment for the award of the degree

of

BACHELOR OF ENGINEERING

in

COMPUTER SCIENCE AND ENGINEERING

PRATHYUSHA ENGINEERING COLLEGE

THIRUVALLUR-602 025

ANNA UNIVERSITY :: CHENNAI 600 025

APRIL 2024
ANNA UNIVERSITY :: CHENNAI 600 025

BONAFIDE CERTIFICATE

Certified that this project report “APP FOR PRISONERS REHABILITATION” is the
bonafide work of “POOJA (111420104077), SAKSHI KUMARI P (111420104086)
YUVA LAKSHMI (111420104106)” who carried out the project work under my
supervision.

SIGNATURE SIGNATURE
Dr. THAMBA MESHACH W, MS. SRIPRIYA . N,
ASSOCIATE PROFESSOR, ASSISTANT PROFESSOR,
HEAD OF THE DEPARTMENT, SUPERVISOR,
Department of CSE, Department of CSE,
Prathyusha Engineering College, Prathyusha Engineering College,
Thiruvallur-602 025. Thiruvallur- 602 025.

Place: Thiruvallur
Date:

Submitted for the Project Viva-Voce held on ......................................... at Prathyusha


Engineering College, Thiruvallur-602 025.

INTERNAL EXAMINER EXTERNAL EXAMINER


ACKNOWLEDGEMENT

Our sincere thanks to Shri. P. RAJARAO, Chairman, Shri. CHARAN TEJA, Vice
Chairman and Smt. P. PRATHYUSHA, CEO, Prathyusha Engineering College for
facilitating us to do this project.
We are sincerely thanking Dr. P. M. BEULAH DEVAMALAR, Director(A&D) for
inspiring us.
We would like to express our heartfelt gratitude to Dr. B. R. RAMESH BAPU,
Principal of Prathyusha Engineering College, for supporting our efforts on this initiative.
We are sincerely thanking Dr. THAMBA MESHACH W, Associate Professor, Head
of the Department, our internal guide for supporting us in all stages of project conduction and
for his guidance for the successful completion of this project.
We are grateful to our project coordinator Mr. CHRISTAL ANAND S, Assistant
Professor, for her valuable suggestions and guidance.
We are more thankful to our project guide Ms. Sripriya. N , Assistant Professor, for
assisting us with her suggestions to complete our project.
We also wish to extend our sincere thanks to all the committee members for their
constant support throughout the review.
We wish to express our sincere gratitude to PARENTS AND FRIENDS for valuable
help, cooperation, and encouragement during this project work.
Last but not least, we wish to express our sincere thanks to the entire teaching faculty
and non-teaching staff for their support.
ABSTRACT

According to the latest available data compiled by the National Crime Records
Bureau (NCRB) for 2020, about 76% of all prison inmates in the country were
undertrials, of which about 68% were either illiterate or school dropouts. An
undertrial is an accused person who is being held in custody by a court of law and is
awaiting trial for a crime. Many prisoners are unable to get bail due to lack of
economic resources. Most of them face problems of overcrowding and shortage of
adequate space to lodge prisoners in safe and healthy conditions.

The prime objective of this project –“App for prisoners rehabilitation.” is to design
an app connecting undertrial prisoners with lawyers and able to apply for legal aid.
The user can connect with the lawyers through the chat room available in the app.
The user can record their message instead of texting, for their ease. They can also
connect with clinical doctors for healthcare assistance. This app will assist users with
rehabilitation like mental health support, education, vocational training by allowing
them to choose their topic of interest for enhancing their knowledge.

In conclusion, this app stands as a beacon of hope in the realm of criminal justice
reform, demonstrating the potential for technology to positively impact the lives of
undertrial prisoners. By combining legal aid, healthcare support, and avenues for
educational and vocational training, the project strives to create a more holistic and
rehabilitative environment for individuals within the criminal justice system.

i
TABLE OF CONTENTS

CHAPTER TITLE PAGE


NO NO
ABSTRACT i
LIST OF FIGURES v
LIST OF TABLES vi

LIST OF SYMBOLS x

1 INTRODUCTION

1.1 OVERVIEW 1

1.2 OBJECTIVE 1

1.3 LITERATURE SURVEY 2

2 SYSTEM ANALYSIS

2.1 EXISTING SYSTEM 5

2.1.1 DISADVANTAGES 5

2.2 PROPOSED SYSTEM 5

2.2.1 ADVANTAGES 5

ii
CHAPTER TITLE PAGE
NO NO

3 SYSTEM REQUIREMENTS
3.1 HARDWARE REQUIREMENTS 6
3.2 SOFTWARE REQUIREMENTS 6

3.3 SOFTWARE DESCRIPTION 7

4 SYSTEM DESIGN

4.1 SYSTEM ARCHITECTURE 15

4.2 UML DIAGRAM 16


4.2.1 USE CASE DIAGRAM 17
4.2.2 ACTIVITY DIAGRAM 19
4.2.3 SEQUENCE DIAGRAM 20
5 SYSTEM IMPLEMENTATION

5.1 LIST OF MODULES 22

5.2 MODULE DESCRIPTION 22

5.2.1 BOOK APPOINTMENTS 23


5.2.2 CHAT AND VIDEO CONFERENCING 23
5.2.3 AI ASSISTED CHATBOT 24
5.2.4 REHABILITATION SERVICES

iii
CHAPTER TITLE PAGE
NO NO

6 TESTING

6.1 UNIT TESTING 23


6.1.1 TEST CASES 23
6.2 INTEGRATION TESTING 24
6.3 SYSTEM TESTING 25
7 RESULTS AND DISCUSSION
7.1 RESULTS 27
7.2 DISCUSSION 27
8 CONCLUSION AND FUTURE ENHANCEMENT
8.1 CONCLUSION 29
8.2 FUTURE ENHANCEMENT 29

ANNEXURE
APPENDIX 1 SOURCE CODE 31
APPENDIX 2 OUTPUT SCREENSHOT 43
REFERENCES 48

iv
LIST OF FIGURES

FIGURE.NO FIGURE NAME PAGE NO.

4.1 System Architecture for prisoners


rehabilitation app

15

4.2 Use case Diagram for prisoners


rehabilitation app

16

4.3 Activity Diagram for


prisoners rehabilitation app
18

4.4 Sequence Diagram for prisoners


rehabilitation app

19

v
LIST OF TABLES

TABLE NO TABLE NAME PAGE NO

6.1.1 Test cases for prisoners

rehabilitaton app 24

vi
LIST OF SYMBOLS

S.NO NOTATION NOTATION DESCRIPTION


NAME

Represents a collection of
similentities grouped
together.
1. Class

Associations represent
2. Association NAME static relationships
between classes.

Roles represent the way


ROLE
the two classes see each
other.

3. Actor Specifies a role played by


a user that interacts with
the subject.

vii
S.NO NOTATION NOTATION DESCRIPTION
NAME

4. Comunication Communication between


various use cases.

5. Initial State Initial state of the object

6. Final state Final state of the object

7. Control flow Represents various control


flow between the states.

8. Decision box Represents decision


making process from a
constraint.

viii
S.N NOTATION NOTATION DESCRIPTION
O NAME

9. Use case Interaction between the


system and external
environment.

10. External entity Represents external


entities such as keyboard,
sensors, etc.

11. Transition Represents


communication that
occurs between Processes.

12. Object Lifeline Represents the vertical


dimensions that the object
communications.

13. Message Message Represents the message


exchanged

ix
CHAPTER 1

INTRODUCTION

1
CHAPTER 1

INTRODUCTION

1.1 OVERVIEW

In many countries, the issue of undertrial prisoners remains a significant concern within the
criminal justice system. According to the latest available data compiled by the National
Crime Records Bureau (NCRB) for 2020, about 76% of all prison inmates in the country
were undertrials, of which about 68% were either illiterate or school dropouts. An undertrial
is an accused person who is being held in custody by a court of law and is awaiting trial for
a crime. Many prisoners are unable to get bail due to lack of economic resources. Most of
them face problems of overcrowding and shortage of adequate space to lodge prisoners
in safe and healthy conditions. Historically, undertrial prisoners have encountered barriers in
accessing legal assistance due to factors such as financial constraints, lack of information,
and inefficiencies within the legal system. This results in prolonged detention periods,
overcrowded prisons, and systemic injustices. Similarly, undertrial prisoners frequently
experience inadequate healthcare services, leading to untreated medical conditions,
exacerbation of illnesses, and compromised well-being. Moreover, the absence of
rehabilitation programs within correctional facilities hinders the reintegration process,
perpetuating cycles of recidivism and social marginalization.
Against this backdrop, the "App for Undertrial Prisoners" project emerges as a proactive
response to mitigate these challenges and promote the rights and welfare of undertrial
prisoners.Thus, this app stands as a beacon of hope in the realm of criminal justice reform,
demonstrating the potential for technology to positively impact the lives of undertrial
prisoners. By combining legal aid, healthcare support, and avenues for educational and
vocational training, the project strives to create a more holistic and rehabilitative
environment for individuals within the criminal justice system.

2
1.2 OBJECTIVE

The objective of this application is to facilitate undertrial prisoners with access to legal aid,
healthcare, and rehabilitation services. Streamline communication between prisoners, legal
professionals, healthcare providers, and support organizations.

1.3 LITERATURE SURVEY

[1] "Rehabilitation and Reintegration of Prisoners in India: A Review of Current


Practices and Challenges" by Shalini Wadhwa, Vol 5 in 2023.

In this paper, the purpose is to examine the current landscape of prisoner


rehabilitation and reintegration practices in India. It explores existing programs,
policies, and challenges faced in the rehabilitation process within the Indian context.
The insights from this review can provide valuable guidance for designing an
effective app for prisoners' rehabilitation

[2] "The Effectiveness of Rehabilitations in Prisons and the Criminal Justice


System" by Nishchal Sigdel,Vol 11 in 2023.
● Rehabilitation programs play a crucial role in the criminal justice system,
aiming to reduce recidivism rates by providing inmates with the necessary tools
for successful reintegration into society.
● Effective rehabilitation programs encompass various components such as
education, vocational training, mental health and substance abuse treatment,
and life skills training.
● Participation in rehabilitation programs has been associated with lower rates of
recidivism, indicating their potential to contribute to successful reintegration
and societal benefit.
● Studies suggest that inmates who engage in rehabilitation programs are less
likely to reoffend and return to prison compared to those who do not participate,
highlighting the effectiveness of such interventions
● The findings underscore the importance of adequate resources, funding, and

3
support for the successful implementation of rehabilitation programs within the
criminal justice system.

[3] “Rehabilitation Programs in Prison: Helping the Self wounded to Heal " by
Prativa Poude, Vol 36, in March 2023.
The paper explores the current system of Central Jail (NAKHU JAIL), emphasizing
the need for rehabilitation programs, identifying challenges faced, and proposing methods to
enhance their effectiveness.

[4] "The Human Rights of the Under Trial Prisoners in India


" by Dr.Prashant KumSrivastava, volume 120, issue 1, in September 10 2023.
The study presents an exploratory analysis the criminal justice system is to ensure that the
human rights of victims, prisoners, and those under trial are respected and upheld.
The modern concept of prisons as rehabilitation centers emphasizes the importance of
respecting inmates' human rights and providing opportunities for them to reintegrate into
society upon release.In many countries, parole systems contribute to prison overcrowding,
highlighting the need for reforms in the administration of sentences to alleviate pressure on
prison facilities.

4
CHAPTER 2

SYSTEM ANALYSIS

5
CHAPTER 2

SYSTEM ANALYSIS

The system study is to provide the description about the existing system,
and proposed system of the project.

2.1 EXISTING SYSTEM:


• Justice AI: It is an innovative legal assistant app powered by artificial intelligence,
offering quick and accurate legal guidance. Allowing to interact with intelligent
chatbot to provide advice and consultations to understanding complex jargon.
• Practo: It offers complete telemedicine solutions via video conferencing or
through online doctor chat. Practo provides a convenient platform for users to
search for healthcare providers, book appointments, and access medical services
from the comfort of their homes or on the go.

2.1.1 DISADVANTAGES
➢ AI algorithms are not infallible and may produce errors or
inaccuracies, especially when interpreting complex legal documents or
statutes. Relying solely on AI for legal advice without human oversight
could lead to incorrect conclusions or recommendations.
➢ While some features of Practo are free to use, certain services
such as online consultations or booking appointments with premium
healthcare providers may incur fees. This could pose a barrier to access for
individuals with limited financial resources.

2.2 PROPOSED SYSTEM

● Appointment Booking System: This app will facilitate the booking of appointments
with legal professionals, streamlining the process of scheduling consultations and
6
meetings.
● AI-Powered Legal Assistance: The app will leverage artificial intelligence (AI)
technology to provide users with legal guidance, document analysis, and case
research, enhancing efficiency and accuracy in legal decision-making via chatbots.
● Feedback and Rating System: It will incorporate a feedback and rating system,
enabling users to provide feedback on their experiences with legal professionals,
promoting transparency and accountability.
● Chat and video conferencing: It will allow users to search for doctors based on
specialty, location, availability, and patient reviews, facilitating easy booking of
appointments. consult with doctors remotely via video calls or chat, providing
convenient access to medical advice and treatment.
● Vocational Training Resources: The app will provide educational resources and
training materials on various legal topics, empowering users with knowledge and
skills to navigate the legal system effectively.
2.2.1 ADVANTAGES
• Comprehensive Healthcare and Legal Assistance: App provides a one-stop solution
for users to access both legal and medical assistance within a single platform. This
integration allows users to address both legal and health-related concerns efficiently
and effectively, saving time and effort.
• Stay informed : Keep up-to-date with legal news,changes, and notable case studies via
personalized notifications.

7
CHAPTER 3

SYSTEM REQUIREMENTS

8
CHAPTER 3
SYSTEM REQUIREMENTS

INTRODUCTION
The system requirements for implementing application for prisoners rehabilitation depend
on the specific use case and the technology used. Here are some general system
requirements to consider when implementing application:
• Hardware: It should be accessible on various devices such as smartphones, tablets,
and computers to ensure compatibility with different user preferences and
technological capabilities.
• Software: It should be compatible with populoperating systems such as iOS, Android,
and Windows to reach a wide user base. A robust database management system
should be used to store and manage user data securely.
• Network Requirements: Sufficient bandwidth is necessary to support video calls,
document uploads/downloads, and other data-intensive activities without latency or
interruptions.
• User Interface Requirements: The platform should feature an intuitive and user-
friendly interface with easy navigation, clear layouts, and intuitive controls to enhance
user experience and accessibility.It should support multiple languages to cater to
diverse user populations, providing language options for user interfaces, content, and
communication.

3.1 HARDWARE REQUIREMENTS


Laptop Mobile
➢ CPU: Intel core i5 Memory: 4GB or more
➢ Memory: 6GB or more Storage: 64GB or more
➢ Storage: 256GB SSD Camera

9
3.2 SOFTWARE REQUIREMENTS
Software Description is a technical specification of requirements of software
products. The following are the softwares we are using in our project:

✓ Android Studio

✓ Android Emulator

✓ Flutter SDK

✓ Dart SDK

3.3 SOFTWARE DESCRIPTION

3.3.1 Android Studio


Android Studio is the official integrated development environment (IDE) for Android
app development, provided by Google. Android Studio provides an intuitive and user-
friendly interface, making it easy for developers to navigate, edit code, and access various
functionalities. The IDE offers powerful code editing capabilities, including syntax
highlighting, code completion, and intelligent code analysis. Developers can easily refactor
code, rename variables, and extract methods to improve code quality and maintainability
Android Studio includes a visual layout editor that allows developers to design app layouts
visually, drag-and-drop UI components, and preview layout changes in real-time across
different screen sizes and orientations.
Some key features of Android Studio include:
1. Visual Layout Editor: Android Studio includes a visual layout editor that allows
developers to design app layouts visually, drag-and-drop UI components, and preview
layout changes in real-time across different screen sizes and orientations..
2. Emulator and Device Testing: The IDE comes with an Android Emulator for testing
apps on virtual devices with various Android versions, screen sizes, and hardware
configurations. Developers can also run and debug apps directly on physical Android
devices connected via USB.
10
3. Integration with Google Services: The IDE integrates seamlessly with Google services
and APIs, allowing developers to incorporate features such as Maps, Firebase, Google Sign-
In, and AdMob into their apps. This integration simplifies the process of adding powerful
functionality to Android applications.

4. Code Editing and Refactoring: The IDE offers powerful code editing capabilities,
including syntax highlighting, code completion, and intelligent code analysis. Developers
can easily refactor code, rename variables, and extract methods to improve code quality and
maintainability.
5. Performance Profiling Tools: Android Studio offers performance profiling tools to
analyze app performance, identify bottlenecks, and optimize CPU, memory, and network
usage. Developers can diagnose performance issues, measure app startup time, and improve
app responsiveness.

3.3.2 Android Emulator

An emulator is a software program or hardware device that enables a


computer system (the host) to mimic the behavior of another computer system (the
guest) or a different hardware platform. Emulators replicate the functionality of one
system on another, enabling software designed for one platform to run on another.
They are invaluable tools for software development, allowing developers to test
applications across various platforms without needing physical devices. Emulators
also serve as powerful debugging and troubleshooting tools, providing insights into
code execution and system behavior.
Features of Android Emulator include:
✓ Platform compatibility
✓ Development and testing environment
✓ Security features
✓ User-friendly interface

11
✓ Accessibility features
✓ Real-time communication
✓ Document management
✓ Feedback and rating system

3.3.3 Flutter SDK


Flutter SDK, which is used for building cross-platform mobile applications, has
specific requirements for development. With compatibility across Windows, macOS, and
Linux, developers can leverage its flexibility to create applications for a wide range of
devices. Flutter requires a minimum of 3 GB of disk space and 4 GB of RAM for smooth
performance. Development tools such as Git, Android Studio, or Visual Studio Code are
essential for coding, debugging, and testing Flutter apps. Additionally, the Flutter ecosystem
offers a plethora of dependencies and packages, enabling developers to integrate various
features and functionalities seamlessly. By meeting these requirements and leveraging
Flutter's capabilities, developers can build efficient, visually appealing, and feature-rich
applications for diverse user needs.
3.3.4 Dart SDK
The Dart SDK serves as a fundamental toolkit for developers aiming to create
versatile and robust applications using the Dart programming language. With compatibility
across Windows, macOS, and Linux operating systems, developers can seamlessly harness
its capabilities on diverse platforms. Requiring a minimum of 2 GB of disk space and 2 GB
of RAM, the Dart SDK empowers developers to build applications efficiently while
ensuring smooth performance.
Coupled with a range of development tools such as Dart Editor, IntelliJ IDEA, and Visual
Studio Code, developers have ample resources for coding, testing, and debugging Dart
applications. Furthermore, the Dart ecosystem offers a rich repository of dependencies and
packages, facilitating the integration of additional functionalities tailored to diverse project
requirements.
Overall, by meeting these requirements and leveraging the Dart SDK's features, developers
12
can craft scalable, high-performance applications across various domains with ease.

The Dart SDK's support for asynchronous programming and reactive patterns empowers
developers to build responsive and scalable applications capable of handling complex
user interactions.Dart's native support for internationalization and localization simplifies
the process of creating multilingual applications, making it easier to reach a global
audience.The Dart SDK's seamless interoperability with JavaScript enables developers to
leverage existing JavaScript libraries and frameworks, expanding the capabilities of their
applications
Dart's hot reload feature, available in development environments like Flutter, enables
developers to instantly see changes to their code reflected in the application, speeding up
the iteration process and enhancing productivity.
Dart's strong ecosystem of development tools, including code analyzers, linters, and
formatters, ensures consistent code quality and adherence to best practices. The Dart
SDK's support for code splitting and tree shaking allows developers to optimize the size
of their applications, reducing load times and improving performance.
Dart's support for isolates enables developers to write concurrent and parallel code,
leveraging multi-core processors to improve application performance.

Dart's support for dependency injection and inversion of control patterns simplifies
application architecture and promotes code modularity and testability.

13
CHAPTER 4

SYSTEM DESIGN

14
CHAPTER 4

SYSTEM DESIGN

System design is the process of planning a new system or to replace the


existing system. Simply, system design is like the blueprint for building, it specifies
all the features that are to be in the finished product.

4.1 SYSTEM ARCHITECTURE

System architecture is the conceptual model that defines the structure,


behaviour and more views of a system. An architecture description is a formal
description and representation of a system, organized in a way that supports
reasoning about the structures and behaviours of the system.

Fig 4.1 System Architecture for app for undertrial


prisoners

15
4.2 UML DIAGRAM

4.2.1 USE CASE DIAGRAM

Use Cases are used to describe the visible interactions that the system will
have with users and external systems. They are used to describe how a user would
perform their role using the system. In our project, the user can register as either
lawyer,doctor,consultant or under trial prisoners.User entity interacts with the
system and performs desired operations.

Figure 4.2.1 Use case diagram for prisoners rehabilitation app

16
4.2.2 ACTIVITY DIAGRAM

Activity diagram is defined as a UML diagram that focuses on the executionand flow of the
behavior of a system instead of implementation. It is also called object-oriented flowchart.
The user opens the application on their device. The users can book appointments for video
conferencing .They can chat with them and get their queries resolved.Users can make use of
AI assisted chatbots for asking legal aid queries.

Figure 4.2.2 Activity diagram


For prisoners rehabilitation app

17
4.2.3 SEQUENCE DIAGRAM

A Sequence diagram is a kind of interaction diagram that shows how


processes operate with one another and in what order. It is a construct of a
Message Sequence Chart. A sequence diagram shows object interactions
arranged in time sequence. In the case of an augmented reality-based application
for a , the sequence diagram would represent the interactions between the user,
the application and the .

Figure 4.2.3 Sequence diagram


For prisoners rehabilitation app

18
CHAPTER 5

SYSTEM IMPLEMENTATION

1
CHAPTER 5

SYSTEM IMPLEMENTATION

5.1 LIST OF MODULES

1. Book appointments

2. Chat and video conferencing

3. AI powered legal assistant chatbots

4. Rehabilitation services

5.2 MODULE DESCRIPTION

5.2.1 Book appointments

✓ Upon registration, users create their profiles, providing necessary details such as name,
contact information, and role (e.g., undertrial prisoner, lawyer, doctor, consultant).
✓ Next, Users can select the type of appointment they require (legal consultation, medical
check-up, rehabilitation session) from the available options.
✓ Users choose a convenient date and time for their appointment from the available slots
displayed by the system. Administrators have access to a dashboard where they can
manage appointment slots, view booking details, and resolve scheduling conflicts.
✓ After the appointment, users have the option to provide feedback on their experience,
helping to improve the system's services..

5.2.2 Chat and video conferencing


✓ Appointment Confirmation: Upon finding an available time slot, the system sends
a confirmation to both parties (user and professional) regarding the scheduled
appointment.
✓ Chat/Video Interface: At the scheduled time, users and professionals access the

20
chat or video conferencing interface provided by the system.
✓ Consultation Session: Users and professionals engage in a real-time chat or video
conversation, discussing the relevant legal or medical matters.
✓ Feedback Collection: Users and professionals have the option to provide feedback
on the consultation session, helping to improve the quality of service.

5.2.3 AI powered legal assistant chatbots

AI Chatbot Interaction: Users initiate a chat session with the AI-powered legal
assistant by selecting the "Legal Assistance" option from the menu.
Intelligent Questioning: The AI chatbot engages users in conversation, using natural
language processing (NLP) algorithms to understand user queries and provide relevant
responses.
Language Support: The AI chatbot supports multilingual capabilities, allowing users to
interact in their preferred language for improved accessibility.

5.2.4 Rehabilitation Services

This module offers a range of services including vocational training, counseling, and
community support programs. Users can access resources and participate in skill-building
workshops tailored to their interests and needs, promoting personal growth and
development.

21
CHAPTER 6

TESTING

22
CHAPTER 6

TESTING

SYSTEM TESTING AND IMPLEMENTATION

Testing is the process of executing a program or application with the intentof


finding software bugs, and to verify that the software product is fit for use.

6.1 UNIT TESTING

Unit testing focuses verification efforts on the smallest unit of software design in
the module. This is also known as module testing. The module of the system is tested
separately. First the user module is tested by choosing the input option and giving model
of the specific user credentials as input and the system receives it successfully. Next each
model of the user details is mapped to its and it is tested. After mapping, the specific user
details is projected successfully .

6.1.1 TEST CASES

ID TEST INPUT EXPECTE ACTUAL PASS/FAI


D L
ENVIRON RESULTS
-MENT RESULTS
TC001 Build User User should Successfully PASS
Environment Registration be registered registered

TC002 Build User Login User should Successfully PASS


Environment be logged in logged in

TC003 Build Searching Show the list Successfully PASS


Environment specialist(doc of specialists List shown
tor,lawyer,co

23
nsultant)

TC004 Build Booking Booked Successfully PASS


Environment appointment appointment booked
should be appointment
shown on shown
user
dashboard
TC005 Build Chat The consultor Successfully PASS
Environment Approval and can only able executed
to chat once
Denial after
accepting the
chat request
on his
willingness or
else he can
deny the end
user will be
blocked to
send other
messages.

Table 6.1.1 Test cases

6.2 INTEGRATION TESTING


Integration testing (sometimes called integration and testing, abbreviated
I&T) is the phase in software testing in which individual software modules are
combined and tested as a group. It occurs after unit testing and before verification
testing. Integration testing takes as its input modules that have been unit tested,
groups them in larger aggregates, applies tests defined in an
integration test plan to those aggregates, and delivers as its output the integrated
24
system ready for system testing. In the case of this cross platform application,
integration testing might involve testing the following components:
• The application: This would involve testing the functionality of the features, such as
registration,login,book appointments,edit profile,chat,video conference.
• The functionality: This would involve testing the functionality of the app, such as
fixing them and running it.
• The integration between the application and the functionality: This would involve
testing how the application interacts with the application, such as whether under trial
and lawyers,doctors can do video conferencing,chat.

6.3 SYSTEM TESTING

System testing is a type of software testing that aims to test the entire software application
as a whole, rather than individual components or modules. In the case of this cross platform
application, system testing would involve testing the entire application to ensure that it
meets the requirements and specifications, and that it is free of any bugs or issues that could
impact the user experience. System testing for cross platform application would typically
involve testing the following areas:

➢ Functionality testing
➢ Performance testing
➢ Usability testing
➢ Compatibility testing
➢ Security testing

25
CHAPTER 7
RESULTS AND DISCUSSION

26
CHAPTER 7
RESULTS AND DISCUSSION

7.1 RESULTS

The application empowers undertrial prisoners by providing them with access to


information, resources, and support services that can help them navigate the legal system,
address medical needs, and prepare for reintegration into society. By connecting undertrial
prisoners with lawyers, doctors, and rehabilitation service providers through a single
platform, the app fosters communication and collaboration among stakeholders, leading to
more effective case management and support. Through features such as vocational training,
counseling, and community support, the app can contribute to the rehabilitation and
reintegration of undertrial prisoners into society, reducing recidivism rates and promoting
positive outcomes.

7.2 DISCUSSION

The app presents a significant opportunity for addressing systemic challenges within
the justice system and improving the welfare of undertrial prisoners. By leveraging
technology to facilitate access to legal aid, medical consultations, and rehabilitation
services, the app has the potential to streamline processes, enhance communication,
and empower individuals who are navigating complex legal proceedings.
Overall , the app can best serve the needs of undertrial prisoners, promote fairness and
equity in the justice system, and contribute to their successful rehabilitation and
reintegration into society.

27
CHAPTER 8
CONCLUSION AND FUTURE ENHANCEMENT

28
CHAPTER 8
CONCLUSION AND FUTURE ENHANCEMENT

8.1 CONCLUSION

The proposed system is a pivotal step towards addressing the


multifaceted challenges faced by individuals in the justice system.
Through the integration of legal aid, medical support, and rehabilitation
services into a single platform.By providing chat/video conferencing
support, booking appointments, AI powered legal assistant chatbots,
Therefore, we can conclude that our application has the potential to
significantly improve access to justice, healthcare, and support resources
for undertrial prisoners.

8.2 FUTURE ENHANCEMENT

As a future recommendation there can be Implementation


of advanced encryption protocols and biometric authentication
to ensure the privacy and security of user data. Providing more
language localization options to accommodate users from diverse
linguistic backgrounds and improve accessibility. Assisting
undertrial prisoners in drafting legal documents such as motions,
petitions, and affidavits, with templates andguidelines tailored to
their specific case. Providing a simulated courtroom environment
where undertrial prisoners can practice answering questions,
presenting arguments, and responding to objections, helping them
prepare for court appearances.

29
ANNEXURE

30
ANNEXURE
APPENDIX I

SOURCE CODE

Main.dart

// ignore_for_file: deprecated_member_use

import 'dart:convert';

import 'package:appcode3/VideoCall/managers/call_manager.dart';
import
'package:appcode3/VideoCall/managers/push_notifications_manager.dart';
import 'package:appcode3/VideoCall/utils/platform_utils.dart';
import 'package:appcode3/VideoCall/utils/pref_util.dart';
import 'package:appcode3/views/ChatListScreen.dart';
import 'package:appcode3/views/DLC/loginAsDoctor.dart';
import 'package:appcode3/views/HomeScreen.dart';
import 'package:appcode3/views/AboutScreen.dart';
import 'package:appcode3/views/MoreScreen.dart';
import 'package:appcode3/views/SplashScreen.dart';
import 'package:appcode3/views/UserPastAppointments.dart';
import
'package:connectycube_flutter_call_kit/connectycube_flutter_call_kit.dart
';
import 'package:connectycube_sdk/connectycube_calls.dart';
import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:get/get.dart';
//import 'package:flutter_native_admob/native_admob_controller.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:appcode3/CustomAds.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'VideoCall/utils/consts.dart';
import 'VideoCall/utils/configs.dart' as config;
import 'notificationHelper.dart';

31
import 'package:http/http.dart' as http;
import 'en.dart';

/// old url


const String SERVER_ADDRESS = "https://vemsgroup.in/ghz/appo";
const String = "https://vemsgroup.in/ghz/appo/public/upload/banner/";

const String serverToken =


'AAAAL-
1vAFs:APA91bEKqY2o4ONc9ackXE0kfxmeQ7fqcUFVUBrnpr2QRmq
ukSZp9rpjH0eyMR0zTP2geI7uSrxepUM8dmD9QG2S4B8ioAM3Ct4g5
5WXkwL67ZAjXTaOfnE-nBleNGOdzKo3VmpnuHTh';

const LANGUAGE = "en";


int PHONE_NUMBER_LENGTH = 10;
const String ADMOB_ID = "";
const String FACEBOOK_AD_ID = "";

const defaultUser = 'assets/default-user.png';

const bool ENABLE_ADS = false;


//true -> enable
//false -> disable

const int AD_TYPE = 1;


//0 -> facebook // not working in ios that's why we removed it
//1 -> admob

int LANGUAGE_TYPE = 0;
//0 ---> English
//1 ---> Arabic

///CURRENCY AND CURRENCY CODE


String CURRENCY = "\₹";
String CURRENCY_CODE = "INR";

Color WHITE = Colors.white;


Color BLACK = Colors.black;
Color LIGHT_GREY_SCREEN_BACKGROUND =
Color.fromRGBO(222, 226, 229, 1.0);
Color LIGHT_GREY_TEXT = Colors.grey.shade500;
Color AMBER = Colors.amber.shade700;
String STRIPE_KEY = "";

32
String TOKENIZATION_KEY = "";
String RAZORPAY_KEY = "";

String LANGUAGE_FILE = "en";


CustomAds customAds = CustomAds();

const bool IS_CHAT = true;


const bool IS_VIDEO_CALL = true;

Color PRIMARY = Color(0xff01d8c9);

Future main() async {


WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
notificationHelper.initialize();
PushNotificationsManager.instance.init();
ConnectycubeFlutterCallKit.instance.init();
ConnectycubeFlutterCallKit.onCallAcceptedWhenTerminated =
onCallAcceptedWhenTerminated;
ConnectycubeFlutterCallKit.onCallRejectedWhenTerminated =
onCallRejectedWhenTerminated;
initForegroundService();
SystemChrome.setPreferredOrientations(
[DeviceOrientation.portraitUp, DeviceOrientation.portraitDown]);
runApp(App());
}

class App extends StatefulWidget {


const App({Key? key}) : super(key: key);

@override
State<App> createState() => _AppState();
}

class _AppState extends State<App> {


@override
void initState() {
super.initState();
initConnectycube();
}

initConnectycube() {
init(

33
config.APP_ID,
config.AUTH_KEY,
config.AUTH_SECRET,
onSessionRestore: () {
return SharedPrefs.getUser().then((savedUser) {
return createSession(savedUser);
});
},
);
}

@override
Widget build(BuildContext context) {
return GetMaterialApp(
home: Builder(builder: (context) {
CallManager.instance.init(context);
return SplashScreen();
}),
debugShowCheckedModeBanner: false,
theme: ThemeData(
timePickerTheme: TimePickerThemeData(
dayPeriodTextColor: Colors.cyanAccent.shade700,
//hourMinuteColor: Colors.cyanAccent.shade700,
helpTextStyle: GoogleFonts.poppins(),
),
hintColor: Colors.cyanAccent.shade700,
primaryColor: Colors.cyanAccent,
backgroundColor: Colors.white,
primaryColorDark: Colors.grey.shade700,
primaryColorLight: Colors.grey.shade200,
//highlightColor: Colors.amber.shade700,
textTheme: TextTheme(
headline1: GoogleFonts.poppins(),
headline2: GoogleFonts.poppins(),
headline3: GoogleFonts.poppins(),
headline4: GoogleFonts.poppins(),
headline5: GoogleFonts.poppins(),
headline6: GoogleFonts.poppins(),
subtitle1: GoogleFonts.poppins(),
subtitle2: GoogleFonts.poppins(),
caption: GoogleFonts.poppins(
fontSize: 10,
),

34
bodyText1:
GoogleFonts.poppins(fontSize: 13, fontWeight:
FontWeight.w500),
bodyText2:
GoogleFonts.poppins(fontSize: 13, fontWeight:
FontWeight.w300),
button: GoogleFonts.poppins(),
),
),
localizationsDelegates: [
// ... app-specific localization delegate[s] here
// GlobalMaterialLocalizations.delegate,
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
],
supportedLocales: [
const Locale('en', ''),
// English, no country code
const Locale('he', ''),
// Hebrew, no country code
const Locale('ar', ''),
// Hebrew, no country code
const Locale.fromSubtags(languageCode: 'zh'),
// Chinese *See Advanced Locales below*
// ... other locales the app supports
],
);
}
}

class TabsScreen extends StatefulWidget {


@override
_TabsScreenState createState() => _TabsScreenState();
}

class _TabsScreenState extends State<TabsScreen> {


List<Widget> screens = [
HomeScreen(),
UserPastAppointments(),
// Remove the LoginAsDoctor widget from the list
AboutScreen(),
ChatListScreen(),
MoreScreen()

35
];

int index = 0;

@override
void initState() {
super.initState();
}

@override
Widget build(BuildContext context) {
return Scaffold(
body: screens[index],
bottomNavigationBar: Container(
decoration: BoxDecoration(
color: Colors.grey.shade200,
//borderRadius: BorderRadius.only(topLeft: Radius.circular(15),
topRight: Radius.circular(15)),
),
child: ClipRRect(
borderRadius: BorderRadius.only(
topRight: Radius.circular(15), topLeft: Radius.circular(15)),
child: BottomNavigationBar(
items: [
BottomNavigationBarItem(
icon: .asset(
index == 0
? "assets/homeScreens/home_active.png"
: "assets/homeScreens/home_unactive.png",
height: 25,
width: 25,
),
label: HOME,
),
BottomNavigationBarItem(
icon: .asset(
index == 1
? "assets/homeScreens/appointment_active.png"
: "assets/homeScreens/appointment_unactive.png",
height: 25,
width: 25,
fit: BoxFit.cover,
),

36
label: APPOINTMENT,
),
// Remove the Doctor Login BottomNavigationBarItem
BottomNavigationBarItem(
icon: .asset(
index == 2
? "assets/homeScreens/rehab_active.png"
: "assets/homeScreens/rehab.png",
height: 35,
width: 35,
),
label: KNOWLEDGE,
),
BottomNavigationBarItem(
icon: .asset(
index == 3
? "assets/homeScreens/chat fill.png"
: "assets/homeScreens/chat unfill.png",
height: 25,
width: 25,
),
label: RECENT_CHATS,
),
BottomNavigationBarItem(
icon: .asset(
index == 4
? "assets/homeScreens/more_active.png"
: "assets/homeScreens/more_unactive.png",
height: 25,
width: 25,
fit: BoxFit.cover,
),
label: MORE,
),
],
selectedLabelStyle: GoogleFonts.poppins(
color: Colors.black,
fontSize: 8,
),
type: BottomNavigationBarType.fixed,
unselectedLabelStyle: GoogleFonts.poppins(
color: Colors.black,
fontSize: 7,

37
),
unselectedItemColor: Colors.grey.shade500,
selectedItemColor: Colors.black,
onTap: (i) {
setState(() {
index = i;
});
},
currentIndex: index,
),
),
),
);
}
}

NotificationHelper notificationHelper = NotificationHelper();

FirebaseMessaging firebaseMessaging = FirebaseMessaging.instance;

Future myBackgroundMessageHandler(RemoteMessage event) async {


print("\n\nbackground: " + event.data.toString());
vpayloadData =

'${event.data['notificationType']}:${event.data['ccId']}:${event.data['myi
d']}:${event.data['myUserName']}';

if (event.data['signal_type'] == 'endCall') {
// Eraser.clearAllAppNotifications();
ConnectycubeFlutterCallKit.reportCallEnded(
sessionId: event.data['session_id']);
ConnectycubeFlutterCallKit.setOnLockScreenVisibility(isVisible:
false);
}

if (payloadData.split(":")[0].toString() == '1') {
vtmpOppId = int.parse(event.data['$PARAM_CALL_OPPONENTS']);
CallEvent callEvent = CallEvent(
sessionId: event.data['$PARAM_SESSION_ID'],
callType: int.parse(event.data['$PARAM_CALL_TYPE']),
callerId: int.parse(event.data['$PARAM_CALLER_ID']),
callerName: event.data['$PARAM_CALLER_NAME'],

38
opponentsIds: {tmpOppId},
userInfo: {'token': '${event.data['mytoken']}'});
ConnectycubeFlutterCallKit.showCallNotification(callEvent);
} else if (payloadData.split(":")[0].toString() == '3') {
notificationHelper.showNotification(
title: 'Call Rejected',
body: event.notification!.body,
// payload:
"${message.data['ccId']}:${message.data['myid']}:${message.data['myUs
erName']}:",
payload: payloadData,
id: "124",
// context2: context
);
try {
print('success on reject call ');
CallManager.instance.reject(event.data['sessionId']);
} catch (e) {
print('error on reject call $e');
}
}
// else {
// notificationHelper.showNotification(
// title: event.notification!.title,
// body: event.notification!.body,
// // payload:
"${message.data['ccId']}:${message.sdata['myid']}:${message.data['myU
serName']}:",
// payload: payloadData,
// id: "124",
// // context2: context
// );
// }
}

Future<void> onCallRejectedWhenTerminated(CallEvent callEvent)


async {
try {
print('token in call event ${callEvent.userInfo!['token']}');
await http
.post(
Uri.parse('https://fcm.googleapis.com/fcm/send'),
headers: <String, String>{

39
'Content-Type': 'application/json',
'Authorization':
'key=$serverToken',
},
body: jsonEncode(
<String, dynamic>{
'priority': 'high',
'notification': <String, dynamic>{
'android': <String, String>{},
'title': "Call Reject",
},
'data': <String, String>{
'notificationType': 3.toString(),
'sessionId': callEvent.sessionId,
},
'to': callEvent.userInfo!['token'],
},
),
)
.then((value) async {
print('send to ${callEvent.userInfo!['token']}');
print("\n\nMessage sent thround on reject: ${value.body}");
}).catchError((onError) {
print("\n\nMessage sent thround on reject catch error: ${onError}");
});
} catch (e) {
print('error on reject call $e');
}
print(
'[PushNotificationsManager][onCallRejectedWhenTerminated]
callEvent: $callEvent');
return sendPushAboutRejectFromKilledState({
PARAM_CALL_TYPE: callEvent.callType,
PARAM_SESSION_ID: callEvent.sessionId,
PARAM_CALLER_ID: callEvent.callerId,
PARAM_CALLER_NAME: callEvent.callerName,
PARAM_CALL_OPPONENTS: callEvent.opponentsIds.join(','),
}, callEvent.callerId);
}

Future<void> onCallAcceptedWhenTerminated(CallEvent callEvent)


async {
try {

40
await
SharedPreferences.getInstance().then((value) {
value.setString("callSessionCS",
callEvent.sessionId);
});
} catch (e) {
print('error Shared preg $e');
}

print(
'[PushNotificationsManager][onCallRejectedWhenTerminate
d]callEvent: $callEvent');
return Future.value()

41
APPENDIX 2

OUTPUT SCREENSHOTS

42
Splash screen Home screen

43
Edit Profile screen Book Appointment screen

44
Location Service Rehabilitation Section

45
Chatbot screen Speciality Lists

46
REFERENCES

[1] D. E. Jiménez et al, "The Use of Technology in Prisoner Rehabilitation: A


Systematic Literature Review", Vol 9, Issue 12 in December 2023.
[2] D. Gauthier and D. Drouin, “Technology in Prisoner Rehabilitation: A Review of
Current Trends and Future Directions," published in the Journal of Correctional
Technology, 2013.
[3] F. Herrera et al, "Exploring the Potential of Technology in Prisoner
Rehabilitation", Vol 18 in 2013.
[4] K. Bao and Y. Zhou, "Using Technology to Enhance Prisoner Experience and
Decision Making," published in the Journal of Rehabilitation Research and
Development, 2022.
[5] M. M. Ahmed et al, "Technology in Prisoner Rehabilitation: A Review of Current
Applications and Future Directions", Vol 49 in 2019.
[6] N. Vignesh, A. Anirudh, and S. Senthil Kumar, "Technology in Prisoner
Rehabilitation: A Review," published in the Journal of Correctional Technology, 2021.
[7] R. Gurjar, N. Mittal, and R. Gupta, "The Potential of Technology to Enhance
Prisoner Rehabilitation: A Review," published in the Journal of Rehabilitation
Research and Development, 2023.

47

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy