Вы находитесь на странице: 1из 62

A Project report on

Reporting System for Wastage of Water


Project submitted to the Jawaharlal Nehru Technological University Hyderabad in Partial fulfilment of the
requirements for the award of the degree of

Bachelor of Technology
In

Computer Science and Engineering


Submitted By

K BHAVYA SREE (15K91A0592)


Y LATHA (16K95A0508)
K ROHITH (15K91A0591)
B SANDEEP KUMAR (16K95A0513)

Under the Guidance of


G Anantha Lakshmi
Assistant Professor

Department of Computer Science and Engineering

TKR COLLEGE OF ENGINEERING AND TECHNOLOGY


(Affiliated to JNTUH, Approved by AICTE, Accredited by NBA, NAAC with ‘A’ Grade)
Meerpet, Saroor Nagar, Hyderabad

2018-19
CERTIFICATE

This is to certify that the project report entitled “Reporting System for Wastage of
Water” submitted by K Bhavya Sree (15K91A0592), Y Latha (16K95A0508), K Rohith
(15K91A0591) and B Sandeep Kumar (16K95A0513) in IV B.Tech II semester Computer
Science and Engineering is a record of bonafide work carried out by them.

INTERNAL GUIDE HEAD OF THE DEPARTMENT

G. Anantha lakshmi Dr. A. Suresh Rao

Assistant Professor Professor


ACKNOWLEDGEMENT

The satisfaction and euphoria that accompanies the successful completion of any task
would be incomplete without the mention of the people who made it possible and whose
encouragement and guidance have crowned our efforts with success.

We are indebted to the Internal Guide, Mrs. G. Anantha Lakshmi, Assistant


Professor, Dept. of Computer Science Engineering, TKR College of Engineering &
Technology, Meerpet for her support and guidance throughout our project.

We are also indebted to the Head of the Department, Dr. A. Suresh Rao, Professor,
Computer Science Engineering, TKR College of Engineering & Technology, Meerpet for his
support and guidance throughout our project.

We extend our deep sense of gratitude to the Principal, Dr. D.V. Ravi Shankar, TKR
College of Engineering & Technology, Meerpet, for permitting us to undertake this project.

Finally, we express thanks to one and all that have helped us in successfully completing
this project. Furthermore we would like to thank our family and friends for their moral support
and encouragement.

By

K BHAVYA SREE (15K91A0592)

Y LATHA (16K95A0508)

K ROHITH (15K91A0591)

B SANDEEP KUMAR (16K95A0513)


CONTENTS

S. No. Contents Pg. No

1. INTRODUCTION 1
1.1 Motivation 1
1.2 Problem definition 2
1.3 Objective of Project 2
1.4 Scope of Project 2

2. LITERATURE SURVEY 3
2.1 Existing System 3
2.2 Disadvantages of Existing system 3
2.3 Proposed System 3

3. ANALYSIS 4
3.1 Requirements 4
3.1.1 Functional Requirements 4
3.1.2 Non-Functional Requirements 5
3.2 Feasibility study 6
3.2.1 Economic Feasibility 6
3.2.2 Operational Feasibility 7
3.2.3 Technical Feasibility 7

4. DESIGN 8
4.1 Pseudo code 8
4.2 DFDs & UML diagrams 24

5. IMPLEMENTATION & TESTING 40


5.1 Method of Implementation 40
5.1.1 Java 40
5.1.2 Android 42
5.1.3 User documentation 43

i
5.1.4 Firebase 45
5.2 Testing 46
5.2.1 Unit Testing 46
5.2.2 Integration Testing 46
5.2.3 Validation Testing 46
5.2.4 System Testing 47
5.3 Screenshots 48

6. CONCLUSION 53

REFERENCES 54

ii
LIST OF FIGURES

Figure No. Figure Name Pg. No

Fig 4.2.1 Architecture 24


Fig 4.3.1 Data flow diagram 25
Fig 4.4.1 Sequence Diagram 32
Fig 4.4.2 Use case Diagram 33
Fig 4.4.3 Activity Diagram 36
Fig 4.4.4 Class diagram 37
Fig 4.4.5 E-R diagram 39
Fig 5.1.1.1 Compilation and Execution of Java Program 41

iii
LIST OF SCREENSHOTS

Screenshot No Screenshot Name Pg. No


Scrsht 5.3.1 Home page 48
Scrsht 5.3.2 Registration Page 48
Scrsht 5.3.3 User Login 48
Scrsht 5.3.4 User Home page 48
Scrsht 5.3.5 Post Complaint 49
Scrsht 5.3.6 View Complaint Details 49
Scrsht 5.3.7 Admin Home 49
Scrsht 5.3.8 Add employee 49
Scrsht 5.3.9 View User List 50
Scrsht 5.3.10 View Complaint list 50
Scrsht 5.3.11 All Complaint details 50
Scrsht 5.3.12 Employee Home 51
Scrsht 5.3.13 Employee Complaint Details 51
Scrsht 5.3.14 Update Status 52

iv
ABSTRACT

In our day to day life, Water is essential to survive. But water levels of
water resources are reducing due to many reasons. One of the reason is due to
leakages of water from pipeline. In order to save water from pipeline leakages,
we propose a system where a common man is able to report about the leakages
of water and upload images/videos with geo-location and time-stamps. Based
on the location, the uploaded information is forwarded to concerned district
engineering department. Department who solves the problem will take
images/videos of solved problem and upload it in our system. So that, the person
who reported the problem will get an SMS after solving the problem and he can
view whether the reported problem is solved.

v
REPORTING SYSTEM FOR WASTAGE OF WATER

1. INTRODUCTION

In India we don’t have any direct communication between the government


and public in an efficient way for solving the water leakage problems i.e. for
getting a problem solved in our place we have to bribe the officials and get them
solved in months which can be solved actually in less time. In order to overcome
this problem previously Hyderabad Metropolitan Water supply & Sewerage
Board has launched a site named Consumer complaints through which public
can post the petitions or complaints in the site and get them solved in a specified
time. Initially phones were merely used for calling or texting. Now-a-days, the
scenario has changed. In today’s world, more focus is given on the availability
of the internet and thus using various applications present in the android market.
Now days we are supposed to manage our daily work on time, accurately, very
fast and with our satisfaction. So we are using various technologies in our life
for fulfillment of our daily work. The main purpose of this project is to help the
public in knowing their place details and getting their problems solved in online
without going to the officer regularly until the problem is solved. By this system
the public can save his time and also save water.

