You are on page 1of 49

ICLES'

MOTILAL JHUNJHUNWALA COLLEGE


OF ARTS , SCIENCE & COMMERCE
Sector 9 A, Vashi, Navi Mumbai – 400 703

PROJECT REPORT
ON
Food delevery app
"ZAIKA"
Submitted to

Mumbai University, Mumbai

UNIVERSITY OF MUMBAI
In the partial fulfillment of the degree of

Bachelor of Information Technology (B.Sc.IT)


By
RAVISH NARWDESHWAR UPADHYAY

Under the Guidance of


Mrs. Tasneem Kazi.
(2023-2024)
ICLES'
MOTILAL JHUNJHUNWALA COLLEGE
OF ARTS , SCIENCE & COMMERCE,VASHI

Certificate
This is to certify that the project entitled

ZAIKA ANDROID APP


Undertaken by

RAVISH NARWDESHWAR UPADHYAY

during the academic year 2021-22. In partial fulfillment of


B.Sc.IT(Information Technology) Examination.
It is further certified that he has completed all required phases of the
project as given by University of Mumbai.

Internal Guide Principal

External Examiner IT &CS Coordinator


ACKNOWLEDGEMENT

I would especially thank all teaching and non-teaching staff of


INFORMATION TECHNOLOGY faculty for inspiring me in completion of
project. I am thankful to my project guide “Mrs. Tasneem Kazi” for her timely
help and guidance in completing this project successfully.
I would also extend my thanks to our IT/CS Coordinator Mrs. Trupti
Kulkarni for her support and facilities provides to us for the same.
Lastly, I would like to thank all those who directly and indirectly
helped in completion of this project.

Date: Completed by,

Place: Ravish Upadhyay


PROFORMA FOR THE APPROVAL PROJECT PROPOSAL

(Note: All entries of the proforma of approval should be filled up with appropriate
and
complete information. Incomplete proforma of approval in any respect will be
summarily rejected.)

PNR No.: 2021016401982195 Roll no: 23015049

1. Name of the Student

Ravish Narwdeshwar Upadhyay


__________________________________________________________________

2. Title of the Project

Android App Zaika


__________________________________________________________________

3. Name of the Guide

Mrs. Tasneem Kazi


__________________________________________________________________

4. Teaching experience of the Guide ____________________________________

5. Is this your first submission? Yes No

Signature of the Student Signature of the Guide

Date: ………………… Date: …………………….

Signature of the coordinator

Date: …………………
ABSTRACT
"Zaika" is a revolutionary food delivery application designed to cater to the diverse culinary
preferences of consumers worldwide. With a user-friendly interface and seamless navigation,
Zaika connects users with a plethora of local restaurants, offering a wide array of cuisines
ranging from traditional to exotic.

Through advanced algorithms and personalized recommendations, Zaika ensures a tailored


dining experience, matching users with their desired tastes and preferences. With secure
payment options and efficient delivery logistics, Zaika promises convenience and satisfaction
with every order.

Join Zaika today and embark on a culinary journey like never before."Zaika" revolutionizes
the food delivery industry by prioritizing user experience and satisfaction. Through intuitive
features such as real-time order tracking and customizable preferences, Zaika empowers users
to indulge in their culinary cravings effortlessly.
TITLE
The name of my App is
“ Z A I KA”
Index
SR. PG.
CONTENT
NO. NO.
1 Abstract
Chapter1
Introduction
Background
1-3
Objective
2 Advantage
Purpose
Scope
Applicability

Chapter2
Survey of Technologies
3 Android Studio
XML 4-5
JAVA
Firebase
Chapter3
Requirements and Analysis
4 Problem Definition
Requirement Specification 6-7
Planning and Scheduling
Chapter 4
5 Software and Hardware 8
Requirement
Chapter5
6 9-34
Coding
Chapter 6
E-R Diagram
7 Class Diagram
35-40
Flow chart
Block diagram
Chapter7
8 Conclusion 41
Spiral Model
9 References 42
CHAPTER 1
INTRODUCTION

In today's fast-paced world, the demand for convenient food delivery services has
skyrocketed. To cater to this growing need, developing a food delivery app has become a
lucrative venture. Flutter, a powerful cross-platform framework, offers a seamless solution
for creating feature-rich and visually appealing food delivery applications.
Flutter's versatility allows developers to write code once and deploy it on multiple platforms,
including Android, iOS, web, and desktop. This ensures a wider reach and accessibility for
users across various devices.

With the coming of the 21st century, we have entered an "e" generation era. TheInternet has
generated a tremendous level of excitement through its involvementwith all kinds of
businesses starting from e-Commerce, eBusiness, eCRM, eSupplyChain, eMarketplace,
ePayment, eEntertainment, eTicketing, eLearning, toeCitizenoreGovernement. The Internet
has been widely used in many sales andmarketing activities, from the collection of valuable
data to the dissemination ofinformation to different stakeholders, for example, information
retrieval, productcommunication, sales tool, distribution channel, and as a customer support
tool(Singh, Jayashankar and Singh 2001; Calles 2000; Sandberg 1998;
Peterson,Balasubramanian and Bronnenberg 1997). The Internet has opened a window of
opportunity to almost anyone .

