Train Food Ordering App
Train Food Ordering App
By
Signature of Student:
Muhammad Shakir
Registration No. 2019-GCUF-86169
Muhammad Waqas
Registration No. 2019-GCUF-86805
Usama Waqas
Registration No. 2019-GCUF-86879
Dedication
I dedicate this project to God Almighty my creator, my strong pillar, my source of inspiration, wisdom,
knowledge and understanding. He has been the source of my strength throughout this program and on His
wings only have I soared. I also dedicate this work to my Friends who has encouraged me all the way and
whose encouragement has made sure that I give it all it takes to finish that which I have started. I dedicate this
project, titled "Train Food Ordering App," to the individuals who have been a source of inspiration and
support throughout this journey. To my family, for their unwavering love, encouragement, and understanding.
Your belief in me has been my driving force, and I am grateful for your constant support. To my project
supervisor, [Mr. Abu Arshad], for their guidance, expertise, and valuable insights. Their mentorship has been
invaluable in shaping this project and my growth as a developer. To my friends and classmates, for their
camaraderie, motivation, and the countless hours spent brainstorming ideas and discussing challenges. Your
presence has made this project more enjoyable and fulfilling. To the staff and faculty members at [GCUF
Layyah Campus], for providing a conducive learning environment and resources that have contributed to my
education and the successful completion of this project. To all the users and stakeholders who participated in
the testing and evaluation of the app, providing valuable feedback and helping me improve the functionality
and user experience. Lastly, I would like to express my gratitude to everyone who has played a role, big or
small, in this project. Your support and belief in my abilities have been instrumental in its completion. This
project is dedicated to each and every one of you. Thank you for being a part of my journey and for making it
a truly enriching experience.
.
ACKNOWLEDGEMENT
I would like to express my sincere gratitude and appreciation to all those who have contributed to the
successful completion of my Final Year Project titled "Train Food Ordering App." This project has been an
enriching and rewarding experience, and I would like to acknowledge the individuals and organizations for
their support. My project supervisor, Mr. Abu Arshad, for their invaluable guidance, expertise, and
continuous support throughout the project. Their knowledge and insights have been instrumental in shaping
the direction of this work. The faculty members of GCUF Layyah Campus, for providing me with a
conducive learning environment and valuable resources. I am grateful for their dedication to education and
their efforts in imparting knowledge and skills. My family and friends, for their unwavering support,
encouragement, and understanding. Their belief in me and their motivation have been a constant source of
inspiration, driving me to overcome challenges and strive for excellence. The participants who willingly
volunteered their time and provided feedback during the testing and evaluation phases of the project. Their
insights and suggestions have been invaluable in refining the functionality and user experience of the app.
The developers and contributors of open-source libraries, frameworks, and tools that were utilized in the
development of this project. Their efforts have significantly expedited the development process and enhanced
the overall quality of the application. I would also like to extend my gratitude to all the train passengers,
restaurant owners, and delivery personnel who may benefit from this train food ordering app. Their needs and
expectations have been a driving force behind the development of this solution. Lastly, I want to express my
appreciation to all the individuals, both mentioned and unnamed, who have directly or indirectly contributed
to this project. Your support and assistance have played an integral role in its successful completion. In
conclusion, I am truly grateful to everyone who has been a part of this project. Your contributions,
encouragement, and support have been invaluable, and I am honored to have had the opportunity to work on
this project with such wonderful individuals.
Signature:___________________
Internal Examiner:
Name:_______________________
Signature:____________________
Signature:___________________
Table of Contents
Table of Contents.....................................................................................................7
Chapter-1 Introduction.........................................................................................13
1.1 Introduction.........................................................................................................................13
1.2 Background......................................................................................................................... 13
1.3 Purpose................................................................................................................................13
1.4 Scope...................................................................................................................................13
1.5 Objective............................................................................................................................. 13
1.6 Intended Audience and Reading Suggestions..................................................................... 14
1.7 Process Model.....................................................................................................................14
1.8 Document Convention........................................................................................................ 14
Chapter-2 Software Requirement Specification.................................................15
2.1 Overall Description......................................................................................15
2.1.1 Product Perspective..........................................................................................................15
2.1.2 Product Features...............................................................................................................15
2.1.3 Design and Implementation Constraints...........................................................................16
2.1.4 Assumptions and Dependencies....................................................................................... 16
Chapter-3 Analysis................................................................................................ 21
3.1 Identifying Actors and Use Cases using Textual Analysis...................................................21
3.1.1 Use Case Name: Restaurant Owner...........................................................................21
3.1.2 Use Case Name: Passenger........................................................................................22
3.1.3 Use Case Name: Delivery Boy.................................................................................. 23
3.2 Forming Use Case Diagram with Candidate and Use Cases............................................. 24
3.2.1 Use Case diagram: Restaurant Owner....................................................................... 24
3.2.2 Use Case diagram: Passenger.................................................................................... 24
3.2.3 Use Case diagram: Delivery Boy..............................................................................25
3.3 Describe the Events Flow for Use Case.............................................................................25
3.3.1 Addition of Restaurant Owner ..................................................................................25
3.3.2 Addition of Passenger ...............................................................................................25
3.3.3 Addition of Delivery Boy.......................................................................................... 26
Chapter-4 Design...................................................................................................27
4.1 Architecture Diagram.........................................................................................................27
4.2 ERD Diagram with data dictionary.....................................................................................28
4.3 Class Diagram.....................................................................................................................29
4.4 Object Diagram................................................................................................................... 30
4.5 Sequence Diagram...............................................................................................................31
4.6 Activity Diagram.................................................................................................................32
4.7 Collaboration Diagram........................................................................................................33
4.8 State Transition Diagram.....................................................................................................34
Chapter-5 Development.......................................................................................35
5.1 Operating System................................................................................................................35
5.1.1 Available Operating System .....................................................................................35
5.1.2 Selected Operating System........................................................................................ 35
5.2 Development Approach ......................................................................................................35
5.2.1 Available Development Approach ............................................................................ 36
5.2.2 Selected Development Approach...............................................................................36
5.3 Programming Language......................................................................................................36
5.3.1 Available Programming Language ............................................................................37
5.3.2 Selected Programming Language.............................................................................. 37
5.4 Platform...............................................................................................................................38
5.3.1 Available Platform .....................................................................................................38
5.3.2 Selected Platform.......................................................................................................39
5.4 Case Tool.............................................................................................................................39
5.4.1 Available Case Tools .................................................................................................39
5.4.2 Selected Case Tool.....................................................................................................40
5.5 Database.............................................................................................................................. 40
5.5.1 Available Database ....................................................................................................40
5.1.2 Selected Database......................................................................................................41
Chapter-6 Testing........................................................................................................42
6.1 Test Case Specification....................................................................................................... 42
6.2 Black Box Test Case...........................................................................................................42
6.2 1 BVA or Boundary Value Analysis..............................................................................42
6.2.2 Equivalence Class Partitioning.................................................................................. 42
6.2.3 State Transition Testing..............................................................................................42
6.2.4 Decision Table Testing...............................................................................................42
6.2.5 Graph Base Testing.................................................................................................... 42
6.3 White Box Testing..............................................................................................................43
6.3 1 Statement Coverage................................................................................................... 43
6.3.2 Branch Coverage........................................................................................................43
6.3.3 Path Coverage............................................................................................................43
6. 4 Test Cases...........................................................................................................................44
Chapter-7 Implementation.................................................................................. 48
7.1 Component Diagram...........................................................................................................48
7.2 Deployment Diagram.........................................................................................................49
7.3 Database Architecture (1- Tier, 2-Tier, 3- Tier Architecture).............................................50
Chapter-8 Tools And Technologies.................................................................... 52
8.1 Programming Language......................................................................................................52
8.2 Operating Enjoinment........................................................................................................52
Appendix A: User Documentation.......................................................................53
User Documentation For Restaurant Owner.............................................................................53
User Documentation For Passenger..........................................................................................54
User Documentation For Delivery Boy.................................................................................... 55
Appendix B: Source Code.....................................................................................56
List of Figures
1. Main Interface...............................................................................................................18
7. ERD .............................................................................................................................. 28
Abstract:
The popularity of food delivery increasing day by day. This work focuses on how to food delivery of the
easiest way in the train journey. In the modern-day, almost everyone tries this online food. Otherwise, in this
pandemic, the demand for online food delivery is sky scraping. So, how it see when everyone is going to
travel in long-distance by train, then if they can be trying healthy and delicious food from a restaurant? In
train journeys, travelers cannot get good quality food or the food price is high. By using this android
application, travelers can fulfill their food demand. This thesis focuses on the best way to supply food during
the trip by rail. Almost all of us try this internet food today. In this research work, there have three types of
modules like one application for traveler means customer, one application for riders’ means deliveryman and
another one is for restaurant authority. In this system customer can get good food, deliveryman gets a job
and restaurant can increase their profit. The application needs to be responsive as the application can be
accessed through any device with different sizes of screens. In this work, the firebase database and native
android framework are used. Android studio application is used for writing code for the main body of this
application. The food delivery apps have simple and easy features. So, it is easy to use for everyone. The
new take-way system can make it easier and ensure that maintaining quality.
Keywords
Here are some keywords related to a train food ordering app: Train Food Ordering, Railway Catering, Food
Delivery, Onboard Dining, Train Journey Food, Food Delivery at Stations, Train Food Delivery Service.
Chapter-1
Introduction to the Problem
1.1Introduction
Food Train Food Ordering App will provide relevant food items that will be preferred by the user. Passengers
can access the menu which will be available. This will let passengers place orders with just a few clicks. We
are also making use of an advanced wallet feature to help passengers pay for the food items.
1.2Background
The existing railway system takes food orders manually. This creates errors and makes it difficult to process the
orders. For this, we have integrated a system that will overcome the current manual ordering system.
1.3 Purpose
Food Order in Train application is to develop a system that offers new services online. Food Order in Train is an
android application which is designed to order the food online via mobile application while traveling through
a train. While people travel the long distance through a train, the main problem they face is food.
1.4 Scope
Food Order in Train System is an Android app developed to order food through mobile app while commuting in
train. The main problem that individuals experience when traveling long distances by rail is food. In order to
solve this problem, we have developed a Smartphone application that will allow you to buy food on the train.
Who wants to order food can order food directly from the app. This Food Order in Train app provides more
convenience to users while ordering food. By implementing this food policy on the train, passengers can
overcome the problems they face regarding their food needs.
1.5 Objective
The objective is to develop a online food ordering service Android app, to enable the user to place their order
at anytime during traveling in train.
2. It is way easier to save time and effort to order your favorite food with just a few clicks.
3. Mobile apps provide the freedom to order from any place during traveling in train.
4. Passengers can easily order fresh and tasty food either online or through their mobile phone.
5. Provide passengers with a convenient and hassle-free way to order meals and snacks during their train
journey. Eliminate the need for passengers to carry their own food or rely on limited onboard dining
options.
1.6 Intended Audience and Reading Suggestions
This application can be used by passengers. This is only for those who want food while traveling. This app
is used when traveling by train.
1.6Process Model
The process model for developing a train food ordering app involves several key steps. First, requirements
gathering is conducted to understand the needs of train passengers and food vendors. This information guides
the design of the system architecture, including client-side and server-side components. Food vendors are
then onboarded onto the platform by verifying credentials and establishing partnerships. Vendor profiles and
menus are set up on the app, allowing passengers to browse and order meals. Secure payment processing is
implemented for seamless transactions. Real-time order tracking and notifications are integrated to keep
passengers and vendors updated. Compatibility with multiple train routes and schedules is ensured. Rigorous
testing is performed to ensure proper functionality and usability. Finally, the app is deployed on relevant
platforms, and ongoing support and updates are provided to maintain its performance and meet user needs.
When documenting a Train Food Ordering app, there are several conventions that can be used to ensure
clarity and consistency. Here are some possible conventions:
1.7.1 Title: The document should have a clear and concise title that reflects the purpose of the app.
1.7.2 Introduction: The document should begin with an introduction that provides a brief overview of the
app, its features, and its benefits.
1.7.3 Getting started: This section should provide step-by-step instructions for downloading and
installing the app, as well as any initial setup steps required.
1.7.4 User interface: The document should include screenshots or illustrations of the app's user interface
to help users navigate the app.
1.7.5 Features: This section should provide a detailed description of the app's features, including what
they do and how to use them.
1.7.6 Troubleshooting: The document should include a section on troubleshooting common issues that
users may encounter, along with solutions or workarounds.
1.7.7 Frequently Asked Questions (FAQs): This section should include a list of frequently asked
questions about the app, along with their answers.
1.7.8 Glossary: If the app uses technical or specialized terminology, a glossary of terms can be included to
help users understand the app's functionality.
Chapter-2
AS-1 Internet-enabled computers will be available in the food court at each food stall.
AS-3 Riders will be available to deliver the food for nearby offices.
DE-1 The app would be dependent on rules and regulations by government authorities.
DE-2 The system would require cloud for data storage
The signup process allows new users to create an account within the app. Users provide their necessary
information, such as name, email address, and password. The login feature enables users to access their
accounts by entering their registered email address and password. This authentication process verifies their
identity and grants access to personalized features and functionalities.
Functional Requirements
Name
Password
Email
2.2.2 Checkout Location
The delivery partner can see the location of the restaurant and can pick up the orders. After picking the
order, they can also see the location of the passengers to which they have to deliver the order.
Functional Requirements
Google Maps
2.2.3 Add to Cart
The "Add to Cart" functionality in a train food ordering app allows users to select and accumulate food
items for purchase before proceeding to checkout. It provides a convenient way for users to browse through
the available menu, make their selections, and keep track of their chosen items.
2.2.4 Adding New Items
The feature of adding new food items by a restaurant owner in a train food ordering app allows restaurant
owners to expand their menu and offer additional food options to train passengers.
2.2.5 Check Details
The "Check Details" functionality in a train food ordering app allows users to review and verify the details
of their food orders before finalizing the purchase. It provides an opportunity for users to ensure that their
order is accurate and meets their requirements.
2.2.6 Order details
The "Order Details" functionality in a train food ordering app allows users to view and review the specific
details of their placed orders. It provides users with comprehensive information about their selected food
items, delivery preferences, payment details, and order status.
2.3 External Interface Requirements
2.3.1 User Interfaces
The system will use following User interfaces:
Main Interface
Passenger Login/Register
Restaurant Login/Register
Delivery Boy Login/Register
Android devices.
RAM 8 GB
Minimum Space Required 128GB
Display 16 bit color
2.3.3 Software Interfaces
The system will use following Software interfaces:
Operating system(Android)
Android Studio
Programming language (Java)
Action Response
Actor Passenger
Stakeholders Passenger
Action Response
Action Response
Sign Up
Login
Add Food
Restaurant
Owner
Confirm Order
Sign Up
Login
Check Food
Passenger
Place Order
Cancel Order
Sign Up
Login
Check order
Delivery
Boy
Pick Order
Chapter-4
Design
4.1 Architecture Diagram
4.1.1 Definition:
An architecture diagram is a visual representation of all the elements that make up part, or all, of a system.
Above all, it helps the engineers, designers, stakeholders — and anyone else involved in the project —
understand a system or app’s layout.
4.1.2 Diagram:
Fig.7 ERD
4.3.2 Diagram:
Restaurant Owner
Id: Integer
Id: Integer
Name: Char
Products Cart
+View Food()
Manage
+AddMenu() -Id:Integer -Id: Integar
+1
+AddFood() +1 #Name: Char #NumberOfProducts:
+DeleteFood() #Category:Char Integer
+ModifyMenu() #Subcategory: Char
#Product1: Char
+MakeDeliver() #Product2: Char
+ConfirmDelivery() #Product3: Char
1-1 #Price: Float
+1 #Total: Float
+1
Passenger
-Id:Char Buy
#Name:Char +0..*
#PhoneNo: Integer
#Email: Char Alphanumaric
Delivery Boy:
+BuyFood()
+ViewMenu() -Id:Integer
+AddToCart() Has -Name: Char
+DeleteFromCart() +1
+ViewOrder()
+PickOrder()
Makes
1_*
4.5.2 Diagram:
4.6.2 Diagrams:
Login
Server
Accpected No
Yes
Manage Order Create Food Place Order See Order Add to Card See Order
Exit
The first time system will be ideal. The menu item button pressed the open command, if an unexpected
button was pressed, then it is in an error state, and if it was pressed, cancel the idle transition. If unexpected,
automatic pushed cancel then canceled, the order was placed if not any error.
4.8.2 Diagram:
It is software that manages computer hardware and software resources, provides common services for
computer programs, and enables users to interact with the computer system. The operating system acts as an
intermediary between computer hardware and software applications, allowing them to communicate and
function. Operating systems (OS) are used in computing devices to provide an essential layer of software
that manages and coordinates the hardware and software components of the system. They serve as a bridge
between the user and the computer, enabling users to interact with applications and utilize the underlying
hardware resources efficiently.
5.1.1 Available Operating System
Here are some commonly used OS options for developing a train food ordering app:
Android: Android is an open-source mobile OS developed by Google. It is widely used for
developing apps for smart phones and tablets. If your train food ordering app primarily targets
Android devices, developing it on the Android OS would be a suitable choice.
iOS: iOS is the operating system developed by Apple for its mobile devices, including iPhones and
iPads. If you want to target Apple users specifically, developing the app on the iOS platform is
necessary. However, keep in mind that iOS development requires using Apple's programming
language, Swift, and adherence to Apple's guidelines.
Web-based: Instead of developing a native app for a specific OS, you can opt for a web-based
approach. In this case, the app can be accessed through a web browser, making it platform-
independent. Users can access the app from any device with a web browser, including smartphones,
tablets, and computers.
Cross-platform frameworks: If you aim to develop the app for multiple platforms simultaneously,
you can consider using cross-platform frameworks such as React Native, Flutter, or Xamarin. These
frameworks allow you to write code once and deploy it on multiple platforms, including Android and
iOS.
5.1.2 Selected Operating System
Android: It is currently used in various devices such as mobiles, tablets, televisions, etc. Android
provides a rich application framework that allows us to build innovative apps and games for mobile
devices in a Java language environment. Every train passenger has android devices and can easily
order the food by using mobile.
Requirements Gathering: In this initial phase, gather all the necessary requirements for your train food
ordering app. This includes understanding the functionalities, features, user roles, and any specific
constraints or preferences.
System Design: Once the requirements are defined, proceed to design the overall system architecture and
user interface of the app. Create detailed design specifications, including database structure, screen layouts,
navigation flow, and interactions.
Implementation: With the design specifications in hand, start implementing the train food ordering app
based on the defined requirements and system design. This involves writing code, developing the user
interface, integrating external services (such as payment gateways or notification systems), and
implementing the app's business logic.
Testing: Once the implementation is complete, thoroughly test the app to ensure it functions as intended.
Conduct different types of testing, including unit testing (testing individual components), integration testing
(testing interactions between components), and system testing (testing the entire app's functionality).
Identify and fix any issues or bugs encountered during testing.
Deployment: After successfully testing the app and ensuring its stability, package the app for deployment.
This may involve generating installation files or publishing the app on relevant app stores, such as the
Google Play Store for Android devices.
Operation and Maintenance: Once the app is deployed, monitor its performance, gather user feedback,
and address any reported issues or bugs. Perform regular maintenance tasks, including updates, security
patches, and bug fixes.
A programming language is a formal language that provides a set of instructions for a computer to perform
specific tasks. It allows programmers to write code and communicate with computers to develop software
applications, scripts, or algorithms. Programming languages serve as a means for humans to convey their
instructions to computers effectively.
5.3.1 Available Programming Language
Java: Java is the official programming language for Android app development. It has a large
community and extensive documentation, making it a popular choice. Java is known for its platform
compatibility, object-oriented nature, and support for various libraries and frameworks.
Kotlin: Kotlin is a modern programming language developed by JetBrains and officially supported
by Google for Android app development. Kotlin offers concise syntax, improved safety features, and
enhanced interoperability with Java, making it a preferred choice for many Android developers.
5.3.2 Selected Programming Language
Java: Using Java for Android development offers several benefits:
Wide Adoption: Java has been the primary language for Android app development for many years.
As a result, there is a vast community of developers and extensive resources available, including
libraries, frameworks, and documentation. This makes it easier to find support, solutions, and
examples when working with Java for Android.
Platform Compatibility: Java is known for its platform independence, and Android is no
exception. Android's core libraries are built using Java, and the Android Runtime (ART) translates
Java bytecode into a format that can run on Android devices. This means that Java-based Android
apps can run on a wide range of Android devices, providing broad compatibility.
Mature Ecosystem: Java has a mature ecosystem with a rich set of tools, libraries, and frameworks
specifically tailored for Android development. Android Studio, the official integrated development
environment (IDE) for Android, provides excellent support for Java. Additionally, libraries like
Retrofit, Gson, and Apache HttpClient make it easier to handle network requests, data serialization,
and other common tasks.
Performance: Java is known for its efficient performance, making it well-suited for resource-
constrained environments like mobile devices. The Android runtime optimizes Java bytecode
execution, and developers can optimize their code further by following best practices and leveraging
performance optimization techniques.
5.4 Platform
Android is a popular operating system for mobile devices, and it continues to be a leading platform for app
development. According to Market Research Future (MRFR), the market for mobile app development
platforms is expected to reach USD 70.59 billion by 2030 at a CAGR of 26.46%. There are many different
platforms for developing Android apps, and it can be difficult to know the best choice for your project.
5.1.1 Available Platform
Here are some commonly used platform options for developing a train food ordering app:
Android Studio: Android Studio is the official integrated development environment (IDE) for
Android app development, and it is widely considered the best choice for most developers. It is
developed by Google and offers many features that make it easy to create high-quality apps.
Xamarin: Xamarin is a cross-platform app development platform that allows you to create apps for
Android, Windows, and iOS using a single codebase. It is based on the C# programming language
and uses the .NET framework, which is popular among developers familiar with Windows
development.
Flutter: Flutter is an open-source app development framework created by Google. It is based on
Dart, a programming language that uses a declarative style, making it easy to build high-performance
apps.
PhoneGap: PhoneGap is a cross-platform app development platform that allows you to create apps
using HTML, CSS, and JavaScript. It is based on the Apache Cordova framework and uses a
webview to render the app, which means that you can write your app using web technologies and
then package it as a native app for Android and other platforms.
5.1.2 Selected Platform
Android Studio: Some features of Android Studio include:
o A visual layout editor that allows you to drag and drop UI elements to create the user interface
for your app.
o Support for a variety of programming languages, including Java, Kotlin, and C++.
o Integration with Google Play services, allowing you to easily implement features such as
maps, ads, and in-app payments.
o One of the main advantages of Android Studio is that it is constantly being updated and
improved by Google, ensuring that it stays updated with the latest technologies and trends.
CASE (Computer-Aided Software Engineering) tools, also known as CASE tools or CASE environments,
are software applications that provide support for various activities involved in the software development
process. These tools are designed to assist software developers, analysts, and project managers in tasks such
as analysis, design, coding, testing, and maintenance of software systems.
5.4.1 Available Case tools
There are several CASE (Computer-Aided Software Engineering) tools available that can aid in the
development of a train food ordering app on the Android platform. Here are some commonly used CASE
tools that can be helpful in different stages of the software development lifecycle:
Unified Modeling Language (UML) Tools: UML tools provide support for creating visual models
and diagrams to represent the structure, behavior, and relationships of a software system. They help
in designing the app's architecture, data flow, and user interface. Some popular UML tools include
Enterprise Architect, Lucidchart, and Visual Paradigm.
Integrated Development Environments (IDEs): IDEs are comprehensive software development
environments that offer a range of tools and features to support coding, debugging, and testing.
Android Studio is the official IDE for Android app development, providing essential features like
code editing, compilation, debugging, and deployment.
Version Control Systems (VCS): Version control systems are used to manage source code and track
changes made during development. They allow developers to collaborate, manage different versions
of the codebase, and handle conflicts efficiently. Git, which is widely used in conjunction with
platforms like GitHub and Bitbucket, is a popular version control system.
Issue Tracking and Project Management Tools: These tools help manage tasks, track issues, and
facilitate collaboration within development teams. They allow you to assign tasks, set priorities, track
progress, and communicate with team members. Examples of such tools include Jira, Trello, and
Asana.
5.4.2 Selected Case Tools
Unified Modeling Language (UML) Tools: Unified Modeling Language (UML) tools offer several
benefits in the software development process. One major advantage is their ability to provide a visual
representation of the system being developed. UML diagrams allow developers to create models and
diagrams that illustrate the structure, behavior, and relationships of the software. This visual
representation makes it easier for team members, stakeholders, and clients to understand and
communicate complex concepts and design decisions. UML tools also provide a standardized
notation, ensuring consistency and clarity in communication across the development team. Another
benefit is the documentation aspect.
A database is an organized collection of structured data that is stored and accessed electronically. It is
designed to efficiently store, retrieve, and manage large amounts of data. Databases are widely used in
various applications and industries to store and organize data in a structured manner.
5.5.1 Available Data Base
Here are some commonly used databases that can be suitable for a train food ordering app:
Relational Databases:
o MySQL: MySQL is a popular open-source relational database management system (RDBMS)
known for its scalability, performance, and wide community support. It is well-suited for
applications with structured data and complex querying needs.
o PostgreSQL: PostgreSQL is another powerful open-source RDBMS that offers advanced
features, extensibility, and strong data integrity. It provides support for complex queries, JSON
data, and spatial data, making it suitable for applications requiring advanced data manipulation
capabilities.
NoSQL Databases:
o MongoDB: MongoDB is a popular open-source document-oriented NoSQL database. It
offers flexible schema design, scalability, and high performance for handling unstructured or
semi-structured data.
o Firebase Real-time Database: Firebase is a cloud-based platform that provides a NoSQL
database, among other services. Firebase Realtime Database offers real-time data
synchronization and offline support, making it suitable for real-time collaboration and
synchronization in the train food ordering app.
5.5.2 Selected Database
Firebase Real-time Database: It offers features for backend infrastructure, real-time database, user
authentication, cloud messaging, analytics, and more. This integrated approach simplifies the development
process by providing a unified platform to handle multiple aspects of app functionality. Secondly, Firebase is
known for its real-time database capabilities. The Firebase Real-time Database enables real-time data
synchronization across clients, allowing instant updates and changes to be propagated in real-time. This is
particularly useful for applications that require real-time collaboration or instant data updates, such as chat
apps or collaborative document editing.
Chapter-6
Testing (Software Quality Attributes)
6.1 Test Case Specification
In this portion, we will discuss the testing phase of developed application “Train Food Ordering App” in
different manner to know that how much efficient and effective application is?
6.2 Black Box Test Case
6.2.1 BVA or Boundary Value Analysis:
BVA is Black Box Test Design Technique, which is used to find the errors at boundaries of input domain
(tests the behavior of a program at the input boundaries) rather than finding those errors in the centre of
input. So, the basic idea in boundary value testing is to select input variable values at their: minimum, just
above the minimum, just below the minimum, a nominal value, just below the maximum, maximum and just
above the maximum. That is, for each range, there are two boundaries, the lower boundary (start of the
range) and the upper boundary (end of the range) and the boundaries are the beginning and end of each valid
partition. We should design test cases which exercise the program functionality at the boundaries, and with
values just inside and outside the boundaries. Boundary value analysis is also a part of stress and negative
testing.
Test Case 1:
Test Case 2:
Test Case 3:
Test Case 5:
Test Case 6:
Test Case 7:
Date: 01 May, 2023
System: Android
Objective: Show Order As Restaurant Owner Test ID:7
Version:1
Input:
Click on show order
Test Case 8:
Test Case 9:
Test Case 10
Date: 06 May, 2023
System: Android
Objective: Show Track Order as Passenger Test ID:10
Version:1
Input:
Click on track order.
Test Case 11
Test Case 12
Chapter-7
Implementation
7.1.2 Diagram
7.2.2 Diagram
7.3.2 Diagram
1- Tier Architecture
3- Tier Architecture
XML:
Extensible Markup Language (XML) is a markup language that provides rules to define any data. Unlike
other programming languages, XML cannot perform computing operations by itself. Instead, any
programming language or software can be implemented for structured data management.
Introduction
Welcome to the train food ordering app user documentation for restaurant owners.
This guide will help you understand how to use the app to manage your restaurant and fulfill food
orders for train passengers
Getting Started
Download and install the train food Ordering app from your respective app store.
Launch the app and sign up for a new account or log in if you already have one.
Provide your restaurant details, including name, location, contact information, and menu items.
Menu Management
Include detailed descriptions, prices, and customization options for each menu item.
Order Management
Get notified of new orders in real-time and review order details including food items, quantities, and
special instructions.
Create special offers or discounts for train passengers to attract more orders.
This guide will help you understand how to use the app as a passenger to order food during your train
journey.
Getting Started
Download and install the train food Ordering app from your respective app store.
Launch the app and sign up for a new account or log in if you already have one.
Enter your personal details such as name, contact number, and email address.
Menu Selection
Browse through the menu items and select the desired food items by adding them to your cart.
Order Tracking
After placing the order, you can track its status in real-time.
The app will provide updates on the preparation, dispatch, and estimated delivery time of your order.
Once the delivery personnel arrives at your train compartment, collect your order.
Introduction
Welcome to the train food ordering app user documentation for delivery personnel.
This guide will help you understand how to use the app to efficiently deliver food orders to train
passengers.
Getting Started
Download and install the train food Ordering app from your respective app store.
Launch the app and sign up for a new account or log in if you already have one.
Provide your personal details, including name, contact information, and identification documents.
Accepting Orders
Review order details, including the pickup location, train number, and delivery instructions.
Verify the order details and ensure all items are packed correctly.
Navigate to the assigned train and compartment using the provided directions and map integration.
Delivery Confirmation
Upon reaching the train compartment, confirm your arrival to the passenger through the app.
Handover the order to the passenger, ensuring it matches the details mentioned in the app.
Keep the app updated with your progress during the delivery process.
Update the order status as "picked up," "en route," and "delivered" in real-time.
APPENDIX B:
Source code
Code:
packagecom.food_on.app.ChefFoodPanel;
public ChefFinalOrders(String chefId, String dishId, String dishName, String dishPrice, String
dishQuantity, String randomUID, String totalPrice, String userId) {
ChefId = chefId;
DishId = dishId;
DishName = dishName;
DishPrice = dishPrice;
DishQuantity = dishQuantity;
RandomUID = randomUID;
TotalPrice = totalPrice;
UserId = userId;
public ChefFinalOrders()
return ChefId;
ChefId = chefId;
return DishId;
}
DishId = dishId;
return DishName;
DishName = dishName;
return DishPrice;
DishPrice = dishPrice;
return DishQuantity;
DishQuantity = dishQuantity;
}
public String getRandomUID() {
return RandomUID;
RandomUID = randomUID;
return TotalPrice;
TotalPrice = totalPrice;
return UserId;
UserId = userId;
}
package com.food_on.app.CustomerFoodPanel;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.cepheuen.elegantnumberbutton.view.ElegantNumberButton;
import com.food_on.app.R;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.database.FirebaseDatabase;
import java.util.HashMap;
import java.util.List;
private List<Cart>cartModellist;
this.cartModellist = cartModellist;
this.mcontext = context;
total = 0;
@NonNull
@Override
@Override
holder.dishname.setText(cart.getDishName());
total += Integer.parseInt(cart.getTotalprice());
holder.elegantNumberButton.setNumber(cart.getDishQuantity());
@Override
intnum = newValue;
if (num != 0) {
hashMap.put("DishID", cart.getDishID());
hashMap.put("DishName", cart.getDishName());
hashMap.put("DishQuantity", String.valueOf(num));
hashMap.put("Price", String.valueOf(dishprice));
hashMap.put("Totalprice", String.valueOf(totalprice));
hashMap.put("ChefId",cart.getChefId());
FirebaseDatabase.getInstance().getReference("Cart").child("CartItems").child(FirebaseAuth.get
Instance().getCurrentUser().getUid()).child(cart.getDishID()).setValue(hashMap);
} else {
FirebaseDatabase.getInstance().getReference("Cart").child("CartItems").child(FirebaseAuth.get
Instance().getCurrentUser().getUid()).child(cart.getDishID()).removeValue();
});
FirebaseDatabase.getInstance().getReference("Cart").child("GrandTotal").child(FirebaseAuth.getInstan
ce().getCurrentUser().getUid()).child("GrandTotal").setValue(String.valueOf(total));
}
@Override
public intgetItemCount() {
return cartModellist.size();
ElegantNumberButtonelegantNumberButton;
super(itemView);
dishname = itemView.findViewById(R.id.Dishname);
PriceRs = itemView.findViewById(R.id.pricers);
Qty = itemView.findViewById(R.id.qty);
Totalrs = itemView.findViewById(R.id.totalrs);
elegantNumberButton = itemView.findViewById(R.id.elegantbtn);
}
package com.food_on.app;
private String
City,ConfirmPassword,EmailID,FirstName,LastName,Mobileno,Password,State,Suburban,LocalAddress;
public Customer() {
this.City = City;
ConfirmPassword=confirmPassword;
EmailID = emailID;
FirstName=firstName;
LastName=lastName;
Mobileno = mobileno;
Password = password;
State = state;
Suburban = suburban;
LocalAddress=localAddress;
}
public String getCity() {
return City;
City = city;
return ConfirmPassword;
ConfirmPassword = confirmPassword;
return EmailID;
EmailID = emailID;
}
public String getFirstName() {
return FirstName;
FirstName = firstName;
return LastName;
LastName = lastName;
return Mobileno;
Mobileno = mobileno;
Password = password;
return State;
State = state;
return Suburban;
Suburban = suburban;
return LocalAddress;
}
LocalAddress = localAddress;
package com.food_on.app;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import com.food_on.app.R;
import com.google.android.gms.ads.AdError;
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.FullScreenContentCallback;
import com.google.android.gms.ads.LoadAdError;
import com.google.android.gms.ads.MobileAds;
import com.google.android.gms.ads.initialization.InitializationStatus;
import com.google.android.gms.ads.initialization.OnInitializationCompleteListener;
import com.google.android.gms.ads.interstitial.InterstitialAd;
import com.google.android.gms.ads.interstitial.InterstitialAdLoadCallback;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;
FirebaseAuthFauth;
FirebaseDatabasefirebaseDatabase;
DatabaseReferencedatabaseReference;
ImageViewimageVieww;
TextViewtextView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
imageVieww=(ImageView)findViewById(R.id.imageView);
textView=(TextView)findViewById(R.id.textView7);
imageVieww.animate().alpha(0f).setDuration(0);
textView.animate().alpha(0f).setDuration(0);
imageVieww.animate().alpha(1f).setDuration(1000).setListener(new AnimatorListenerAdapter() {
@Override
textView.animate().alpha(1f).setDuration(800);
});
@Override
});
@Override
Fauth = FirebaseAuth.getInstance();
if (Fauth.getCurrentUser() != null) {
if (Fauth.getCurrentUser().isEmailVerified()) {
Fauth = FirebaseAuth.getInstance();
databaseReference =
FirebaseDatabase.getInstance().getReference("User").child(FirebaseAuth.getInstance().getUid() + "/Role");
databaseReference.addListenerForSingleValueEvent(new ValueEventListener() {
@Override
if (role.equals("Customer")) {
startActivity(n);
finish();
if (role.equals("Chef")) {
startActivity(a);
finish();
if (role.equals("DeliveryPerson")) {
startActivity(intent);
finish();
}
}
@Override
});
} else {
builder.setMessage("Check whether you have verified your details, Otherwise please verify");
builder.setCancelable(false);
@Override
dialog.dismiss();
startActivity(intent);
finish();
});
Fauth.signOut();
} else {
startActivity(intent);
finish();
}, 3000);
package com.food_on.app;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.Toast;
import com.food_on.app.R;
import com.google.android.gms.ads.AdError;
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.FullScreenContentCallback;
import com.google.android.gms.ads.LoadAdError;
import com.google.android.gms.ads.interstitial.InterstitialAd;
import com.google.android.gms.ads.interstitial.InterstitialAdLoadCallback;
ImageViewbgimage;
@Override
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main_menu);
bgimage = findViewById(R.id.back2);
bgimage.setAnimation(zoomin);
bgimage.setAnimation(zoomout);
// loadAd();
zoomout.setAnimationListener(new Animation.AnimationListener() {
@Override
@Override
bgimage.startAnimation(zoomin);
@Override
});
zoomin.setAnimationListener(new Animation.AnimationListener() {
@Override
public void onAnimationStart(Animation animation) {
@Override
bgimage.startAnimation(zoomout);
@Override
});
signinemail.setOnClickListener(new View.OnClickListener() {
@Override
signemail.putExtra("Home", "Email");
startActivity(signemail);
finish();
}
});
signinphone.setOnClickListener(new View.OnClickListener() {
@Override
signphone.putExtra("Home", "Phone");
startActivity(signphone);
finish();
});
signup.setOnClickListener(new View.OnClickListener() {
@Override
signup.putExtra("Home", "SignUp");
startActivity(signup);
finish();
});
@Override
super.onDestroy();
System.gc();
}