1.1. MOTIVATION
In our day to day life, Water is essential to survive. But water levels of
water resources are reducing due to many reasons. One of the reason is due to
leakages of water from pipeline. In order to save water from pipeline leakages,
we propose a system where a common man is allowed to communicate with
officer in online without going them regularly until the problem is solved.

1.2. PROBLEM DEFINITION


In general scenario, it is difficult for a common man to rectify waste
flow of water. We provide an opportunity to a common man who is likely to
report leakage of water pipelines. A common man has to take images of problem
and upload it in our system with description and time-stamps. Based on the
location, the uploaded information is forwarded to concerned city level officers.
Department who solves the problem will take images of solved problem and

Department of CSE 1 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

upload it in our system. So that, the person who reported the problem will get
an SMS after solving the problem and he can view whether the reported problem
is solved.

1.3. OBJECTIVE OF PROJECT


The main objective is to to identify waste flow of water and to save water
from water pipeline leakages. The main purpose of this project is to help the
public in knowing their place details and getting leakage problems solved in
online without going to the officer regularly until the problem is solved. In our
system, a common man has to report the pipeline leakage problem. Based on
location, it is forwarded to concerned employee. It also allow a common man to
monitor the reported problem whether it is solved.

1.4. SCOPE OF PROJECT


Our system makes easy to concerned department to identify the leakage
of water pipelines in any place. It is used when a common man is concerned
about wastage of water in our society. It is helpful for the common man to know
about status of reported problem.

Department of CSE 2 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

2. LITERATURE SURVEY

2.1 EXISTING SYSTEM


Consumer complaints is an initiative by the combined efforts of
Hyderabad Metropolitan Water supply & Sewerage Board. Consumer
Complaints is a unique program, which gives citizens an opportunity to interact
with the government without coming to any office It is a portal available for
complaining about water pipeline leakages. Citizen has to upload images/videos
and report a complaint including location. To upload location, he/she has to do
it manually which is difficult for non-local people.

2.2 DISADVANTAGE IN EXISTING SYSTEM


• No registration facility is provided and can post the problems directly.
• User has to upload the location manually which is not automatic.
• Users can post their problems but cannot get the details regarding
progress of their complaint.
• User has to update the status after problem is solved which is not
possible for citizen to get through the problem all the time.

2.3 PROPOSED SYSTEM


In the proposed system the citizen need not go to the government office
for getting his problem solved. He can get his problem solved by posting
his problem in this proposed system and he can get status of complaint. Our
proposed system provides solution to existing system by extending its
facilities as follows:
 Registration is provided so that officer can solve the problems easily
 Complete information regarding the place is displayed.
 Can get a status of raised complaint time to time.
Advantages:
• In this tech-savy world this application can help citizens to register
their complaints easily and in a very short period of time.
• Tracking the progress of complaint would be easy.

Department of CSE 3 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

3. SYSTEM ANALYSIS

3.1 REQUIREMENTS
3.1.1 Functional Requirements
Modules:

 Administrator Module
 User Module
 Employee Module

Modules Description:

Administration Module:
In this module, an admin can add or delete employees. An admin can
view the details of employee as well as details of registered complaints from
various city. He is authorized to delete irrelevant registered complaints. Admin
is allowed to view all the registered complaints irrespective of the city.

User Module:

In this module, user has to complete registration inorder to get access.


User is allowed to report a complaint with details such as complaint name,
description, city and a photo of complaint. He is also allowed to monitor the
raised complaint whether it is solved.

Employee Module:

In this module, employee can view complaints of his working city.


Employee should make sure that status is updated time to time. After the
problem is solved he need to take images of solved problem and update the
status of complaint. So, that user & admin can know that exact complaint is
solved.

Department of CSE 4 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

3.1.2 Non Functional Requirements


Performance Requirements:

The buffer and cache memory used by sql server can be set to optimum for faster
processing.

Safety Requirements:

No harm is expected from the use of the product either to the OS or any data
that resides on the client system.

Product Security Requirements:

The product is protected from unauthorized users from using it. The system
allows only authenticated users to work on the application. The user of the
system is Admin, employee and user.

Software Quality Attributes:

The product is user friendly and its accessibility is from the clients. As it is
developed in java it is highly interoperable with the OS that have provided
support for JVM(Server side). The system requires less maintenance as the data
is stored in relational databases on the server side.

System Requirements:
Hardware Requirements:
System : Pentium Dual Core

Processor : i3

Hard Disk : 500GB

Monitor : 15” LED

Input devices : Keyboard, Mouse

Ram :1GB

Department of CSE 5 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

Software Requirements:

Platform : java

Technology : Android

Tool : Android Studio

Database : google firebase

3.2 FEASIBILITY STUDY


An important outcome of the preliminary investigation is the
determination that system requested is feasible. This is to identify the objectives
of a new system. Before solving a problem one must know what the problem is.
The study is carried out by a small group of people who are familiar with system
analysis and design process. Fact finding techniques are used to gather the
required information.
The three major areas consider while determining the feasibility of the project
are
• Economic Feasibility

• Operational Feasibility

• Technical Feasibility

3.2.1 Economic Feasibility


Economic feasibility attempts to weigh the costs of developing and
implementing a new system, against the benefits that would accrue from having
the new system in place. This feasibility study gives the top management the
economic justification for the new system.
A simple economic analysis which gives the actual comparison of costs
and benefits are much more meaningful in this case. These could include
increased customer satisfaction, improvement in product quality better decision
making timeliness of information, expediting activities, improved accuracy of
operations, better documentation and record keeping, faster retrieval of
information, better employee morale.

Department of CSE 6 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

3.2.2 Operational Feasibility


Proposed projects are beneficial only if they can be turned into information
systems that will meet the organizations operating requirements. Simply stated,
this test of feasibility asks if the system will work when it is developed and
installed. Are there major barriers to Implementation? Here are questions that
will help test the operational feasibility of a project:
Is there sufficient support for the project from management from users? If the
current system is well liked and used to the extent that persons will not be able
to see reasons for change, there may be resistance.
Are the current business methods acceptable to the user? If they are not,
Users may welcome a change that will bring about a more operational and useful
systems.
Have the user been involved in the planning and development of the
project?
Early involvement reduces the chances of resistance to the system and in general
and increases the likelihood of successful project. Since the proposed system
was to help reduce the hardships encountered. In the existing manual system,
the new system was considered to be operational feasible.

3.2.3 Technical Feasibility