BACKGROUND
Online food ordering system is a system to manage the business. The main point of
developing this system is to help the customers to manage the business and help customers
through online ordering and lunch reservation.

The project is being developed because of the long queues that will be in the restaurant
during lunch or dinner hours, one for purchasing tickets and one for collecting food. With the
new system, the customers would be able to order their food from the comfort of their offices,
classrooms, hostels and anywhere outside the school campus without queuing. The system
will cater for the disadvantages of the traditional method which is currently in place.
Mobile phones are becoming increasingly significant tools; they are no longer confined to
serving as a means of communication but are also capable of providing a wide range of
modern technologies and services. Over the years, mobile technologies have grown in
popularity; there have been various new studies and breakthroughs in this fiel

1.2 OBJECTIVE:-

• Convenience: Providing users with a convenient way to order food from a variety of
restaurants without leaving their homes.
• Efficiency: Streamlining the ordering and delivery process to ensure prompt and
efficient service.
• Variety: Offering a wide range of cuisines and restaurant options to cater to diverse
tastes and preferences.

1
• Customer satisfaction: Ensuring high-quality food and service to maintain customer
satisfaction and loyalty.
• Revenue generation: Generating revenue through delivery fees, commissions from
partner restaurants, and potentially advertising.
• Growth: Expanding the user base and market reach through effective marketing and
partnerships.
• Innovation: Introducing new features and technologies to enhance user experience and
stay competitive in the market.

1.3 PURPOSE, SCOPE AND APPLICABILITY: -

1.3.1 PURPOSE:-
The purpose of food delivery is to provide convenience and accessibility to consumers by
delivering prepared meals from restaurants or food establishments directly to their doorstep.
It saves time and effort for customers who may not have the ability or desire to cook or dine
out. Additionally, it can support local businesses by expanding their customer reach beyond
their physical locations.
Functionality:-
• Browse menus: Users can explore a variety of restaurants and cuisines available for
delivery.
• Place orders: Users can select dishes from the menu, customize their orders, and add
them to the cart.
• Payment processing: The app facilitates secure payment transactions, including
options for credit/debit cards, digital wallets, or cash on delivery.
• Track orders: Users can track the status of their orders in real-time, from preparation
to delivery.
• Delivery scheduling: Users can choose delivery times that are convenient for them,
including immediate delivery or scheduling for later.
• Customer support: The app provides assistance to users in case of any issues with
orders, payments, or deliveries.

Overall, food delivery apps aim to streamline the ordering process, provide convenience to
users, and facilitate efficient delivery of food from restaurants to customers' locations.

1.3.2 SCOPE:-

The purpose of food delivery is to provide convenience and accessibility to consumers by


delivering prepared meals from restaurants or food establishments directly to their doorstep.
It saves time and effort for customers who may not have the ability or desire to cook or dine
out. Additionally, it can support local businesses by expanding their customer reach beyond
their physical locations.

2
1.3.3 APPLICABILITY:

• Convenience: Customers can order food from their favorite restaurants without
leaving their homes or offices.
• Time-saving: It saves time for both customers and restaurants by eliminating the need
for phone orders and manual processing.
• Variety: Users have access to a wide range of cuisines and restaurants, expanding
their dining options.
• Accessibility: People with mobility issues or those living in areas with limited dining
options can benefit from food delivery apps.
• Special occasions: Food delivery apps are popular for parties, gatherings, or when
people want to enjoy restaurant-quality food at home.
• Busy lifestyles: Individuals with hectic schedules find food delivery apps convenient
for quick and hassle-free meals.
• Contactless delivery: Especially relevant during health crises, food delivery apps offer
contactless delivery options, minimizing physical interactions.
• Promotions and discounts: Many apps offer promotions, discounts, and loyalty
programs, making dining out more affordable for customers.

1.4 Advantages:-
1. Accessibility: Food delivery apps can be accessed anytime, anywhere, using
smartphones or computers, providing convenience for users on the go.
2. Special Dietary Needs: Many food delivery apps offer filters and search options for
users with specific dietary preferences or restrictions, such as vegetarian, vegan,
gluten-free, or allergen-free options.
3. Order History: Users can easily access their order history, making it convenient to
reorder favorite meals or track expenses over time.
4. Transparency: Food delivery apps often provide detailed information about menu
items, including ingredients, nutritional information, and pricing, helping users make
informed choices.
5. Customer Support: These apps typically offer customer support channels, such as chat
or phone support, to address any issues or concerns that may arise during the ordering
or delivery process.
6. Social Integration: Some food delivery apps allow users to share their dining
experiences on social media platforms, enhancing social interactions and
recommendations among friends and family.
7. Environmental Impact: Certain food delivery apps offer eco-friendly packaging
options or partner with sustainable restaurants, promoting environmental
responsibility and reducing the carbon footprint of food delivery services.

