0% found this document useful (0 votes)
16 views50 pages

Suji Project

The Food Waste Management System is a web-based application designed to connect restaurants and NGOs to reduce food wastage while addressing hunger issues. It facilitates the donation of surplus food from restaurants to NGOs, who then distribute it to those in need. The project aims to streamline the process of food donation and improve communication between donors and recipients, ultimately helping to combat food waste and food insecurity.

Uploaded by

Yash Kunchala
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)
16 views50 pages

Suji Project

The Food Waste Management System is a web-based application designed to connect restaurants and NGOs to reduce food wastage while addressing hunger issues. It facilitates the donation of surplus food from restaurants to NGOs, who then distribute it to those in need. The project aims to streamline the process of food donation and improve communication between donors and recipients, ultimately helping to combat food waste and food insecurity.

Uploaded by

Yash Kunchala
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/ 50

Food waste management system

FOOD WASTE MANAGEMENT SYSTEM

A Mini Project report submitted to


Jawaharlal Nehru Technological University, Kakinada,
in the partial fulfillment for the award of the Degree in

MASTER OF COMPUTER APPLICATIONS

Submitted by

PAVULURI.SUJATHA
(22F91F0051)
Under the noble guidance of

Mr.M M RAYUDU , M.Tech(Ph.D)


AssociateProfessor

PRAKASAM ENGINEERING COLLEGE


(An ISO 9001-2008 & NAAC Accredited Institution)

(Affiliated to Jawaharlal Nehru Technological University, Kakinada)

O.V.ROAD, KANDUKUR-523105, A.P.

2022_2023
PRAKASAM ENGINEERING COLLEGE
(An ISO 9001-2008 & NAAC Accredited Institution )
(Affiliated to Jawaharlal Nehru Technological University, Kakinada)

O.V.ROAD, KANDUKUR-523105, A.P.

DEPARTMENT OF
MASTER OF COMPUTER APPLICATIONS
BONAFIDE CERTIFICATE

This is to certify that the mini project entitled “FOOD WASTE MANAGEMENT

SYSTEM” is a bonafide work of PAVULURI.SUJATHA(22F91F0051) in the partial

fulfillment of the requirement for the award of the degree in MASTER OF

COMPUTER APPLICATIONS for the academic year 2022_2024 This work is done

under my supervision and guidance.

Signature of the GUIDE Signature of the HOD


Mr. M. M. RAYUDU Mr. M. M. RAYUDU
M.Tech(Ph.D) M.Tech, (Ph.D)

Signature of the External Examiner


Food waste management system

DECLARATION

I do here by declare that the project work entitled “FOOD WASTE MANAGEMENT

SYSTEM”is a genuine work carried out by me under the guidance of

Mr.M.M.RAYUDU M.Tech (Ph.D) in partial fulfillment for the award of the degree of

“Master of Computer Applications” of Jawaharlal Nehru Technological University,

Kakinada.

PAVULURI.SUJATHA

(22F91F0051)
ACKNOWLEDGEMENT

I feel to render my thankful acknowledgement to the following distinguished personalities,


who stretched their helping hand to me, in completing my mini project work.

I am very grateful and my sincere thanks to our secretary & correspondent


Dr.K.RAMAIAH of PRAKASAM ENGINEERING COLLEGE for giving this
opportunity.

I hereby, express my regards and extend my gratitude to our PRINCIPAL, Dr.K.RAVI


KUMAR , for giving this opportunity to do the thesis as a part of our course.

I express my deep sense of gratitude to Mr.M.M.RAYUDU, M.Tech(Ph.d), Head of the


Department, Department of MCA for having shown keen interest at every stage of
development of our thesis and guiding us in every aspect.

And I am thankful to my Internal Guide Mr.M.M.RAYUDU, M.Tech(Ph.d) who has


channeled my thoughts and timely suggestions.

I would also like to thank all my Faculties in Prakasam Engineering College for their
constant encouragement and for being a great group of knowledgeable and cooperative
people to work with.

PAVULURI.SUJATHA
(22F91F0051)
iv

ABSTRACT