Evaluating the technical feasibility is the trickiest part of a feasibility study. This
is because, at this point in time, not too many-detailed design of the system,
making it difficult to access issues like performance, costs on (on account of the
kind of technology to be deployed) etc.
A number of issues have to be considered while doing a technical analysis.
i) Understand the different technologies involved in the proposed
system:
Before commencing the project, we have to be very clear about what are the
technologies that are to be required for the development of the new system.
ii) Find out whether the organization currently possesses the required
technologies:
Is the required technology available with the organization?
If so is the capacity sufficient?

Department of CSE 7 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

4. DESIGN

4.1 PSEUDO CODE

import android.app.ProgressDialog;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.graphics.Bitmap;
import android.location.Criteria;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.net.Uri;
import android.provider.MediaStore;
import android.provider.Settings;
import android.support.annotation.NonNull;
import android.support.v4.app.ActivityCompat;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.Toast;

import com.google.android.gms.tasks.OnFailureListener;
import com.google.android.gms.tasks.OnSuccessListener;
import com.google.firebase.storage.OnProgressListener;
import com.google.firebase.storage.StorageReference;
import com.google.firebase.storage.UploadTask;

import java.util.UUID;
public class AddComplaint extends AppCompatActivity {

Department of CSE 8 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

EditText addComplaintName;
EditText addComplaintDescription;
EditText addComplaintDistrict;
private ImageView imageView;

Button addComplaintSubmit;
Button addComplaintCancel;
Button btnChoose;

private static final int Image_Capture_Code = 1;


private Uri imageUri;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

setContentView(R.layout.activity_add_complaint);

final Session s = new Session(getApplicationContext());

addComplaintName = (EditText)
findViewById(R.id.addComplaintName);
addComplaintDescription = (EditText)
findViewById(R.id.addComplaintDescription);
addComplaintDistrict = (EditText)
findViewById(R.id.addComplaintDistrict);

btnChoose = (Button) findViewById(R.id.chooseimagebutton);


addComplaintSubmit = (Button)
findViewById(R.id.addComplaintSubmit);
addComplaintCancel = (Button)
findViewById(R.id.addComplaintCancel);

imageView=(ImageView) findViewById(R.id.postComplaintImgView);

btnChoose.setOnClickListener(new View.OnClickListener() {
@Override

Department of CSE 9 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

public void onClick(View v) {

Intent cInt = new


Intent(MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(cInt, Image_Capture_Code);
}
});

addComplaintSubmit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {

String name = addComplaintName.getText().toString();


String description = addComplaintDescription.getText().toString();
String district = addComplaintDistrict.getText().toString();

if (name == null || description == null || district == null) {


Toast.makeText(getApplicationContext(), "Please Enter Valid
Data", Toast.LENGTH_SHORT).show();
} else {

String imageName = UUID.randomUUID().toString();

DAO dao = new DAO();

Complaint complaint = new Complaint();

complaint.setComplaintId(dao.getUnicKey(Constants.COMPLAINTS_DB));
complaint.setName(name);
complaint.setDescription(description);
complaint.setDistrict(district);
complaint.setPostedBy(s.getusename());
complaint.setStatus("open");
complaint.setLocation(getUserLocation());
complaint.setComplaintImage(imageName);
complaint.setComplaintDate(new java.util.Date().toString());

try {

Department of CSE 10 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

dao.addObject(Constants.COMPLAINTS_DB, complaint,
complaint.getComplaintId());
uploadImage(imageName);

Intent i = new Intent(getApplicationContext(), UserHome.class);


startActivity(i);

Toast.makeText(getApplicationContext(), "Complaint Posted


Successfully", Toast.LENGTH_SHORT).show();
} catch (Exception ex) {
Toast.makeText(getApplicationContext(), "Complaint Failed",
Toast.LENGTH_SHORT).show();
Log.v("complaint failed", ex.toString());
ex.printStackTrace();
}
}
}
});

addComplaintCancel.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {

Intent i = new Intent(getApplicationContext(), UserHome.class);


startActivity(i);
}
});
}

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data)
{
super.onActivityResult(requestCode, resultCode, data);

Log.v("voidmain", "in activity results return");

if (requestCode == Image_Capture_Code) {

Department of CSE 11 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

if (resultCode == RESULT_OK) {
Log.v("voidmain", "result ok");
Bitmap bp = (Bitmap) data.getExtras().get("data");
imageView.setImageBitmap(bp);
imageUri = data.getData();
} else if (resultCode == RESULT_CANCELED) {
Log.v("voidmain", "result cancelled");
Toast.makeText(this, "Cancelled", Toast.LENGTH_LONG).show();
}
}
Log.v("voidmain", "at last");
}

public String getUserLocation() {


LocationManager locationManager = (LocationManager)
getSystemService(Context.LOCATION_SERVICE);
// Define the criteria how to select the location provider
Criteria criteria = new Criteria();
criteria.setAccuracy(Criteria.ACCURACY_COARSE); //default

// user defines the criteria

criteria.setCostAllowed(false);
// get the best provider depending on the criteria
String provider = locationManager.getBestProvider(criteria, false);

if (ActivityCompat.checkSelfPermission(this,
android.Manifest.permission.ACCESS_FINE_LOCATION) !=
PackageManager.PERMISSION_GRANTED &&
ActivityCompat.checkSelfPermission(this,
android.Manifest.permission.ACCESS_COARSE_LOCATION) !=
PackageManager.PERMISSION_GRANTED) {
// TODO: Consider calling
// ActivityCompat#requestPermissions
// here to request the missing permissions, and then overriding
// public void onRequestPermissionsResult(int requestCode, String[]
permissions,
// int[] grantResults)

Department of CSE 12 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

// to handle the case where the user grants the permission. See the
documentation
// for ActivityCompat#requestPermissions for more details.
return "";
}
Location location = locationManager.getLastKnownLocation(provider);

MyLocationListener mylistener = new MyLocationListener();

if (location != null) {
mylistener.onLocationChanged(location);
} else {
// leads to the settings because there is no last known location
Intent intent = new
Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
startActivity(intent);
}
// location updates: at least 1 meter and 200millsecs change
locationManager.requestLocationUpdates(provider, 200, 1, mylistener);

return location.getLatitude()+","+location.getLongitude();
}