These additional advantages further enhance the overall user experience and satisfaction with
food delivery apps.

3
CHAPTER 2

SURVEY OF TECHNOLOGIES

2.1 Existing System:-


Some old food delivery apps included potential issues like outdated user interfaces, Limited
Selection: The old food delivery app had a limited selection of restaurants and cuisines
available for users, Slow Delivery Times, Manual Order Processing, Slow Delivery Times,
Basic User Interface, Limited Payment Options, Minimal Customer Support.
Overall, the new food delivery app offers significant improvements over its predecessor,
providing users with a wider selection, improved usability, faster delivery times, and
enhanced customer support.

2.2 Proposed System:-


A proposed system for a Food delivery Android app could involve:
1. Enhanced User Interface
2. Advanced Personalization
3. Satisfying customer needs
4. Real-Time Syncing Reliability
5. Bug Fixes and Technical Improvements
6. Innovative Features

2.3 Android Studio:

Android Studio is the official integrated development environment (IDE) for Google's
Android operating system, built on Jet Brains' IntelliJ IDEA software and designed
specifically for Android development. It is available for download on Windows, macOS and
Linux based operating systems. It is a replacement for the Eclipse Android Development
Tools (EADT) as the primary IDE for native Android application development. Android
Studio is licensed under the Apache license but it ships with some SDK updates that are
under a non-free license, making it not open source.

Features:
Gradle-based build support
Android-specific refactoring and quick fixes
Template-based wizards to create common Android designs and components.

1.Java
The good approach towards software development is the object-oriented approach. Java is
based on the oops concept. Android relies heavily on Java fundamentals like classes and
objects and its other useful features of oops. The java folder contains the java source code
files. These files are used as a controller for controlled UI (Layout file). It gets the data from
the Layout file and after processing that data output will be shown in the UI layout. It works
on the backend of an Android application. Java has an extensive set of libraries . It is easy to
take advantage of these libraries . Android SDK has many standard Java libraries included.
These provide functionalities for data structure, math functions , graphics implantation , and
networking functions and much more. These java libraries help us to do everything else we
could want . This way java helps to develop Android applications fast and in efficient
manner.

4
2.XML
XML stands for Extensible Markup Language. XML is a markup language much like HTML
used to describe data. It is derived from Standard Generalized Markup Language (SMGL) .
Basically , the XML tags are not predefined in XML. We need to implement and define the
tags in XML . XML tags define the data and use to store and organize data. It’s easily
scalable and simple to develop. In Android , the XML is used to implement UI related data ,
and it’s a lightweight markup language that doesn’t layout heavy.XML only contains tags,
while implementing they need to be just invoked. The User interface for any Android app is
built as the hierarchy of main layouts, widgets. The layouts are View Group objects or
containers that control how the child view should be positioned on the screen .

Back end – SQLite Database


SQLite is one of the most popular and easy-to-use relational database systems. It possesses
many features over other relational databases. SQLite is an embedded, server-less relational
database management system. It is an in memory open-source library with zero configuration
and does not require any installation. Also, it is very convenient as it’s less than 500kb in
size, which is significantly lesser than other database management systems.

Why Use SQLite?


SQLite is an open-source software. The software does not require any license after
installation.
SQLite is serverless as it doesn't need a different server process or system to operate.
SQLite facilitates you to work on multiple databases on the same session simultaneously,
thus making it flexible.
SQLite is a cross-platform DBMS that can run on all platforms, including macOS,
Windows, etc.
SQLite doesn't require any configuration. It needs no setup or administration.

5
CHAPTER 3

REQUIREMENTS AND ANALYSIS


3.1 Problem Definition:-

Current systems do not provide security for the customer's personal information. There are
multiple chances of data loss and data manipulations can be disturbed. There are huge
chances of data loss and data manipulation can be disturbed. In the current fitness app, users
face challenges related to user engagement, limited personalization, and a lack of diverse and
motivating workout options. Additionally, technical issues such as unreliable real-time
syncing and occasional glitches hinder the overall user experience.

3.2 Requirements Specification:-


● Functional requirements:
In software Engineering (and System Engineering), a functional requirement
defines a system or its components. A function is described as a set of inputs, the behavior,
and output. Functional requirements may be calculation, technical details, data manipulation
and processing and other specific functionality that define what a system is supposed to
accomplish. Behavioral requirements describing the entire functional requirement are
captured in the use case.

● Non-functional requirements:
In the system engineering and requirement Engineering, a non-functional requirement is a
requirement that specific criteria that can be used to judge the operation of a system, rather
than specific behaviors, this should be contrasted with functional requirement that defines
specific behavior or functions. The plan for implementing functional requirements is detailed
in the system design. The plan for implement nonfunctional requirement is detailed in the
System architecture.