The website to reduce food wastage by providing that to those who are in need. In today's world
people are wasting more food than consuming, which is a huge problem. India ranks 2nd in food
wasting, about 68.8 million tons of food is wasted per year. This proposal is to overcome the food
wastage problem. It will work as a request and response from Restaurants and NGOs. The quantity
and lifetime of the food should be mentioned by the restaurants. NGOs should collect the leftovers
from Restaurants before the lifetime of food and distribute among those in need. And the restaurants
can post the food donated details. Food wastage is a massive problem and one of the most overlooked
things in today’s world.
A huge increase can be seen in food waste. According to data provided by the Food and Agriculture
Organization (http://www.fao.org/food-loss-and-food-waste/flw-data), globally 1/3 of the food
produced for human consumption is wasted, which accounts for about 1.3 billion tons per year. On
the other hand, according to WHO 20% of the population face extreme food shortage. Hence there
is a need to come up with a solution that can avoid wastage of food and help feed the needy. Our
application provides a way to bridge the gap between the wastage and deficit, by letting restaurants
donate this food to NGOs, who in turn can feed the needy.
v

CHAPTERS

S.NO. DESCRIPTION PG.NO.

1. INTRODUCTION 1
1.1 PROBLEM DEFINITION 1
1.2 EXISTING SYSTEM 1
1.3 PROPOSED SYSTEM 1
1.3.1 ADVANTAGES OF THE PROPOSED SYSTEM 2
1.4 SOFTWARE & HARDWARE REQUIREMENTS 2
1.5. MODULE DESCRIPTION 3
1.6 SYSTEM REQUIREMENT SPECIFICATION 4
2. SYSTEM ANALYSIS 5
2.1 SCENARIO BASED MODELLING 5
2.1.1 USE-CASE DIAGRAM 7
2.1.2 IDENTIFIED USECASES 7
2.2 FLOW ORIENTED MODELLING 10
2.2.1 ACTIVITY DIAGRAM 10
2.3 BEHAVIORAL MODELING 11
2.3.1 STATE CHART DIAGRAM 12
2.3.2 SEQUENCE DIAGRAM 14
2.4 CLASS-BASED MODELLING 16
2.4.1CLASSES IDENTIFIED 18
2.4.2 COLLABORATION DIAGRAM 19
3. FUNCTIONAL AND NON-FUNCTIONAL REQUIREMENTS 21

3.1 FUNCTIONAL REQUIREMENTS 21

3.2 NON-FUNCTIONAL REQUIREMENTS 21

4. INTRODUCTION TO TECHNOLOGIES 24

4.1 TECHNOLOGIES USED 25


vi

5. SOURCE CODE 26
6. SCREENS 31
7. WORKING FUNCTIONALITY 36
7.1 WORKFLOW 36
7.1.1 ADMIN MODULE 36
7.1.2 HOTEL MODULE 37
7.1.3 NGO MODULE 37
7.1.4 VISITOR’S MODULE 38
8. SCOPE FOR FURTHER DEVELOPMENT 39
9. CONCLUSION 40
10.REFERENCES 41
vii

LIST OF FIGURES

FIGURE NO. NAME OF FIGURES PAGE NO

1 Architecture of the proposed system 2


2 Use case diagram for food waste management system 9
3 Activity diagram for food waste management system 11
4 State diagram for pick up food 13
5 Sequence diagram for any user login 15
6 Sequence diagram for NGO login 15
7 Sequence diagram for donate food 16
8 Class diagram for the food waste management system 18
9 Collaboration diagram for any user login 19
10 Collaboration diagram for NGO login 20
11 Collaboration diagram for donate food 20
1

CHAPTER 1
INTRODUCTION

1.1 PROBLEM DEFINITION

A food waste management, also known as FWM, is a web-based application that helps in
reducing the food wastage by connecting the hotels/restaurants, NGOs.How to develop a web
application to connect the NGOs and Hotels on one platform to reduce food wastage as well
as hunger? How to manage donations of food by hotels? How to manage pick-up acceptance
or rejection of food by NGOs? How to maintain all donation records by admin? How to
forward food donations done by an individual to NGOs?

1.2 EXISTING SYSTEM

Based on the research of the existing systems of the NGOs on food waste management there
are several issues.The We Are with You Charitable Trust is a recognized NGO, run by
youngsters with several goals. Being an NGO, it involves in donating and distributing food
for needy people. Nowadays, we can observe much food wastage at hotels, restaurants, and at
functions. Food is getting wasted and several people are sleeping with hunger. Even though
NGOs have the capability to distribute food, they may not have proper funds to donate food.
So the NGOs can donate food to needy people, if hotels donate the waste food. However,
there is no proper connection between hotels, restaurants, and NGOs.

DISADVANTAGES THE OF EXISTING SYSTEM


The following are the disadvantages of the existing system:
● Lack of networking between NGOs and donors.

● Time consuming.

● High Maintenance cost.

● Minimal funds.

1.3 PROPOSED SYSTEM

So, we are going to bridge the gap between them by developing a web based platform.We
have designed a system to curb the wastage by managing the flow of food going waste by
redirecting it from the restaurants to the needy people.
2

This web-based Food Waste Management system can assist NGOs in collecting the leftover
food from hotels & restaurants to distribute among those in need.NGOs that are helping poor
communities to battle against starvation & malnutrition can get a pick-up request for food
supply from restaurants or hotels through this application. Once the request is accepted, the
NGOs can collect the food from the restaurants or hotels for its distribution. In this way, this
web-based food waste management system will help restaurants to reduce food waste and will
help in feeding the poor and needy people.

Figure 1.3: ARCHITECTURE OF THE PROPOSED SYSTEM

1.3.1 ADVANTAGES OF THE PROPOSED SYSTEM

● Hotels can greatly reduce the wastage of food by donating.


● NGOs are able to feed the needy people.
● Poor people can get food.
● Even individuals can donate food at hunger spots.
● Admin can maintain the records of the donors.
● Easily connecting the hotels and NGOs on one platform

1.4 SOFTWARE AND HARDWARE REQUIREMENTS:

SOFTWARE REQUIREMENTS:

● OS: Windows 8 and higher , Linux


● Web browser : Which supports JS , CSS , Bootstrap and developer settings enabled
● Hosting Server : XAMPP
● HTML,CSS,PHP.
3

HARDWARE REQUIREMENTS:

• Processor : i3,ryzen3 and higher processors

• RAM : 4GB or above

• Memory type : HDD or SSD

• Internet

1.5 MODULE DESCRIPTION:

The modules present in our project are:

1. Administrator

2. Hotel
3. NGO

4. Visitor

1. Administrator:

The main objective of administrator is to view and manage hotel accounts and NGO
accounts, view feedbacks from users, view contact data table, view all the visitors and
forward visitor requests or delete visitor requests, administrator can forward a visitor
donation to any NGO from the same locality as the visitor, the latest donation will be
considered.

2. Hotel:

The main objective of hotel is to donate food to NGO and check the donation status. Hotel
can also contact the administrator and send feedback. Hotels can edit their profile, view
hunger spots and list of NGOs in their locality.

3. NGOs:

The main objective of NGOs is to accept or reject food donations by hotels and visitors.
NGOs can view their respective profiles, contact admin and send feedback.

4. Visitor:

The main objective of visitor is to donate food, the admin receives their donation request and
forwards it to NGOs in their respective locality.
4

1.6 SYSTEM REQUIREMENT SPECIFICATION:

A System Requirements Specification (SRS) - a requirements specification for a


software system - is a complete description of the behaviour of a system to be developed. It
includes a set of use cases that describe all the interactions the users will have with the
software. Use cases are also known as functional requirements. In addition, to use cases, the
SRS also contains non-functional (or supplementary) requirements. Non-functional
requirements are requirements that impose constraints on the design or implementation (such
as performance engineering requirements, quality standards, or design constraints).
5

CHAPTER 2
SYSTEM ANALYSIS
2.1 SCENARIO-BASED MODELING

Use-oriented techniques are widely used in software requirement analysis and design. Use
cases and usage scenarios facilitate system understanding and provide a common language
for communication. This paper presents a scenario-based modeling technique and discusses
its applications. In this model, scenarios are organized hierarchically and they capture the
system functionality at various abstraction levels including scenario groups, scenarios, and
sub-scenarios. Combining scenarios or sub-scenarios can form complex scenarios. Data are
also separately identified, organized, and attached to scenarios. This scenario model can be
used to cross-check with the UML model. It can also direct systematic scenario-based testing
including test case generation, test coverage analysis with respect to requirements, and
functional regression testing.

UML DIAGRAMS
The unified modeling language allows the software engineer to express an analysis model
using the modeling notation that is governed by a set of syntactic-semantic and pragmatic
rules. A UML system is represented using five different views that describe the system from
a distinctly different perspective. Each view is defined by a set of diagrams, which is as
follows.

USER MODEL VIEW

● This view represents the system from the user’s perspective.

● The analysis representation describes a usage scenario from the end-user’s


perspective.

STRUCTURAL MODEL VIEW

● In this model the data and functionality are arrived from inside the system.

● This model view models the static structures.


6

BEHAVIORAL MODEL VIEW

It represents the dynamic behaviour as parts of the system, depicting the interactions of
collection between various structural elements described in the user model and structural
model view.

IMPLEMENTATION MODEL VIEW

In this the structural and behavioural as parts of the system are represented as they are to be
built.

ENVIRONMENTAL MODEL VIEW

In these, the structural and behavioural aspects of the environment in which the system is to
be implemented are represented.

UML is specifically constructed through two different domains they are

● UML Analysis modeling, which focuses on the user model and structural model views
of the system?
● UML design modeling, which focuses on behavioural modeling, implementation
modeling and environmental model views.
Use case Diagrams represent the functionality of the system from a user’s point of view. Use
cases are used during requirements elicitation and analysis to represent the functionality of
the system. Use cases focus on the behavior of the system from an external point of view.

Actors are external entities that interact with the system. Examples of actors include users
like administrators, bank customers …etc., or another system like a central database.
Class diagram: A class diagram show’s set of classes, interfaces, collaborations and their
relationships. Class diagrams address the static design view of a system.
Use case diagram: It shows a set of use cases and actors and their relationships. Use case
diagrams address the static design view of a system.
Sequence diagram: It is an interaction diagram that emphasizes the tine ordering messages.
Collaboration diagram: It emphasizes the structural organization of objects that the sender
receives.
7

Activity diagram: It is a special kind of State chart diagram that shows the flow from
activity-activity within a system. It addresses the dynamic view of the system.

2.1.1 USE CASE DIAGRAM:


A use case diagram in the Unified Modeling Language (UML) is a type of behavioral
diagram defined by and created from a Use-case analysis. Its purpose is to present a graphical
overview of the functionality provided by a system in terms of actors, their goals
(represented as use cases), and any dependencies between those use cases. The main purpose
of a use case diagram is to show what system functions are performed for which actor. Roles
of the actors in the system can be depicted.

2.1.2 IDENTIFIED USE CASES:

Interaction among actors is not shown on the use case diagram. If this interaction is essential
to a coherent description of the desired behavior, perhaps the system or use case boundaries
should be re-examined. Alternatively, interaction among actors can be part of the
assumptions used in the use case. The different elements present in a use case diagram are as
follows:

Use cases

A use case describes a sequence of actions that provide something of measurable value to an
actor and is drawn as a horizontal ellipse.

Actors

An actor is a person, organization, or external system that plays a role in one or more
interactions with the system.

System boundary boxes (optional)


A rectangle is drawn around the use cases, called the system boundary box, to indicate the
scope of the system. Anything within the box represents functionality that is in scope and
anything outside the box is not.

Four relationships among use cases are used often in practice.


8

Include
In one form of interaction, a given use case may include another. "Include is a Directed
Relationship between two use cases, implying that the behavior of the included use case is
inserted into the behavior of the including use case.

The first use case often depends on the outcome of the included use case. This is useful for
extracting truly common behaviors from multiple use cases into a single description. The
notation is a dashed arrow from the including to the included use case, with the label
"«include» “There are no parameters or return values. To specify the location in a flow of
events in which the base use case includes the behavior of another, you simply write include
followed by the name of the use case you want to include, as in the following flow for track
order.

Extend

In another form of interaction, a given use case (the extension) may extend another. This
relationship indicates that the behaviour of the extension use case may be inserted in the
extended use case under some conditions. The notation is a dashed arrow from the extension
to the extended use case, with the label "«extend»". Models use the «extend» relationship to
indicate use cases that are "optional" to the base use case.

Generalization

In the third form of relationship among use cases, a generalization/specialization relationship


exists. A given use case may have common behaviours, requirements, constraints, and
assumptions with a more general use case. In this case, describe them once, and deal with it
in the same way, describing any differences in the specialized cases.

Associations

Associations between actors and use cases are indicated in use case diagrams by solid lines.
An association exists whenever an actor is involved with an interaction described by a use
case. Associations are modeled as lines connecting use cases and actors to one another, with
an optional arrowhead on one end of the line. The arrowhead is often used to indicate
9

the direction of the initial invocation of the relationship or to indicate the primary actor
within the use case.

DESCRIPTION:

The users (admin, NGOs, donors, visitors) need to register to access the website. The users
must login into the food waste management system by entering their respective credentials.
Once logged in they can use their respective functionalities.The user will go to the login tab.
Then the user (admin/hotel/NGO) will fill in the details like username and password. Users
can change their details by clicking on edit details, the edit profile button, one can change
their name, phone number, address, email, password. The admin user manages the donors
and NGOs and forwards the visitors' donation to NGOs. Hotels and visitors can donate food
to NGOs, hotels can choose to which NGO they would like to donate, visitor's donations are
sent to admin.
10

2.2 FLOW ORIENTED MODELING:

2.2.1 ACTIVITY DIAGRAM

Activity diagrams are graphical representations of workflows of stepwise activities


and actions with support for choice, iteration and concurrency. In the Unified Modeling
Language, activity diagrams can be used to describe the business and operational step-by-
step workflows of components in a system. An activity diagram shows the overall flow of
control. Activity diagrams are constructed from a limited repertoire of shapes,connected with
arrows.
The most important shape types:

● Rounded rectangles represent activities;


● Diamonds represent decisions;
● Bars represent the start (split) or end (join) of concurrent activities;
● Ablack circle represents the start (initial state) of the workflow;
● An encircled black circle represents the end (final state).

Arrows run from the start towards the end and represent the order in which activities happen.
However, the join and split symbols in activity diagrams only resolve this for simple cases;
the meaning of the model is not clear when they are arbitrarily combined with decisions.
11

DESCRIPTION:

At first the user (hotel) logs in with his credentials to donate food. Now the NGO will login
and check for food donations. If any food donations are available, he will either accept or
reject them. Now the hotel can check their donation status. Visitors will donate food without
the need to login or register.Visitor donations will be sent to admin. Admin will login and can
manage hotels and NGOs, forward or delete visitor requests if any pending requests are
present.

2.3 BEHAVIOURAL MODELING:

UML behavioral diagrams visualize, specify, construct, and document the dynamic aspects of
a system. Behavioral models describe the internal dynamic aspects of an information system
that supports the business processes in an organization. During analysis, behavioral models
describe what the internal logic of the processes is without specifying how the processes are
to be implemented. Later, in the design and implementation phases, the detailed design of the
operations contained in the object is fully specified.
12

2.3.1 STATE CHART DIAGRAM:

Objects have behaviors and states. The state of an object depends on its current activity or
condition. A state chart diagram shows the possible states of the object and the transitions
that cause a change in state. A state diagram, also called a state machine diagram or state
chart diagram, is an illustration of the states an object can attain as well as the transitions
between those states in the Unified Modeling Language. A state diagram resembles a
flowchart in which the initial state is represented by a large black dot and subsequent states
are portrayed as boxes with rounded corners. There may be one or two horizontal lines
through a box, dividing it into stacked sections. In that case, the upper section contains the
name of the state, the middle section (if any) contains the state variables and the lower
section contains the actions performed in that state. If there are no horizontal lines through a
box, only the name of the state is written inside it. External straight lines, each with an arrow
at one end, connect various pairs of boxes. These lines define the transitions between states.
The final state is portrayed as a large black dot with a circle around it.

The name of the diagram itself clarifies the purpose of the diagram and other details. It
describes different states of a component in a system. The states are specific to a
component/object of a system. A State chart diagram describes a state machine. Now to
clarify it state machine can be defined as a machine which defines different states of an
object and these states are controlled by external or internal events.

State chart diagram is one of the five UML diagrams used to model dynamic nature of a
system. They define different states of an object during its lifetime. And these states are
changed by events. State chart diagram describes the flow of control from one state to
another state. States are defined as a condition in which an object exists and it changes when
some event is triggered. So, the most important purpose of State chart diagram is to model
life time of an object from creation to termination. State chart diagrams are also used for
forward and reverse engineering of a system. But the main purpose is to model reactive
system.
13

DESCRIPTION:

States are defined as a condition in which an object exists and it changes when some event is
triggered. So, the most important purpose of State chart diagram is to model life time of an
object from creation to termination. State chart diagrams are also used for forward and
reverse engineering of a system. Here, if the login is successful flow goes on to pick up the
food that would either be accepted or rejected by the user(NGO) properly then the reaches
end else directly reaches the end state.
14

2.3.2 SEQUENCE DIAGRAM:

A sequence diagram in Unified Modeling Language (UML) 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.

Sequence diagrams are sometimes called event diagrams, event scenarios, and timing
diagrams. A sequence diagram shows, as parallel vertical lines (lifelines), different processes
or objects that live simultaneously, and, as horizontal arrows, the messages exchanged
between them, in the order in which they occur. This allows the specification of simple
runtime scenarios in a graphical manner.

If the lifeline is that of an object, it demonstrates a role. In order to display interaction,


messages are used. These are horizontal arrows with the message name written above them.
Solid arrows with full heads are synchronous calls, solid arrows with stick heads are
asynchronous calls and dashed arrows with stick heads are return messages.

Activation boxes, or method-call boxes, are opaque rectangles drawn on top of lifelines to
represent those processes are being performed in response to the message (Execution
Specifications in UML).

Objects calling methods on themselves use messages and add new activation boxes on top of
any others to indicate a further level of processing. When an object is destroyed (removed
from memory), an X is drawn on top of the lifeline, and the dashed line ceases to be drawn
below it (this is not the case in the first example though). It should be the result of a message,
either from the object itself, or another.

A message sent from outside the diagram can be represented by a message originating from a
filled-in circle (found in UML) or from a border of sequence diagram (gate in UML).
15
16

DESCRIPTION:

Once the application is up and running, the user has to log in (for registered users). If the user
wishes to log in to their account, they have to enter the name and the password and on proper
authentication, they are directed to the respective Home Page, Login would be successful. In
case of mismatch or invalid details, the page will be redirected to the user tab. On successful
login, users donate food and enter the details or send a request to the NGOs.

2.4 CLASS BASED MODELING:

Class-based Modeling, or more commonly class-orientation, refers to the style of object-


oriented programming in which inheritance is achieved by defining classes of objects; as
opposed to the objects themselves (compare Prototype-based programming). The most
popular and developed model of OOP is a class-based model, as opposed to an object-based
model. In this model, objects are entities that combine state (i.e., data), behavior (i.e.,
procedures, or methods) and identity (unique existence among all other objects). The
structure and behavior of an object are defined by a class, which is a definition, or blueprint,
17

of all objects of a specific type. An object must be explicitly created based on a class and an
object thus created is considered to be an instance of that class.
An object is similar to a structure, with the addition of method pointers, member access
control, and an implicit data member which locates instances of the class (i.e., actual objects
of that class) in the class hierarchy (essential for runtime inheritance features).Model, objects
are entities that combine state (i.e., data), behavior (i.e., procedures, or methods) and identity
(unique existence among all other objects). The structure and behavior of an object are
defined by a class, which is a definition, or blueprint, of all objects of a specific type. An
object must be explicitly created based on a class and an object thus created is considered to
be an instance of that class. An object is similar to a structure, with the addition of method
pointers, member access control, and an implicit data member which locates instances of the
class (i.e. actual objects of that class) in the class hierarchy (essential for runtime inheritance
features)In software engineering, a class diagram in the Unified Modeling Language (UML)
is a type of static structure diagram that describes the structure of a system by showing the
system's classes, their attributes, and the relationships between the classes.
The class diagram is the main building block in object-oriented modeling. It is used both for
general conceptual modeling of the semantics of the application, and for detailed modeling
translating the models into programming code. The classes in a class diagram represent both
the main objects and or interactions in the application and the objects to be programmed. In
the class diagram these classes are represented with boxes which contain the two parts:

● The upper part holds the name of the class.


● The middle part contains the attributes of the class.
● The lower part contains the operations of the class
18

2.4.1 CLASSES IDENTIFIED:

DESCRIPTION:

The class diagram is the main building block in object-oriented modeling. It is used both for
general conceptual modeling of the semantics of the application, and for detailed modeling
translating the models into programming code. The classes in a class diagram represent both
the main objects and or interactions in the application and the object to be programmed.
19

2.4.2 COLLABORATION DIAGRAM

A Sequence diagram is dynamic, and more importantly, is time ordered. A Collaboration


diagram is very similar to a Sequence diagram in the purpose it achieves; in other words, it
shows the dynamic interaction of the objects in a system. A distinguishing feature of a
Collaboration diagram is that it shows the objects and their association with other objects in
the system apart from how they interact with each other. The association between objects is
not represented in a Sequence diagram. A Collaboration diagram is easily represented by
modeling objects in a system and representing the associations between the objects as links.
The interaction between the objects is denoted by arrows. To identify the sequence of
invocation of these objects, a number is placed next to each of these arrows. A sophisticated
modeling tool can easily convert a collaboration diagram into a sequence diagram and the
vice versa. Hence, the elements of a Collaboration diagram are essentially the same as that of
a Sequence diagram.
20

DESCRIPTION:

A Collaboration diagram is easily represented by modeling objects in a system and


representing the associations between the objects as links. The interaction between the
objects is denoted by arrows. To identify the sequence of invocation of these objects, a
number is placed next to each of these arrows. A sophisticated modeling tool can easily
convert a collaboration diagram into a sequence diagram and the vice versa. In order to
display interaction, a link is used. User login, login success from the database and making a
donation request. User entering the food details, request sent to NGOs.
21

CHAPTER-3
FUNCTIONAL AND NON-FUNCTIONAL REQUIREMENTS

FUNCTIONAL REQUIREMENTS:
In software engineering, a functional requirement defines a function of a software system
or its component. A function is described as a set of inputs, behavior, and outputs (see also
software). Functional requirements may be calculations, technical details, data manipulation
and processing, and other specific functionality that define what a system is supposed to
accomplish. Behavioral requirements describing all the cases where the system uses the
functional requirements are captured in use cases. Generally, functional requirements are
expressed in the form system shall do <requirement>. The plan for implementing
functional requirements is detailed in the system design. In requirements engineering,
functional requirements specify particular results of a system. Functional requirements drive
the application architecture of a system. A requirements analyst generates use cases after
gathering and validating a set of functional requirements. The hierarchy of functional
requirements is: user/stakeholder request -> feature -> use case -> business rule.
Functional requirements drive the application architecture of a system. A requirements
analyst generates use cases after gathering and validating a set of functional requirements.
Functional requirements may include technical details, data manipulation, and other specific
functionality of the project to provide the information to the user.

NON-FUNCTIONAL REQUIREMENTS:
In systems engineering and requirements engineering, a non-functional requirement is a
requirement that specifies criteria that can be used to judge the operation of a system, rather
than specific behaviors. The project’s non-functional requirements include the following.
 Updating Work status
22

 Problem resolution.
 Error occurrence in the system.
 Customer requests.
- :Availability

A system’s “availability” or “uptime” is the amount of time that is operational and available
for use. It’s related to the server providing the service to the users in displaying images. As our
system will be used by thousands of users at any time our system must be available always. If
there are any cases of updating, they must be performed in a short interval of time without
interrupting the normal services made available to the users

:Efficiency

Specifies how well the software utilizes scarce resources: CPU cycles, disk space, memory,
bandwidth, etc. All of the above-mentioned resources can be effectively used by performing
most of the validations at the client side and reducing the workload on the server by using JSP
instead of CGI which is being implemented now.

:Flexibility

If the organization intends to increase or extend the functionality of the software after it is
deployed, that should be planned from the beginning; it influences choices made. During the
design, development, testing, and deployment of the system. New modules can be easily
integrated into our system without disturbing the existing modules or modifying the logical
database schema of the existing applications

- :Portability

Portability specifies the ease with which the software can be installed on all necessary
platforms, and the platforms on which it is expected to run. By using appropriate server
versions released for different platforms our project can be easily operated on any operating
system, hence can be said to be highly portable.

- :Scalability

Software that is scalable has the ability to handle a wide variety of system configuration
sizes. The non-functional requirements should specify the ways in which the system may
be expected to scale up (by increasing hardware capacity, adding machines, etc.). Our
system can be easily expandable. Any additional requirements such as hardware or
software the increase the performance of the system can be easily added.
23

- :Integrity

Integrity requirements define the security attributes of the system, restricting access to
features or data to certain users and protecting the privacy of data entered into the software.
Certain features access must be disabled to normal users such as adding the details of files,
searching, etc which is the sole responsibility of the server. Access can be disabled by
providing appropriate logins to the users for only access.

- :Usability

Ease-of-use requirements address the factors that constitute the capacity of the software to be
understood, learned, and used by its intended users. It can be easier for the users.

- :Performance

.The performance constraints specify the timing characteristics of the software.


24

CHAPTER-4

INTRODUCTION TO TECHNOLOGIES

4.1 TECHNOLOGIES USED

Front End : HTML , CSS

Back End : PHP

Data Base: MySQL

HTML

HTML stands for Hyper Text Markup Language

HTML is the standard markup language for creating Web pages

HTML describes the structure of a Web page

HTML consists of a series of elements

HTML elements tell the browser how to display the content

HTML elements label pieces of content such as "this is a heading", "this is


a paragraph", "this is a link", etc.

CSS

CSS stands for Cascading Style Sheets

CSS describes how HTML elements are to be displayed on


screen,paper, or in other media
CSS saves a lot of work. It can control the layout of multiple web pages all
at once
External stylesheets are stored in CSS files

CSS is used to define styles for your web pages, including the design,
layout and variations in display for different devices and screen sizes.
25

PHP

PHP is an acronym for "PHP: Hypertext Preprocessor"

PHP is a widely-used, open source scripting language. PHP scripts are


executed on the server.
It is powerful enough to be at the core of the biggest blogging system on
the web. It is deep enough to run the largest social network
PHP files can contain text, HTML, CSS, JavaScript, and PHP code
MY SQL

MySQL is the most popular Open Source Relational SQL


Database Management System.
MySQL is one of the best RDBMS used for developing various
web-based software applications.
MySQL is developed, marketed and supported by MySQL AB, which
is a Swedish company.
SQL

SQL stands for Structured Query Language


SQL lets you access and manipulate databases
SQL can execute queries against a database
SQL can retrieve data from a database
SQL can insert , delete ,update records of Database.
SQL can create new databases
SQL can create new tables in a database
26

CHAPTER-5
SOURCE CODE
Index.php
<?php include('include/config.php');?>
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Basic Page Needs-->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Food Waste Management</title>
<!--Favicons-->

<link rel="shortcut icon" href="images/favicon.ico">

<!-- CSS VENDOR-->


<link rel="stylesheet" type="text/css" href="css/vendor/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="css/vendor/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="css/vendor/owl.carousel.min.css">
<link rel="stylesheet" type="text/css" href="css/vendor/owl.theme.default.min.css">
<link rel="stylesheet" type="text/css" href="css/vendor/magnific-popup.css">
<link rel="stylesheet" type="text/css" href="css/vendor/animate.min.css">
<link rel="stylesheet" type="text/css"
href="css/vendor/bootstrap-dropdownhover.min.css">

<!-- Custom Stylesheet-->


<link rel="stylesheet" type="text/css" href="css/style.css" />

</head>

<body>

<!-- LOAD PAGE -->


<div class="animationload">
27

<div class="loader"></div>
</div>

<!-- BACK TO TOP SECTION -->


<a href="#0" class="cd-top cd-is-visible cd-fade-out">Top</a>

<!-- HEADER -->


<div class="header header-1">

<!-- topheader -->


<?php //include('template/topheader.php');?>

<!-- header -->


<?php include('template/header.php');?>

<!-- nav bar -->


<?php include('template/nav.php');?>
</div>
<!-- home -->
<?php
@$page=$_REQUEST['page'];
if($page=='' && basename($_SERVER['PHP_SELF'])=='index.php')
{
$page='home';
}
if($page!='' && file_exists("middlepage/".$page.'.php') )
{
include("middlepage/".$page.'.php');
}else{
header("location:index.php?page=error");
}
?>
<!-- FOOTER SECTION -->
<?php include('template/footer.php');?>
<script src="js/vendor/modernizr.min.js"></script>
28

<!-- JS VENDOR -->


<script src="js/vendor/jquery.min.js"></script>
<script src="js/vendor/bootstrap.min.js"></script>
<script src="js/vendor/owl.carousel.js"></script>
<script src="js/vendor/jquery.magnific-popup.min.js"></script>

<!-- SENDMAIL -->


<script src="js/vendor/validator.min.js"></script>
<script src="js/vendor/form-scripts.js"></script>
<script src="js/script.js"></script>

</body>
</html>

We use templates for this project instead of running a large number of lines again and again we
use a line which is already loaded. We divide the templates as header, footer, navigation bar.

Template/header.php :

<div class="middlebar">
<div class="container">
<div class="contact-info">

<div class="box-icon-1">
<div class="icon">
<div class="fa fa-envelope-o"></div>
</div>
<div class="body-content">
<div class="heading">Mail :</div>
fwm@gmail.com
</div>
</div>
<!-- INFO 2 -->
<div class="box-icon-1">
<div class="icon">
29

<div class="fa fa-phone"></div>


</div>
<div class="body-content">
<div class="heading">Call Us :</div>
+91 8106344773
</div>
</div>
<!-- INFO 3 -->
<div class="box-act">
<?php
if((isset($_SESSION['ngo_id']) && $_SESSION['ngo_id']!='') || (isset($_SESSION['hotel_id'])
&& $_SESSION['hotel_id']!='') ){?>
<a href="index.php?page=logout" id="logout" class="btn btn-lg btn-primary">LOGOUT</a>

<?php }
else{
?>
<a href="index.php?page=visitor" class="btn btn-lg btn-primary">DONATE NOW</a>
<a href="index.php?page=login" id="login" class="btn btn-lg btn-primary">LOGIN</a>
<?php }?>
</div>

</div>
</div>
</div>
30

Connecting Database to the website :


Include/config.php :
<?php

session_start();
ob_start();

$hostname="localhost";
$username="root";
$password="";
$dbname="wfm";

$con=mysqli_connect($hostname,$username,$password,$dbname);
if(!$con)

{
echo "Server is Not connected";
}

?>
31

CHAPTER-6
OUTPUT SCREENS

Description: MAIN PAGE: One can view this page after getting into the website

Description: HOTEL REGISTRATION: Hotels can register to this website by


entering the required details.
32

Description: NGO REGISTRATION: The NGOs can register or create a new


account in case they are new users.

Description: NGO REGISTRATION: The NGOs can register or create a new


account in case they are new users.
33

Description: Hotel Login: Hotel users can login to his account by entering the credentials.

Description: NGO LOGIN: NGOs can see the food donations they get from hotels or visitors
34

Description : NGO FEEDBACK: The Hotels and NGOs can give feedback respectively.

Description: DONATION HISTORY: The hotels can check the status and history of
donations to the respective NGOs.
35

Description: ADMIN DASHBOARD: Admin can view the dashboard which consists of
several details count of users and many.
36

CHAPTER-7

WORKING FUNCTIONALITY
7.1 WORKFLOW
A person should be able to log into the system through the login page of the application,
change the password, donate food, and accept/ reject the food donations that are donated to
him / her. As soon as the food donation is accepted or rejected or expired the hotel can check
it in the donation history. Visitors can donate food without the need to log in. These
donations are sent to Admin
The admin can manage all accounts and forward or delete visitor donations to NGOs. The
expiration status of the food will be updated automatically after exceeding the expiry time or
pickup time of the food.

The project have total 4 modules


Admin Module

Hotel Module

NGO Module

Visitor Module

7.1.1 ADMIN MODULE:

First, the admin reaches the login page which is specially designed for admin use only and
enters his / her credentials to log in. If the credentials are correct then the admin is redirected
to the admin home page.

Admin module has several functions like:


Change Password: Admin can change his password by giving the old password the
and new password he wants to update.
Manage users: In this section, the admin can delete the profile of users.

View Dashboard: In this section, the admin can view the number of users details, the
count of messages, count feedbacks.
Requests: In this section, the admin can view the food donations sent by hotels, and
visitors and also can the status of the food pick-up request
Hotels: In this section, the admin can view the details of registered hotels.
37

NGOs: In this section, the admin can view the details of registered NGOs.
Feedback: In this section, the admin can see or read the feedback sent by users.
Visitors: In this section, the admin can forward the food pick-up request sent by the
visitor to a local NGO.
Contact: Here admin can get messages from users to contact with the

7.1.2 HOTEL MODULE:


Hotel Module functionalities are:

Donate: A hotel user can able to donate food to NGOs in the local area through this
functionality.

Registration: Hoteliers can register through this section by entering all the required details.

Update Profile: A hotelier can edit his details, including password, and profile image.
Feedback: The user can send feedback regarding any issues through the form, which
is seen by the admin.
Hunger-Spots: Users can view the locations of hunger spots where poor people live.
Donations History: A hotel user can see the history of food donations given by the
hotel
Gallery: The user can view the photo gallery in this section, which is a static photo
gallery.
Contact: The user can view the contact details of admin and also can send messages.

7.1.3 NGO MODULE


NGO Module Functionalities are:

Pick-up request: In this section, NGOs can view the food donations notification. So
thatNGOsO can accept or reject food donations.

Registration: An NGO can register through this section by entering all the required
details.

Profile: An NGO user can edit his details, including password, and profile image.

Feedback: The user can send feedback regarding any issues through the form, which
is seen by the admin.
38

Hunger-Spots: Users can view the locations of hunger spots where poor people live.

Contact: Users can view the contact details of the admin and also can send messages.

Gallery: Users can view the photo gallery in this section, which is a static photo
gallery.

7.1.4 VISITOR’S MODULE

Visitors have the following functionalities:

Donate: A visitor is able to donate food to NGOs in the local area indirectly with the
help of admin through this functionality.

Hunger-Spots: Users can view the locations of hunger spots where poor people live.

Gallery: Users can view the photo gallery in this section, which is a static photo
gallery.
Contact: User can view the contact details of the admin and also can send messages.
39

CHAPTER-8

SCOPE FOR FURTHER DEVELOPMENT

This application can be further developed to track the food delivery. And to send an alert
notification when there is a need for food.It can be very useful in conditions like natural
disasters.By registering not only local NGOs, more no.of registrations can make it work
effectively. It can be used effectively in developed countries and developing countries.
Moreover the website would visualize many changes and better performance. This website
plays a major role in reducing food wastage.
40

CONCLUSION

The new Food Waste Management System acts as a bridge between hotels and NGOs, aiming to
reduce the food waste in the world by allowing hotels and visitors to donate food to NGOs
where there is scarcity of food .The Food Waste Management reduces the hunger and food
wastage in the following ways: Hotels and visitors can donate food to NGOs. NGOs are allowed
to either reject or accept food.Visitors can donate food without the need to login. Issue only with
security, but with only a few websites. Admin can manage hotels and NGOs, forward visitor
donations. Hotels can check donation history to stay updated on donating food.
41

REFERENCES

[1]. Object Oriented Analysis and Design 2005 by Mike O’docherty.


[2]. Visual Modeling with Rational Rose 2002 by Teny Quatran.
[3]. Applying UML and patterns: An Introduction to Object Oriented Analysisand
Design, Third Edition 2005 by Craig Larman.
[4]. Using UML: Software Engineering with objects and components,
SecondEdition 2006 by Perdita Stevens, R. J. Pooley.
[5]. The elements of UML style by Scott W. Ambler.
[6]. The Unified Modeling Language User Guide by Grady Booch, James Rumbaugh,
Ivar Jacobson.
[7]. www.w3schools.com/php
[8]. https://stackoverflow.com

You might also like