private class MyLocationListener implements LocationListener {

@Override
public void onLocationChanged(Location location) {
// Initialize the location fields

Toast.makeText(AddComplaint.this,
""+location.getLatitude()+location.getLongitude(),
Toast.LENGTH_SHORT).show();

@Override
public void onStatusChanged(String provider, int status, Bundle extras) {

Department of CSE 13 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

Toast.makeText(AddComplaint.this, provider + "'s status changed to


"+status +"!",
Toast.LENGTH_SHORT).show();
}

@Override
public void onProviderEnabled(String provider) {
Toast.makeText(AddComplaint.this, "Provider " + provider + "
enabled!",
Toast.LENGTH_SHORT).show();

@Override
public void onProviderDisabled(String provider) {
Toast.makeText(AddComplaint.this, "Provider " + provider + "
disabled!",
Toast.LENGTH_SHORT).show();
}
}

private void uploadImage(String fileName) {

final ProgressDialog progressDialog = new ProgressDialog(this);


progressDialog.setTitle("Uploading...");
progressDialog.show();

StorageReference ref = DAO.getStorageReference().child("images/" +


fileName);

ref.putFile(imageUri)
.addOnSuccessListener(new
OnSuccessListener<UploadTask.TaskSnapshot>() {
@Override
public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {
progressDialog.dismiss();
}
})

Department of CSE 14 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

.addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception e) {
progressDialog.dismiss();
Toast.makeText(getApplicationContext(), "Failed " +
e.getMessage(), Toast.LENGTH_SHORT).show();
}
})
.addOnProgressListener(new
OnProgressListener<UploadTask.TaskSnapshot>() {
@Override
public void onProgress(UploadTask.TaskSnapshot taskSnapshot)
{
double progress = (100.0 * taskSnapshot.getBytesTransferred()
/ taskSnapshot
.getTotalByteCount());
progressDialog.setMessage("Uploaded " + (int) progress +
"%");
}
});
}
}
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.ValueEventListener;

public class UpdateComplaint extends AppCompatActivity {

EditText updateComplaintStatus;

Department of CSE 15 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

Button updateComplaintSubmit;
Button updateComplaintCancel;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

setContentView(R.layout.activity_update_complaint);

final Session s = new Session(getApplicationContext());

updateComplaintStatus = (EditText)
findViewById(R.id.updateComplaintStatus);

updateComplaintSubmit = (Button)
findViewById(R.id.updateComplaintSubmit);
updateComplaintCancel = (Button)
findViewById(R.id.updateComplaintCancel);

Intent i = getIntent();
savedInstanceState = i.getExtras();

final String complaintid = savedInstanceState.getString("complaintid");

updateComplaintSubmit.setOnClickListener(new
View.OnClickListener() {
@Override
public void onClick(View view) {

String status = updateComplaintStatus.getText().toString();

if (status == null) {
Toast.makeText(getApplicationContext(), "Please Enter
Complaint Status", Toast.LENGTH_SHORT).show();
} else {

DAO dao = new DAO();


updateWork(complaintid,status);

Department of CSE 16 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

Intent i = new
Intent(getApplicationContext(),EmployeeHome.class);
startActivity(i);
}
}
});

updateComplaintCancel.setOnClickListener(new
View.OnClickListener() {
@Override
public void onClick(View view) {

Intent i = new Intent(getApplicationContext(),EmployeeHome.class);


startActivity(i);
}
});
}

private void updateWork(final String complaintId, final String status)


{
final DAO d=new DAO();

d.getDBReference(Constants.COMPLAINTS_DB).child(complaintId).addList
enerForSingleValueEvent(new ValueEventListener() {

@Override
public void onDataChange(DataSnapshot dataSnapshot) {

Complaint complaint=dataSnapshot.getValue(Complaint.class);

if(complaint!=null)
{
complaint.setStatus(status);
}

d.addObject(Constants.COMPLAINTS_DB,complaint,complaintId);
}

Department of CSE 17 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

@Override
public void onCancelled(DatabaseError databaseError) {

}
});
}
}
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.location.Address;
import android.location.Geocoder;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import com.google.android.gms.tasks.OnFailureListener;
import com.google.android.gms.tasks.OnSuccessListener;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.ValueEventListener;
import com.google.firebase.storage.StorageReference;

import java.util.List;
import java.util.Locale;

public class ViewComplaint extends AppCompatActivity {

Button menuDeleteComplaint;
Button viewComplaintBack;

Department of CSE 18 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

ImageView imageView;

TextView t1,t2,t3,t4,t5,t6,t7;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_view_complaint);

menuDeleteComplaint=(Button)
findViewById(R.id.menuDeleteComplaint);
viewComplaintBack=(Button) findViewById(R.id.viewComplaintBack);

t1=(TextView) findViewById(R.id.complaintviewname);
t2=(TextView)findViewById(R.id.complaintviewlocation);
t3=(TextView)findViewById(R.id.complaintviewdescription);
t4=(TextView)findViewById(R.id.complaintviewstatus);
t5=(TextView)findViewById(R.id.complaintviewpostedby);
t6=(TextView)findViewById(R.id.complaintviewdistrict);
t7=(TextView)findViewById(R.id.complaintviewdate);

imageView = (ImageView) findViewById(R.id.complaintviewimage);

final Session s = new Session(getApplicationContext());

Intent i = getIntent();
savedInstanceState = i.getExtras();
final String complaintid = savedInstanceState.getString("complaintid");

String role=s.getRole();

DAO d=new DAO();

d.getDBReference(Constants.COMPLAINTS_DB).child(complaintid).addList
enerForSingleValueEvent(new ValueEventListener() {

@Override
public void onDataChange(DataSnapshot dataSnapshot) {

Department of CSE 19 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

Complaint complaint=dataSnapshot.getValue(Complaint.class);

if(complaint!=null)
{
String[] complaintLocation=complaint.getLocation().split(",");

Geocoder geocoder;
List<Address> addresses;
geocoder = new Geocoder(getApplicationContext(),
Locale.getDefault());

String complaintAddress="";

try {

addresses = geocoder.getFromLocation(new
Double(complaintLocation[0]),new Double(complaintLocation[1]), 1); // Here
1 represent max location result to returned, by documents it recommended 1 to
5

String address = addresses.get(0).getAddressLine(0); // If any


additional address line present than only, check with max available address lines
by getMaxAddressLineIndex()
String city = addresses.get(0).getLocality();
String state = addresses.get(0).getAdminArea();
String country = addresses.get(0).getCountryName();
String postalCode = addresses.get(0).getPostalCode();
String knownName = addresses.get(0).getFeatureName(); //
Only if available else return NULL

if(address!=null)
{
complaintAddress=complaintAddress+address+"\n";
}

if(city!=null)
{
complaintAddress=complaintAddress+city+"\n";

Department of CSE 20 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

if(state!=null)
{
complaintAddress=complaintAddress+state+"\n";
}

if(country!=null)
{
complaintAddress=complaintAddress+country+"\n";
}

if(postalCode!=null)
{
complaintAddress=complaintAddress+postalCode+"\n";
}

if(knownName!=null)
{
complaintAddress=complaintAddress+knownName+"\n";
}
}
catch(Exception e)
{
Log.v("voidmain ","in on succes ");
}

Log.v("voidmain Address ",complaintAddress);

t1.setText("Complaint Name :"+complaint.getName());


t2.setText("Complaint Location :"+complaintAddress);
t3.setText("Complaint Description
:"+complaint.getDescription());
t4.setText("Complaint Status :"+complaint.getStatus());
t5.setText("Complaint Posted By :"+complaint.getPostedBy());
t6.setText("Complaint District :"+complaint.getDistrict());
t7.setText("Complaint Date :"+complaint.getComplaintDate());

Department of CSE 21 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

StorageReference ref =
DAO.getStorageReference().child("images/"
+complaint.getComplaintImage());
final long ONE_MEGABYTE = 1024 * 1024 *5;
ref.getBytes(ONE_MEGABYTE)
.addOnSuccessListener(new OnSuccessListener<byte[]>() {
@Override
public void onSuccess(byte[] bytes) {

Bitmap bm = BitmapFactory.decodeByteArray(bytes, 0,
bytes.length);

if(bm!=null)
{
imageView.setImageBitmap(bm);
}
else
{
Log.v("","bm null");
}
}
}).addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception exception) {
// Handle any errors
Log.v("","image reading failure");
}
});
}
}

@Override
public void onCancelled(DatabaseError databaseError) {

}
});