3.3 Planning and Scheduling:-

Define Goals: Clearly outline the app's purpose, target audience, and key features.
Market Research: Understand user needs, preferences, and competitor apps to identify unique
selling points.
Feature Prioritization: Prioritize essential features like workout tracking, goal setting, and
progress monitoring.
Technology Stack: Choose suitable technologies for development, considering factors like
platform compatibility and performance.
User Feedback: Gather feedback during beta testing to make necessary improvements.
Launch: Release the app on the Google Play Store, ensuring it meets all guidelines.

6
GANTT CHART

7
CHAPTER 4
Software and Hardware Requirements:-
Frontend:
XML
JAVA
ANDROID SDK
GOOGLE MATERIAL DESIGNS
Backend:
SQLITE DATABASE
Hardware:
Processor : Intel i3 or AMD Ryzen 3 or above.
Ram : 8GB or more
SSD : 128 GB or more
HDD : 256 GB or more
1280 x 800 minimum screen resolution
Software:
Android Studio
User Requirement :
An Android Smartphone having at least android v5
Ram : 2 GB or more

8
CHAPTER 5

CODING
Adapter class:

package com.example.restro.Adapters;
import android.content.Context;
import android.content.Intent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.example.restro.DetailActivity;
import com.example.restro.Models.MainModel;
import com.example.restro.R;
import java.util.ArrayList;
public class MainAdapter extends RecyclerView.Adapter<MainAdapter.viewholder> {
ArrayList<MainModel>list;
Context context;
public MainAdapter(ArrayList<MainModel> list1, Context context) {

this.list = list1;
this.context = context;
}
@NonNull
@Override
public viewholder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(context).inflate(R.layout.sample_italianfood,parent,false);
return new viewholder(view);
}
@Override
public void onBindViewHolder(@NonNull viewholder holder, int position) {
final MainModel model = list.get(position);
holder.Foodimage.setImageResource(model.getImage());
holder.mainName.setText(model.getName());
holder.price.setText(model.getPrice());
holder.description.setText(model.getDescription());
holder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(context, DetailActivity.class);

9
intent.putExtra("image",model.getImage());
intent.putExtra("price",model.getPrice());
intent.putExtra("name",model.getName());
intent.putExtra("description",model.getDescription());
context.startActivity(intent);
}
});
}
@Override
public int getItemCount() {
return list.size();
}
public class viewholder extends RecyclerView.ViewHolder {
ImageView Foodimage;
TextView mainName,price,description;
public viewholder(@NonNull View itemView) {
super(itemView);
Foodimage = itemView.findViewById(R.id.imageView6);
mainName= itemView.findViewById(R.id.foodName);
price = itemView.findViewById(R.id.orderPrice);
description = itemView.findViewById(R.id.description);
}}}

Model Class :
package com.example.restro.Models;
public class MainModel {
int image;
String name,price,description;
public MainModel(int image, String name, String price, String description) {
this.image = image;
this.name = name;
this.price = price;
this.description = description;
}
public int getImage() {
return image;
}
public void setImage(int image) {
this.image = image;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;

}
public String getPrice() {

10
return price;
}
public void setPrice(String price) {
this.price = price;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
}

DBUser class:

package com.example.restro;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class DBUser extends SQLiteOpenHelper {


public static final String DBNAME ="Login.db";
public DBUser(Context context) {
super(context,"Login.db",null, 1);
}
@Override
public void onCreate(SQLiteDatabase MyDB) {
MyDB.execSQL("create Table users(username TEXT primary key,password
TEXT)");
}
@Override
public void onUpgrade(SQLiteDatabase MyDB, int i, int i1) {
MyDB.execSQL("drop Table if exists users");

}
public Boolean insertData(String username,String password){
SQLiteDatabase MyDB =this.getWritableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put("username",username);

11
contentValues.put("password",password);
long result=MyDB.insert("users",null,contentValues);
if(result==-1)return false;
else
return true;
}
public Boolean checkusername(String username){ // Checking User
SQLiteDatabase MyDB = this.getReadableDatabase();
Cursor cursor = MyDB.rawQuery("select * from users where username=?",new
String[]{username});
if(cursor.getCount()>0)
return true;
else
return false;
}

public Boolean checkusernamepassword(String username,String password){


SQLiteDatabase MyDB = this.getReadableDatabase();
Cursor cursor = MyDB.rawQuery("select * from users where username=? and
password
=? ",new String[]{username,password});
if(cursor.getCount()>0)
return true;
else
return false;
}
public Boolean updatepassword(String username,String password){
SQLiteDatabase MyDB =this.getWritableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put("password",password);
long result=MyDB.update("users",contentValues,"username=?",new String[]
username});
if(result==-1)return false;
else
return true;
}
}

DBOrder class:
package com.example.restro;

import android.content.ContentValues;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import androidx.annotation.Nullable;

12
public class DBOrder extends SQLiteOpenHelper {
final static String DBName ="mydatabase.db";
final static int DBVersion =5;
public DBOrder(@Nullable Context context) {
super(context, DBName,null, DBVersion);
}
@Override
public void onCreate(SQLiteDatabase sqLiteDatabase) {
sqLiteDatabase.execSQL(
"create table orders"+
"(id integer primary key autoincrement,"+
"name text,"+

"phone text,"+
"price int,"+
"quantity int,"+
"description text,"+
"foodname text)"
);
}
@Override
public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) {
sqLiteDatabase.execSQL("DROP table if exists orders");
onCreate(sqLiteDatabase);
}
public boolean insertOrder(String name, String phone, int price, String desc,
String foodName, int quantity){
SQLiteDatabase database=getReadableDatabase();
ContentValues values = new ContentValues();
values.put("name",name);
values.put("phone",phone);
values.put("price",price);
values.put("description",desc);
values.put("foodname",foodName);

values.put("quantity",quantity);
long id= database.insert("orders",null,values);
if(id<=0){
return false;
}
else{
return true;
}
}}