Department of CSE 22 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

if(role.equals("user") || role.equals("employee"))
{
menuDeleteComplaint.setEnabled(false);
}

menuDeleteComplaint.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View view) {

final DAO dao=new DAO();


dao.deleteObject(Constants.COMPLAINTS_DB,complaintid);

Intent i= new Intent(getApplicationContext(),AdminHome.class);


startActivity(i);
}
});

viewComplaintBack.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {

Intent i=null;

String role=s.getRole();

if(role.equals("admin"))
{
i= new Intent(getApplicationContext(),AdminHome.class);
}else if(role.equals("employee"))
{
i= new Intent(getApplicationContext(),EmployeeHome.class);
}else if(role.equals("user"))
{
i= new Intent(getApplicationContext(),UserHome.class);
}
startActivity(i); }});}

Department of CSE 23 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

4.2 ARCHITECTURE DIAGRAM


Architecture diagram is a diagram of a system, in which the principal
parts or functions are represented by blocks connected by lines that show the
relationships of the blocks. The block diagram is typically used for a higher
level, less detailed description aimed more at understanding the overall concepts
and less at understanding the details of implementation.

Fig 4.2.1. Architecture

4.3 DATA FLOW DIAGRAMS


A data-flow diagram (DFD) is a graphical representation of the "flow"
of data through an information system. DFDs can also be used for the
visualization of data processing (structured design).

On a DFD, data items flow from an external data source or an internal


data store to an internal data store or an external data sink, via an internal
process. The idea behind the explosion of a process into more process is that
understanding at one level of detail is exploded into greater detail at the next
level. This is done further explosion is necessary and an adequate amount of
detail is described for analyst to understand the process.

A DFD is also known as a “bubble chart” has the purpose of clarifying


system requirements and identifying major transformations that will become
programs in system design.

So it is the starting point of the design to the lowest level of detail. A


DFD consists of a series of bubbles joined by data flows in the system.

Department of CSE 24 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

DFD Symbols
In the DFD, there are four symbols

• A Square defines a source or destination of system data.

• An arrow identifies data flow. It is the pipeline through which the information
flows.

• A circle or a bubble represents a process that transforms incoming data flow


into outgoing data flows.

• An open rectangle is a data store, data at rest or a temporary repository of data

Fig 4.3.1. Data flow diagram

4.4. UNIFIED MODELING LANGUAGE (UML)


The Unified Modeling Language (UML) is a standard language for
writing software blue prints. The UML is a language for
• Visualizing
• Specifying
• Constructing
• Documenting the artifacts of a software intensive system.
The UML is a language which provides vocabulary and the rules for
combining words in that vocabulary for the purpose of communication. A
modeling language is a language whose vocabulary and the rules focus on the
conceptual and physical representation of a system. Modeling yields an
understanding of a system.

Department of CSE 25 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

BUILINDING BLOCKS OF UML


The vocabulary of the UML encompasses three kinds of building blocks:
1. Things
2. Relationships
3. Diagrams
Things are the abstractions that are first-class citizens in a model,
relationships tie these things together and diagrams group interesting collections
of things.
THINGS IN THE UML
There are four kinds of things in the UML:
1. Structural things

2. Behavioral things

3. Grouping things

4. Annotational things

1. STUCTURALTHINGS:

These are the nouns of UML models. The structural things used in the
project design are:

First, a class is a description of a set of objects that share the same


attributes, operations, relationships and semantics.

Window

Origin

Size

open()

close()

move()

display()

Fig: Classes

Department of CSE 26 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

Second, a use case is a description of set of sequence of actions that a


system performs that yields an observable result of value to particular actor.

Fig: Use Cases

Third, a node is a physical element that exists at runtime and represents


a computational resource, generally having at least some memory and often
processing capability.

Fig: Nodes

2. BEHAVIORAL THINGS:

These are the dynamic parts of UML models. The behavioral thing used
is:

INTERACTION:

An interaction is a behavior that comprises a set of messages exchanged


among a set of objects within a particular context to accomplish a specific
purpose. An interaction involves a number of other elements, including
messages, action sequences (the behavior invoked by a message, and links (the
connection between objects).

Fig: Messages

Department of CSE 27 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

RELATIONSHIPS IN THE UML

There are four kinds of relationships in the UML:

● Dependency
● Association
● Generalization
● Realization
A dependency is a semantic relationship between two things in which
a change to one thing may affect the semantics of the other thing (the dependent
thing).

Fig: Dependencies

An association is a structural relationship that describes a set links, a


link being a connection among objects. Aggregation is a special kind of
association, representing a structural relationship between a whole and its parts.

Fig: Association

A generalization is a specialization/ generalization relationship in


which objects of the specialized element (the child) are substitutable for objects
of the generalized element (the parent).

Fig: Generalization

A realization is a semantic relationship between classifiers, where in


one classifier specifies a contract that another classifier guarantees to carry out.

Fig: Realization

Department of CSE 28 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

SEQUENCE DIAGRAMS
UML sequence diagrams are used to represent the flow of messages,
events and actions between the objects or components of a system. Time is
represented in the vertical direction showing the sequence of interactions of the
header elements, which are displayed horizontally at the top of the diagram.
Sequence Diagrams are used primarily to design, document and validate the
architecture, interfaces and logic of the system by describing the sequence of
actions that need to be performed to complete a task or scenario. UML sequence
diagrams are useful design tools because they provide a dynamic view of the
system behavior which can be difficult to extract from static diagrams or
specifications.

Actor

Represents an external person or entity that interacts with the system

Object

Represents an object in the system or one of its components

Unit

Represents a subsystem, component, unit, or other logical entity in the system


(may or may not be implemented by objects)

Department of CSE 29 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

Seperator

Represents an interface or boundary between subsystems, components


or units (e.g., air interface, Internet, network)

Group

Groups related header elements into subsystems or components

Action
Represents an action taken by an actor, object or unit

Asynchronous Message
An asynchronous message between header elements

Block
A block representing a loop or conditional for a particular header element

Call Message
A call (procedure) message between header elements

Department of CSE 30 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

Create Message
A "create" message that creates a header element (represented by lifeline
going from dashed to solid pattern)

Diagram Link
Represents a portion of a diagram being treated as a functional block.
Similar to a procedure or function call that abstracts functionality or details not
shown at this level. Can optionally be linked to another diagram for elaboration.

Else Block Represents an "else" block portion of a diagram block

Message
A simple message between header elements

Return Message
A return message between header elements

Department of CSE 31 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

Fig 4.4.1. Sequence Diagram

Department of CSE 32 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

USE CASE DIAGRAM

A use case diagram is a graph of actors set of use cases enclosed by a


system boundary, communication associations between the actors and users and
generalization among use cases. The use case model defines the outside(actors)
and inside(use case) of the system’s behavior.
Use case diagram is quite simple in nature and depicts two types of
elements: one representing the business roles and the other representing the
business processes.

Fig 4.4.2. Use case Diagram

Department of CSE 33 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

ACTIVITY DIAGRAM

Activity diagrams represent the business and operational workflows of


a system. An Activity diagram is a dynamic diagram that shows the activity and
the event that causes the object to be in the particular state. So, what is the
importance of an Activity diagram, as opposed to a State diagram? A State
diagram shows the different states an object is in during the lifecycle of its
existence in the system, and the transitions in the states of the objects. These
transitions depict the activities causing these transitions, shown by arrows.
An Activity diagram talks more about these transitions and activities
causing the changes in the object states.
Defining an Activity diagram

Let us take a look at the building blocks of an Activity diagram.

Elements of an Activity diagram


An Activity diagram consists of the following behavioral elements:
Initial Activity: This shows the starting point or first activity of the flow.
Denoted by a solid circle. This is similar to the notation used for Initial State.

Activity: Represented by a rectangle with rounded (almost oval) edges.

Decisions: Similar to flowcharts, a logic where a decision is to be made is


depicted by a diamond, with the options written on either sides of the arrows
emerging from the diamond, within box brackets.

Department of CSE 34 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

Signal: When an activity sends or receives a message, that activity is called a


signal. Signals are of two types: Input signal (Message receiving activity) shown
by a concave polygon and Output signal (Message sending activity) shown by
a convex polygon.

Concurrent Activities: Some activities occur simultaneously or in parallel.


Such activities are called concurrent activities. For example, listening to the
lecturer and looking at the blackboard is a parallel activity. This is represented
by a horizontal split (thick dark line) and the two concurrent activities next to
each other, and the horizontal line again to show the end of the parallel activity.

Final Activity: The end of the Activity diagram is shown by a bull's eye symbol,
also called as a final activity.

Department of CSE 35 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

Fig 4.4.3. Activity Diagram

Class Diagram
An object is any person, place, thing, concept, event, screen, or report
applicable to your system. Objects both know things (they have attributes) and
they do things (they have methods).

A class is a representation of an object and, in many ways, it is simply a


template from which objects are created. Classes form the main building blocks

Department of CSE 36 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

of an object-oriented application. Although thousands of students attend the


university, you would only model one class, called Student, which would
represent the entire collection of students.

Responsibilities
Classes are typically modeled as rectangles with three sections: the top
section for the name of the class, the middle section for the attributes of the
class, and the bottom section for the methods of the class. Attributes are the
information stored about an object, while methods are the things an object or
class do. For example, students have student numbers, names, addresses, and
phone numbers. Those are all examples of the attributes of a student. Students
also enroll in courses, drop courses, and request transcripts. Those are all
examples of the things a student does, which get implemented (coded) as
methods. You should think of methods as the object-oriented equivalent of
functions and procedures.

Fig 4.4.4. Class diagram

ER Diagram:

Data models are tools used in analysis to describe the data


requirements and assumptions in the system from a top-down perspective. They
also set the stage for the design of databases later on in the SDLC.

Department of CSE 37 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

There are three basic elements in ER models:

 Entities are the "things" about which we seek information.


 Attributes are the data we collect about the entities.
 Relationships provide the structure needed to draw information from
multiple entities.

Developing an ERD:

Developing an ERD requires an understanding of the system


and its components. Its components are:

 Rectangles: These are used for representing entity sets.


 Ellipses: These are used for representing attributes.
 Diamonds: These are used for representing relationship sets.
 Lines: These are used for linking attributes to entity sets and entity sets
to relationship sets.

Start an ERD:

Define Entities:
These are usually nouns used in descriptions of the system, in the
discussion of business rules, or in documentation.

Define Relationships:

These are usually verbs used in descriptions of the system or in


discussion of the business rules (entity _ entity).

Add attributes to the relations:


These are determined by the queries, and may also suggest new
entities, e.g. grade; or they may suggest the need for keys or identifiers.

Add cardinality to the relations:

Many-to-Many must be resolved to two one-to-many with an


additional entity. Automatically happens. Sometimes involves introduction of a

Department of CSE 38 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

link entity (which will be all Foreign key) this flexibility allows us to consider
a variety of questions. Represent that information with symbols.

ERD brings out issues:

 Many-to-Many
 Ambiguities
 Entities and their relationships
 What data needs to be stored
 The Degree of a relationship

Fig 4.4.5. E-R diagram

Department of CSE 39 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

5. IMPLEMENTATION AND TESTING

5.1 Method of Implementation


Implementation literally means to put into effect or to carry out. The
system implementation phase of the software deals with the translation of the
design specifications into the source code. The ultimate goal of the
implementation is to write the source code and the internal documentation so
that it can be verified easily. The code and documentation should be written in
a manner that eases debugging, testing and modification. System flowcharts,
sample run on packages, sample output etc. Is part of the implementation?

An effort was made to satisfy the following goals in order specified.

• Minimization of Response Time.

• Clarity and Simplicity of the Code.

• Minimization of Hard-Coding.

Various types of bugs were discovered while debugging the modules.


These ranged from logical errors to failure on account of various processing
cases.

5.1.1 JAVA

Java is a programming language originally developed by James Gosling


at Sun Microsystems (which is now a subsidiary of Oracle Corporation) and
released in 1995 as a core component Sun Microsystems’ Java platform.
Java is an object-oriented language, and is very similar to C++. Java is
simplified to eliminate language features that cause common programming
errors. Java source code files are compiled into a format called bytecode, which
can then be executed by a Java interpreter. The language derives much of its
syntax from C & C++ but has a simpler object model and fewer low –level
facilities. Java applications are typically compiled to byte code (class file) that
can run on any Java Virtual Machine (JVM) regardless of computer
architecture. Java is general - purpose, concurrent, class-based and object-
Department of CSE 40 TKRCET
REPORTING SYSTEM FOR WASTAGE OF WATER

oriented and is specifically designed to have a few implementation


dependencies as possible. It is intended to let application developers “write once
run anywhere”. Java is considered by many as one of the most influential
programming languages of the 20th century, and is widely used from application
software to web applications.
Java byte code - the platform-independent codes interpreted by the
interpreter on the Java platform. The interpreter parses and runs each Java byte
code instruction on the computer. Compilation happens just once; interpretation
occurs each time the program is executed. The following figure illustrates how
this works.

Fig 5.1.1.1. Compilation and Execution of Java Program

You can think of Java byte codes as the machine code instructions for
the Java Virtual Machine (Java VM). Every Java interpreter, whether it’s a
development tool or a Web browser that can run applets, is an implementation
of the Java VM. Java byte codes help make “write once, run anywhere”
possible. You can compile your program into byte codes on any platform that
has a Java compiler. The byte codes can then be run on any implementation of
the Java VM. That means that as long as a computer has a Java VM, the same
program written in the Java programming language can run on Windows 2000,
a Solaris workstation, or on an iMac.

Compilation of code:

When you compile the code, the Java compiler creates machine code
(called byte code) for a hypothetical machine called Java Virtual Machine
(JVM). The JVM is supposed t executed the byte code

Compiling and Interpreting Java Source Code:

Department of CSE 41 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

During run-time the Java interpreter tricks the byte code file into
thinking that it is running on a Java Virtual Machine. In reality this could be an
Intel Pentium windows 95 or sun SPARCstation running Solaris or Apple
Macintosh running system and all could receive code from any computer
through internet and run the Applets.

5.1.2 ANDROID
Android is a software stack for mobile devices that includes an operating
system, middleware and key applications. The android SDK provides the tools
and APIs necessary to begin developing applications on the Android platform
using the Java programming language.

The Android SDK includes a comprehensive set of development tools.


These include a debugger, libraries, a handset emulator (based on QEMU),
documentation, sample code, and tutorials. Currently supported development
platforms include x86-architecture computers running Linux (any modern
desktop Linux distribution), Mac OS X 10.4.8 or later, Windows XP or Vista.
The officially supported integrated development environment (IDE) is Eclipse
(3.2 or later) using the Android Development Tools (ADT) Plugin, though
developers may use any text editor to edit Java and XML files then use
command line tools to create, build and debug Android applications.

About Native Code:


Libraries written in C and other languages can be compiled to ARM
native code and installed, but the Native Development Kit is not yet officially
supported by Google. Native classes can be called from Java code running under
the Dalvik VM using the System. Load Library call, which is part of the
standard Android Java classes.

Department of CSE 42 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

5.1.3. USER DOCUMENTATION


In this user manual we are going to keep the information regarding our
product, which can be understandable by a new person who is going to use it. If
a new person is using it, online help will be provided in that. We are going to
explain each and every step clearly about our product so that any user can easily
understand it.

5.1.3.1. Creating an Android Project


The ADT plug-in provides a New Project Wizard that you can use to quickly
create a new Android project (or a project from existing code). To create a new
project:
 Select File > New > Project.
 . Select Android > Android Project, and click Next.
 Select the contents for the project:
 Enter a Project Name. This will be the name of the folder where your
project is created.
 Under Contents, select Create new project in workspace. Select your
project workspace location.
 Under Target, select an Android target to be used as the project's Build
Target. The Build Target specifies which Android platform you'd like
your application built against.
Unless you know that you'll be using new APIs introduced in the latest SDK,
you should select a target with the lowest platform version possible, such as
Android 1.1.Under Properties, fill in all necessary fields :
 Enter an Application name. This is the human-readable title for your
application the name that will appear on the Android device.
 Enter a Package name. This is the package namespace (following the
same rules as for packages in the Java programming language) where all
your source code will reside.
i. Select Create Activity (optional, of course, but
common) and enter a name for your main Activity class.
ii. Enter a Min SDK Version. This is an integer that
indicates the minimum API Level required to properly run your
application. Entering this here automatically sets the min SDK
Version attribute in the <uses-sdk> of your Android Manifest
file. If you're unsure of the appropriate API Level to use, copy
the API Level listed for the Build Target you selected in the
Target tab.
iii. Click Finish.

Department of CSE 43 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

5.1.3.2. To Create an AVD With the AVD Manager:


● In Android Studio, select Tools > Android > AVD Manager or you can
click the AVD Manager in the toolbar. The AVD Manager appears.

● From the Your Virtual Devices page of the AVD Manager, click Create
Virtual Device.

● In the Select Deployment Target dialog, click Create New Emulator.


The Select Hardware page appears.

● Select a hardware profile, and then click Next.

● Select the system image for a particular API level, and then click Next.
The Verify Configuration page appears.

● Change AVD properties as needed, and then click Finish.

● The new AVD appears in the Your Virtual Devices page or the Select
Deployment Target dialog.

When you first run a project as an Android Application, ADT will


automatically create a run configuration. The default run configuration will
launch the default project Activity and use automatic target mode for device
selection (with no preferred AVD).

5.1.3.3. To Create or Modify A Launch Configuration


● To edit a run/debug configuration, select Run > Edit Configurations. The
Run/Debug Configurations dialog appears.

● The dialog displays default templates in the left panel under the Defaults
folder, and groups your defined configurations by template type above
the Defaults folder. You can resize the dialog to see any hidden items.

● In this dialog, you can:

i. Create new run/debug configurations

ii. Edit run/debug configurations

iii. Edit default templates

iv. Sort and group configurations

● Modify the configuration as needed. Be sure to correct any errors


displayed at the bottom of the dialog. Click OK.

Department of CSE 44 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

5.1.4 FIREBASE
Firebase gives you functionality like analytics, databases, messaging
and crash reporting so you can move quickly and focus on your users. Firebase
is built on Google infrastructure and scales automatically, for even the largest
apps.

5.1.4.1. Design
Firebase Realtime Database is a popular NoSQL cloud database that
allows developers real-time synchronization of live data. With multi-platform
support, synchronizing data between users and clients is pretty seamless, but it

can also be used more generally as a generic persistent NoSQL data


backing if you don't care about real-time updates. It has a very flexible rules
syntax to allow minute control over data access as well.

5.1.4.2 Features
Firebase provides a wide array of features that greatly simplify app and web
development. Some of these features include:
● Firebase authentication: provides backend services, easy-to-use SDKs,
and ready-made UI libraries to authenticate users to our apps.

● Firebase Realtime database: cross-platform cloud-hosted database. Data


is stored as JSON and synchronized in real-time to every connected
client.

● Cloud messaging: cross-platform messaging solution that lets you


reliably deliver messages at no cost.

● Analytics: free app measurement solution that provides insight on app


usage and user engagement.

● Storage: powerful, simple, and cost-effective object storage service built


for Google scale.

● Crashlytics: Realtime crash reporter that helps you track, prioritize, and
fix stability issues that erode our app quality.

Department of CSE 45 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

5.2 TESTING
The development of software systems involves of a series of production
activities where opportunities for injection of human fallibilities are enormous.
Errors may begin to occur at the very inception of the process where the
objectives may be erroneously or imperfectly specified, as well as in later design
and development stages. Because of human inability to perform and
communicate with perfection, software development is accompanied by a
quality assurance activity.

Testing Techniques
Testing is the process of executing a program with the intention of
finding errors. The various test strategies used for testing the software are as
follows

5.2.1 Unit Testing


Unit testing focuses on verification effort on the smallest unit of the
software design module. The main goal is to make sure that every source
statement and logic path has been executed correctly at least once. The output
of this stage is the source code.

5.2.2 Integration Testing


In Integration testing, we find errors that have occurred during the
integration. After testing each module, which is then integrated into subsystems
and then to form the entire system on which integration testing is performed.
The goal of testing is to detect the design errors, while focusing on the testing
the interconnection between modules.

5.2.3 Validation Testing


This testing concentrates on confirming that the software is error-free in
all respects. All the specified validations are verified and the software is
subjected to hard-core testing. It also aims at determining the degree of
deviation that exists in the software designed from the specification; they are
listed out and are corrected.

Department of CSE 46 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

5.2.4 System Testing

This testing is a series of different tests whose primary is to fully


exercise the computer-based system. This involves:

 Implementing the system in a simulated production environment and


testing it.
 Introducing errors and testing for error handling

System testing ensures that the entire integrated software system meets
requirements. It tests a configuration to ensure known and predictable results.
An example of system testing is the configuration-oriented system integration
test. System testing is based on process descriptions and flows, emphasizing
pre-driven process links and integration points.

White Box Testing:


White Box Testing is a testing in which the software tester has
knowledge of the inner workings, structure and language of the software, or at
least its purpose. It is used to test areas that cannot be reached from a black box
level.

Black Box Testing:


Black Box Testing is testing the software without any knowledge of the
inner workings, structure or language of the module being tested. Black box
tests, as most other kinds of tests, must be written from a definitive source
document, such as specification or requirements document.

Acceptance testing

User Acceptance Testing is a critical phase of any project and requires


significant participation by the end user. It also ensures that the system meets
the functional requirements.

Department of CSE 47 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

5.3 SCREENSHOTS:
User Modules

Scrsht 5.3.1 Home page Scrsht 5.3.2 Registration


Citizen has to register initially to register a complaint.

Scrsht 5.3.3 User Login Scrsht 5.3.4 User Home page


Citizen has to login and register a complaint or view status of a complaint.

Department of CSE 48 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

Scrsht 5.3.5 Post Complaint Scrsht 5.3.6 View Complaint Details


Complaint details are viewed which include location, status, date & time
description and image.

Admin Modules

Scrsht 5.3.7 Admin Home Scrsht 5.3.8 Add employee


Admin can add an employee, delete an employee and is allowed to view all
the registered complaints.

Department of CSE 49 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

Scrsht 5.3.9 View User List Scrsht 5.3.10 View Complaint list

Users list and complaint list is viewed. Each user detail and complaint details
are involved.

Scrsht 5.3.11 All Complaint details

Complaint details include name, location, status, date & time, description and
image.

Department of CSE 50 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

Employee Modules

Scrsht 5.3.12 Employee Home

Scrsht 5.3.13 Employee Complaint Details

Concerned city employee is allowed to view his city complaints.

Department of CSE 51 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

Svrsht 5.3.14 Update Status

After solving a complaint, employee is allowed to update a status by taking


photo which is solved.

Department of CSE 52 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

6. CONCLUSION

This project provides a direct communication between the citizen and


the government. Our project is to help the public in knowing their place details
and getting leakage problems solved in online without going to the officer
regularly until the problem is solved. This will again help in registering the
leakage problems that one is facing in particular area and by continuously
following up them will result in a good, clean and peaceful environment.

One of the fastest growing industries is mobile industry. One has to


register so that officer can solve the problems easily. If registration is done
using Aadhar Card then registration can be done authentically and problems
relating fake complaints can be solved.

Department of CSE 53 TKRCET


REPORTING SYSTEM FOR WASTAGE OF WATER

REFERENCES

1. Pimpri Chinchwad Municipal Corporation, "SMS and Web-Based Complaint


Monitoring System," Viewed Jul 2012.

2.Trupti Bomble, Ritika Raut, Ruchi Kanekar, ”Android Based Complaint


Management System for Municipal Corporation”, Viewed Aprl 2015.

3.Aditi Mhapsekar, Uma Nagarseka, Priyanka Kulkarni and Dhananjay R.


Kalbande. "Voice enabled Android application for vehicular complaint system
using GPS and GSM-SMS technology," in World Congress on Information and
Communication Technologies, 2012

4.C. Chiao-Chen and C. Yang-Chieh, "Comparing consumer complaint


responses to online and offline environment," Internet Research, vol. 21,2011

5. Ozeki NG SMS Gateway, "SMS Gateway-for Software developers and


Service providers," Viewed Jul. 2012

WEBSITES:

http://www.w3schools.com

http://www.google.com

www.android.com

Department of CSE 54 TKRCET