13
MainActvity.java
package com.example.restro;
import androidx.appcompat.app.AppCompatActivity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.view.View;
import android.widget.Button;
import android.view.WindowManager;
import android.os.Bundle;
import android.widget.TextView;
import android.widget.Toast;
public class MainActivity extends AppCompatActivity {
Button login;
Button sign;
TextView skip;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// Transparent ActionBar

getWindow().setFlags(
WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS,
WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS
);
login= findViewById(R.id.button3);
sign = findViewById(R.id.button4);
skip=findViewById(R.id.textView4);
login.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Toast.makeText(MainActivity.this, "Welcome to Login Page",
Toast.LENGTH_LONG).show();
Intent intent = new
Intent(MainActivity.this,SignIn_Activity.class);;
startActivity(intent);
}
});
sign.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Toast.makeText(MainActivity.this, "Welcome to Sign Up Page",

Toast.LENGTH_LONG).show();
Intent intent = new
Intent(MainActivity.this,SignUp_Activity.class);;

14
startActivity(intent);
}
});
skip.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Toast.makeText(MainActivity.this, "Welcome to Restro",
Toast.LENGTH_LONG).show();
Intent intent = new Intent(MainActivity.this,Intro_Activity.class);
startActivity(intent);
}
});
}
@Override
public void onBackPressed() {
new AlertDialog.Builder(this)
.setMessage("Are you sure you want to exist? ")
.setCancelable(false)
.setPositiveButton("Yes", new DialogInterface.OnClickListener() {

@Override
public void onClick(DialogInterface dialogInterface, int i) {
}
});
} @Override
public void onBackPressed() {
new AlertDialog.Builder(this)
.setMessage("Are you sure you want to exist? ")
.setCancelable(false)
.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {

15
SigninActivity.java
package com.example.restro;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
public class SignIn_Activity extends AppCompatActivity {
TextView textView , forget;
EditText username,password;
Button singin;
DBUser BD;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sign_in);
username =findViewById(R.id.Username2);

password = findViewById(R.id.editTextTextPassword);
singin = findViewById(R.id.button5);
forget = findViewById(R.id.textView2);
BD = new DBUser(this);
singin.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
String user = username.getText().toString();
String pass = password.getText().toString();
if(user.equals("")||pass.equals(""))
Toast.makeText(SignIn_Activity.this, "Please Fill all the
fields", Toast.LENGTH_SHORT).show();
else{
Boolean checkuserpass = BD.checkusernamepassword(user,pass);
if(checkuserpass==true){
Toast.makeText(SignIn_Activity.this, "Login In
Successfully", Toast.LENGTH_SHORT).show();
Intent intent = new
Intent(SignIn_Activity.this,Intro_Activity.class);
startActivity(intent); } else{ Toast.makeText(SignIn_Activity.this, "Invalid Credentials !!",
Toast.LENGTH_SHORT).show(); }

}
}
});

16
forget.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(getApplicationContext(),
Password.class);
startActivity(intent);
}
});
textView = findViewById(R.id.textView10);
textView.setOnClickListener(new View.OnClickListener() {
@Override public void onClick(View view) {
Toast.makeText(SignIn_Activity.this, "Welcome to Sign Up Page",
Toast.LENGTH_LONG).show();
Intent intent = new
Intent(SignIn_Activity.this,SignUp_Activity.class);;
startActivity(intent);
} });
}
}

SignupActivity.java
package com.example.restro;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.provider.MediaStore;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
public class SignUp_Activity extends AppCompatActivity {
TextView textview;
EditText name,phone,email,password;
ImageView image;
DBUser BD;

Button sign;
DatabaseReference reff;
User user;
private final int GALLERY_REQ_CODE =1000;
@Override

17
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sign_up);
textview = findViewById(R.id.textView10);
image = findViewById(R.id.imageView);
sign = findViewById(R.id.Signupbtn);
name =findViewById(R.id.editTextTextPersonName);
phone = findViewById(R.id.editTextPhone);
email = findViewById(R.id.editTextTextEmailAddress);
password = findViewById(R.id.editTextTextPassword);
user = new User();
BD = new DBUser(this);
sign.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
String username = name.getText().toString();
String phoneno = phone.getText().toString();

String emailID = email.getText().toString();


String pass = password.getText().toString();
boolean check= validateinfo(username,phoneno,emailID, pass);
if(check==false)
Toast.makeText(SignUp_Activity.this, "Please fill all the
fields", Toast.LENGTH_SHORT).show();
else{
Boolean checkuser = BD.checkusername(username); // It will
check the username
if(checkuser==false){ // If username
doesn't exists it will add the user
Boolean insert = BD.insertData(username,pass);
if(insert == true && check == true){
// If the data is inserted successfully it will move to next page
Toast.makeText(SignUp_Activity.this, "Registered
Successfully", Toast.LENGTH_SHORT).show();
Intent intent = new
Intent(SignUp_Activity.this,SignIn_Activity.class);
startActivity(intent);
}else{
Toast.makeText(SignUp_Activity.this, "Registration
failed", Toast.LENGTH_SHORT).show();

}
}
else{
Toast.makeText(SignUp_Activity.this, "User Already Exists !!
Please Login", Toast.LENGTH_SHORT).show();
}
}

18
}
});
textview.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new
Intent(SignUp_Activity.this,SignIn_Activity.class);
startActivity(intent); }
});
}
private boolean validateinfo(String username, String phoneno, String emailID,
String pass){ // Validation for user information
if(username.length()==0){
name.requestFocus();

name.setError("Field cannot be empty");


return false;
}
else if(!username.matches("[a-zA-Z]+")){
name.requestFocus();
name.setError("Enter only alphabets");
return false;
}
else if(phoneno.length()==0){
phone.requestFocus();
phone.setError("Field cannot be empty");
return false;
}
else if(phoneno.length()>10 || phone.length()<10){
phone.requestFocus();
phone.setError("Enter valid phone number");
return false;
}
else if(emailID.length()==0){
email.requestFocus();
email.setError("Field cannot be empty");
return false; }

else if(!emailID.matches("[a-zA-Z0-9._]+@[a-z]+\\.+[a-z]+")){
email.requestFocus();
email.setError("Enter Valid Email");
return false;
}
else if(pass.length()==0){
password.requestFocus();
password.setError("Field cannot be empty");
return false;

19
}
else if(pass.length()<=7){
password.requestFocus();
password.setError("Minimum 8 characters required");
return false;
}
else {
return true;
}
}
}

MenuActivity.java
package com.example.restro;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
public class Menu1 extends AppCompatActivity {
TextView italy,indian,chinese;
ImageView italian,indianimg,chineseimg;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_menu1);
italy=findViewById(R.id.italy);
indian=findViewById(R.id.indian);

chinese=findViewById(R.id.chinese);
italian=findViewById(R.id.italian);
indianimg=findViewById(R.id.indianimg);
chineseimg=findViewById(R.id.chineseimg);
italian.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(Menu1.this,ItalianFood_Activity.class);
startActivity(intent);
}

20
});
indianimg.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(Menu1.this,indianfood_Activity.class);
startActivity(intent);
}
});
chineseimg.setOnClickListener(new View.OnClickListener() {
@Override

public void onClick(View view) {


Intent intent = new Intent(Menu1.this,chinesefoodActivity.class);
startActivity(intent);
}
});
italy.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(Menu1.this,ItalianFood_Activity.class);
startActivity(intent);
}
});
indian.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(Menu1.this,indianfood_Activity.class);
startActivity(intent);
} });
chinese.setOnClickListener(new View.OnClickListener() { @Override
public void onClick(View view) {

Intent intent = new Intent(Menu1.this,chinesefoodActivity.class);


startActivity(intent);
}
});
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu,menu);
return super.onCreateOptionsMenu(menu);
}
}

21
DetailActivity.java
package com.example.restro;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import com.example.restro.databinding.ActivityDetailBinding;
public class DetailActivity extends AppCompatActivity {
ActivityDetailBinding binding;
TextView quantity,price,tamount;
EditText nameBox,phone;
Button incre,decre;
int count=0;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

binding = ActivityDetailBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());
incre = findViewById(R.id.increment);
decre = findViewById(R.id.decrement);
quantity = findViewById(R.id.quantity);
price = findViewById(R.id.priceLbl);
nameBox = findViewById(R.id.nameBox);
phone = findViewById(R.id.phone);
tamount = findViewById(R.id.tpriceLbl);
int image = getIntent().getIntExtra("image",0);
int price = Integer.parseInt(getIntent().getStringExtra("price"));
String name = getIntent().getStringExtra("name");
String foodName=getIntent().getStringExtra("foodName");
String description = getIntent().getStringExtra("description");
binding.detailimage.setImageResource(image);
binding.priceLbl.setText(String.format("%d",price));
binding.tpriceLbl.setText(String.format("%d",price));
binding.foodName.setText(name);
binding.description.setText(description);
final DBOrder order = new DBOrder(this);
incre.setOnClickListener(new View.OnClickListener() {

@Override
public void onClick(View view) {

22
count ++;
quantity.setText(""+count);
increaseprice();
}
});
decre.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if(count<=1)count=1;
else
count --;
quantity.setText(""+count);
decreaseprice();
}
});
binding.button2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
boolean isInserted = order.insertOrder(

binding.nameBox.getText().toString(),
binding.phone.getText().toString(),
price,
name,
description,
Integer.parseInt(binding.quantity.getText().toString())
);
if(nameBox.length()==0){
nameBox.requestFocus();
nameBox.setError("Field cannot be empty");
}
else if(phone.length()==0){
phone.requestFocus();
phone.setError("Field cannot be empty");
}
else if(phone.length()>10 || phone.length()<10){
phone.requestFocus();
phone.setError("Enter valid phone number");
}
else if(isInserted)

Toast.makeText(DetailActivity.this, "Food Ordered",


Toast.LENGTH_SHORT).show();
}
});

23
}
public void increaseprice(){
int value = Integer.parseInt(quantity.getText().toString());
int cost = Integer.parseInt(price.getText().toString());
int sum=0;
sum=sum+(value*cost);
tamount.setText(String.valueOf(sum));
}
private void decreaseprice(){
int count = 0;
int value = Integer.parseInt(quantity.getText().toString());
int cost = Integer.parseInt(price.getText().toString());
int sum=0;
sum=sum+(value*cost); sum-=cost;
tamount.setText(String.valueOf(sum));
}
}

24
AndroidManifests.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Restro"
tools:targetApi="31">
<activity
android:name=".ResetActivity"
android:exported="false">
<meta-data
android:name="android.app.lib_name"

android:value="" />
</activity>
<activity
android:name=".Password"
android:exported="false">
<meta-data
android:name="android.app.lib_name"
android:value="" />
</activity>
<activity
android:name=".tab"
android:exported="false">
<meta-data
android:name="android.app.lib_name"
android:value="" />
</activity>
<activity
android:name=".Menu1"
android:exported="false">
<meta-data
android:name="android.app.lib_name"

android:value="" />

25
</activity>
<activity
android:name=".DetailActivity"
android:exported="false">
<meta-data
android:name="android.app.lib_name"
android:value="" />
</activity>
<activity
android:name=".chinesefoodActivity"
android:exported="false">
<meta-data
android:name="android.app.lib_name"
android:value="" />
</activity>
<activity
android:name=".indianfood_Activity"
android:exported="false">
<meta-data
android:name="android.app.lib_name"

android:value="" />
</activity>
<activity
android:name=".Intro_Activity"
android:exported="false">
<meta-data
android:name="android.app.lib_name"
android:value="" />
</activity>
<activity
android:name=".ItalianFood_Activity"
android:exported="false">
<meta-data
android:name="android.app.lib_name"
android:value="" />
</activity>
<activity
android:name=".SplashActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />


</intent-filter>
<meta-data

26
android:name="android.app.lib_name"
android:value="" />
</activity>
<activity
android:name=".SignIn_Activity"
android:exported="false">
<meta-data
android:name="android.app.lib_name"
android:value="" />
</activity>
<activity
android:name=".SignUp_Activity"
android:exported="false">
<meta-data
android:name="android.app.lib_name"
android:value="" />
</activity>
<activity

android:name=".MainActivity"
android:exported="false">
<meta-data
android:name="android.app.lib_name"
android:value="" />
</activity>
<meta-data
android:name="preloaded_fonts"
android:resource="@array/preloaded_fonts" />
</application>
</manifest>

27
SigninActivity.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background1"
android:orientation="vertical"
tools:context=".SignIn_Activity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/backgroundopacity"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="40dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="40dp"

android:layout_marginBottom="15dp"
android:orientation="vertical">
<TextView
android:id="@+id/textView3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_marginBottom="20dp"
android:fontFamily="@font/amita"
android:gravity="center"
android:text="Z A I K A"
android:textColor="#FC942E"
android:textSize="60dp"
android:textStyle="bold|italic" />
<EditText
android:id="@+id/Username2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:hint="UserName"
android:inputType="textPersonName"

28
android:minHeight="48dp"
android:padding="10dp"
android:textColor="#FCFBFB"
android:textColorHint="#F6F4F4" />
<EditText
android:id="@+id/editTextTextPassword"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:ems="10"
android:hint="Password"
android:inputType="textPassword"
android:minHeight="48dp"
android:padding="10dp"
android:textColor="#FCFBFB"
android:textColorHint="#F5F0F0" />
<Button
android:id="@+id/button5"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"

android:background="@drawable/btn_gradient"
android:text="Sign In"
android:textSize="18sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:gravity="center"
android:orientation="horizontal">
<View
android:id="@+id/view"
android:layout_width="50dp"
android:layout_height="2dp"
android:layout_gravity="center"
android:layout_marginLeft="5dp"
android:background="@color/white" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"

29
android:text="Forget Password"
android:textColor="@color/white"
android:textSize="20sp"
android:textStyle="bold" />
<View
android:id="@+id/view2"
android:layout_width="50dp"
android:layout_height="2dp"
android:layout_gravity="center"
android:background="@color/white" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="135dp"
android:orientation="horizontal">
<Button
android:id="@+id/button6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="20dp"

android:layout_marginRight="10dp"
android:layout_weight="1"
android:background="@drawable/fbbutton"
android:text="facebook" />
<Button
android:id="@+id/button7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginTop="20dp"
android:layout_marginRight="5dp"
android:layout_weight="1"
android:background="@drawable/googlebutton"
android:text="google" />
</LinearLayout>
<TextView
android:id="@+id/textView10"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="New User ? Create Account "

30
android:textColor="@color/white"
android:textSize="16dp"
android:textStyle="bold" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>

31
RESULTS
Splash Screen: Main Screen:

Login Screen: Signup Screen:

32
33
Menu Screen: Detail Menu Screen:

34
CHAPTER 6

SYSTEM DESIGN

6.1 Basic Modules:-


1. Login
2. Sign up
3. Home
4. My profile
5. Dish list
6. Order summery
7. Logout
8. Payment method

6.2 Data Design:-


Design is the first step in the development phase for any technique and principle for the
purpose of defining the device , a process or system in sufficient detail to permit its physical
realization. Once the software requirements is analyzed and specified the software design
involves three technical activities :
1. Design coding
2. implementation
3. Testing

Data design is a crucial aspect of software engineering that involves designing the structure
and organization of data within a system. It encompasses the creation of data models,
databases, and data storage solutions to ensure efficient data management, retrieval, and
manipulation. Here are key components and considerations in data design:

1. Requirements Analysis
2. Data Modeling
3. Database Design
4. Data Storage
5. Data Access and Retrieval
6. Concurrency Control
7 .Data Security
8. Data Migration
9. Scalability and Performance
10. Backup and Recovery Documentation

6.3 Data Integrity and Constraints:-

The integrity of the data in the database is maintained through constraints. There as many
type of constraint on the attributes of the tables. For example each table in the database has its
primary key that has constraint NOT NULL and is ‘auto increment’ so that it generates
automatically. Every related table are assigned with foreign key to check the relation, that is
foreign key in the document details table that help in identifying that which user has uploaded
document.

35
6.4 Use Case Diagram:-
Use cases describe the behavior of a system from a user’s standpoint by using actions and
reactions. They allow the definition of the system’s boundary, and the relationships between
the system and the environment. Use cases associated with object-oriented techniques
provide a complete approach for the whole project lifecycle, from specification to
implementation. A use case corresponds to a specific kind of system use. It is an image of a
system’s function, which is triggered in response to the simulation of an external actor.

6.5 E-R Diagram:-


Entity - Entities are people, places, events, objects, or concepts. Relationship – A relationship
is a naturally occurring association among entities.
Types of relationships:
1] Mandatory relationship
2] Optional relationship
3] Binary relationship
4] Ternary relationship
5] Unary relationship

36
ERD –
The traditional approach places a great deal of emphasis on data storage requirements for the
new system. The model used to define the data storage requirements is called the entity-
relationship diagram (ERD).

37
6.6 Activity Diagram:-
An activity diagram is a variant of state chart diagram organized according to actions, and
mainly targeted towards representing the internal behavior of amethod or a use case. An
activity is represented by a rounded rectangle.

38
6.7Class Diagram:-
Class diagrams express, in a general way, the static way, the static structure of a system, in
terms of classes and relationships between those classes .Just as a class describes a set of
objects, an association describes a set of links; objectsare class instances, and links are
association instances.

39
40
CHAPTER 7

CONCLUSION
It has been a great pleasure for me to work on this exciting and challenging project. This
project proved good for me as it provided practical knowledge of not only programming in
backend Database and Android based application , but also about all handling procedures
related with the data in database. It also provides knowledge about the latest technology used
in developing android application that will be great demand in future. This will provide better
opportunities and guidance in future in developing projects independently.

Spiral Model

41
CHAPTER 8

REFERENCE

www.youtube.com
www.google.com
www.codewithharry.com
www.javatpoint.com

42

You might also like