Result

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 101

EXP NO: 1

Identifying a System Software – The Food and


9/8/2024
Beverages Management System

Introduction:
A Food and Beverages Management System is designed to streamline the operations of
restaurants, cafes, or any food service establishment. The system integrates various processes such
as order management, inventory tracking, billing, and customer relationship management (CRM). By
leveraging technology, this system aims to improve efficiency, reduce manual errors, and enhance
the overall customer experience

Problem Statement:

In many food and beverage establishments, manual processes can lead to inefficiencies
such as:

Order Errors: Miscommunication between waitstaff and kitchen leads to


incorrect orders.

Inventory Mismanagement: Lack of real-time inventory tracking can result


in overstocking or stockouts.

Long Wait Times: Slow service due to manual processes affects customer satisfaction.

Billing Errors: Manual billing is prone to mistakes, leading to revenue loss.

Customer Feedback: Difficulty in collecting and analyzing customer feedback


for continuous improvement.

Modules :

Order Management: Handles order taking, modification, and communication between


the kitchen and waitstaff.

Inventory Management: Tracks inventory levels in real-time, alerts for low stock, and
automates reordering processes.

Billing and Payment: Manages billing, payments (cash, credit, digital wallets), and
provides receipts to customers.

Customer Relationship Management (CRM): Stores customer data, preferences, and


feedback, enabling personalized service and marketing campaigns.

Reporting and Analytics: Provides insights into sales, inventory usage, customer
preferences, and staff performance through detailed reports.

Reservation and Table Management: Allows customers to reserve tables online,


and manages table assignments for efficient seating.
Menu Management: Allows administrators to create, update, and manage
menu items and categories. Enables easy modification of prices,
descriptions, and availability.

Functional Requirements:

The following functional requirements outline the specific capabilities that the Food and
Beverages System must support:

Order Processing:
o The system must allow staff to input customer orders, modify them, and
cancel them as needed, with real-time updates communicated to the kitchen.
o The system should support order tracking, enabling staff and customers to
monitor the status of orders.
o Integration with a Kitchen Display System (KDS) should be provided
to ensure accurate and efficient communication with the kitchen.
Inventory Tracking:
o The system should monitor inventory levels in real-time, providing
alerts when stock levels are low.
o Automated reordering processes should be supported, generating
purchase orders when inventory falls below predefined thresholds.
o The system must track inventory usage, wastage, and incoming
stock, providing detailed reports for analysis.
Billing System:
o The system should automatically generate accurate bills based on customer
orders, including taxes, discounts, and service charges.
o Support for multiple payment methods, including cash, credit/debit cards, and
digital wallets, is required.
o The system must enable split billing, allowing customers to pay using different
methods or split the bill among individuals.
o Receipt generation should be available in both printed and digital formats.
Customer Data Management:
o The system must securely store and manage customer information,
including contact details, order history, and preferences.
o The system should support the management of loyalty programs, including
points accumulation and rewards redemption.
o Personalized promotions and targeted marketing campaigns should be enabled
based on customer behavior and preferences.
o The system should facilitate the collection and analysis of customer
feedback to improve service quality.
Reporting:
o The system must generate detailed sales reports, including daily, weekly, and
monthly summaries.
o Inventory reports should be provided, offering insights into inventory usage,
wastage, and reordering needs.
o The system should analyze customer behavior, including order frequency,
preferences, and feedback.
o Operational efficiency reports should track key performance indicators
(KPIs) related to service speed, order accuracy, and staff productivity.
Non Functional Requirements:

The non-functional requirements describe the quality attributes, performance standards, and
other constraints that the system must adhere to:

Usability:
o The system must have an intuitive and user-friendly interface that
requires minimal training for staff to operate effectively.
o The interface should be accessible on various devices, including
tablets, smartphones, and desktop computers.
Performance:
o The system must process orders, update inventory, and generate bills quickly
to avoid delays in service.
o The system should be capable of handling high transaction volumes during
peak hours without performance degradation.
Scalability:
o The system must be scalable to accommodate the growing needs of the
business, including an increase in the number of orders, customers, and
inventory items.
o It should support the addition of new modules or features as the
business expands.
Security:
o The system must ensure the protection of sensitive customer data, transaction
details, and inventory information through strong encryption and access
controls.
o Compliance with relevant data protection regulations, such as GDPR or PCI
DSS, must be maintained.
Reliability:
o The system should be highly reliable, with minimal downtime to ensure
continuous operation of the establishment.
o Regular backups and disaster recovery plans must be in place to prevent
data loss and ensure business continuity.
Maintainability:
o The system should be easy to maintain, with clear documentation and
support available for troubleshooting and updates.
o Regular software updates and patches should be provided to address
bugs, security vulnerabilities, and performance improvements.

Conclusion:

The implementation of a Food and Beverages System is crucial for modern food
service establishments that aim to improve operational efficiency, reduce errors, and
enhance customer satisfaction. By integrating various processes into a single, streamlined
platform, the system enables businesses to focus on delivering high-quality food and
exceptional service while minimizing the burden of manual administrative tasks.

This system not only addresses common challenges such as order errors, inventory
mismanagement, and billing inaccuracies but also provides valuable insights through
reporting and analytics. As a result, establishments can make data-driven decisions
to optimize their operations, reduce costs, and increase profitability.
In conclusion, the Food and Beverages System is an essential tool for any food service
business looking to stay competitive in today’s fast-paced industry. By leveraging technology
to automate and optimize key processes, businesses can enhance their service quality,
improve customer satisfaction, and achieve sustainable growth.

Description Alloted Marks Obtained Marks


Preparation 20
Design/Implementation 20
Viva 15
Output 10
Record 10
Total 75

Result:
Thus the software to maintain and manage an restaurant, café or hotel ,the Food and
Beverages Management System has been identified successfully
EXP. NO: 2
9/8/24
SOFTWARE REQUIREMENT SPECIFICATION

Software Requirement
Specification

for

The Food and Beverages


Management System

Prepared by Dafnia M,
Jashera S,
Sathish K
Table of Contents
1. Introduction.............................................................................................................................................. 4
1.1 Purpose................................................................................................................................................................4
1.2 Document Conventions........................................................................................................................................4
1.3 Intended Audience and Reading Suggestions......................................................................................................4
1.4 Product Scope......................................................................................................................................................4
2. Overall Description...................................................................................................................................4
2.1 Product Perspective..............................................................................................................................................4
2.2 Product Functions................................................................................................................................................4
2.3 User Classes and Characteristics..........................................................................................................................5
2.4 Operating Environment........................................................................................................................................5
2.5 Design and Implementation Constraints..............................................................................................................5
2.6 User Documentation............................................................................................................................................5
2.7 Assumptions and Dependencies..........................................................................................................................6
3. External Interface Requirements............................................................................................................6
3.1 User Interfaces.....................................................................................................................................................6
3.2 Hardware Interfaces.............................................................................................................................................6
3.3 Software Interfaces..............................................................................................................................................6
3.4 Communications Interfaces.................................................................................................................................6
4. System Features........................................................................................................................................6
4.1 Order Management..............................................................................................................................................7
4.2 Inventory Management........................................................................................................................................7
4.3 Billing System.....................................................................................................................................................7
4.4 Customer Data Management (CRM)...................................................................................................................8
4.5 Reporting and Analytics......................................................................................................................................8
4.6 Menu Management..............................................................................................................................................8
4.7 Reservation and Table Management....................................................................................................................8
5. Other Nonfunctional Requirements........................................................................................................9
5.1 Performance Requirements..................................................................................................................................9
5.2 Safety Requirements............................................................................................................................................9
5.3 Security Requirements.........................................................................................................................................9
5.4 Software Quality Attributes.................................................................................................................................9
5.5 Business Rules.....................................................................................................................................................9
6. Other Requirements............................................................................................................................... 10
6.1 Localization Requirements................................................................................................................................. 10
6.2 Regulatory and Compliance Requirements........................................................................................................ 10
6.3 Accessibility Requirements................................................................................................................................ 10
1. Introduction
1.1 Purpose

The purpose of this Software Requirements Specification (SRS) is to describe the functional and non-
functional requirements for the Food and Beverages Management System (FBMS). The system aims to
streamline and automate the operations within food service establishments, including restaurants, cafes, and
catering businesses. This SRS provides a comprehensive description of the system's capabilities,
constraints, and interactions with external systems. It is intended to serve as a guide for the development,
testing, and deployment of the FBMS.

1.2 Document Conventions

This document follows the IEEE SRS template conventions. Requirements are categorized and numbered
according to their type and priority. Key terms are highlighted in bold and defined in the Glossary
section. Functional requirements are prefixed with "FR," while non-functional requirements are prefixed
with "NFR."

1.3 Intended Audience and Reading Suggestions

This SRS is intended for the following audiences:

 Developers: To understand the requirements and design specifications.


 Project Managers: To track the progress and scope of the project.
 Quality Assurance Team: To create test cases and validate the system against the requirements.
 Stakeholders: To ensure that the system meets business needs.
 End Users: To understand the functionality of the system and its capabilities.

1.4 Product Scope

The FBMS is designed to be a comprehensive solution for managing food and beverage operations. It
covers order management, inventory tracking, billing, customer relationship management (CRM),
reporting, and analytics. The system will be scalable to accommodate small to large establishments and
flexible enough to integrate with existing hardware and software systems.

2. Overall Description
2.1 Product Perspective

The FBMS is a standalone software product designed to replace manual processes in food service
management. It will be deployed as a web-based application accessible from various devices, including
desktops, tablets, and smartphones. The system is intended to integrate seamlessly with existing kitchen
display systems, payment gateways, and customer feedback tools. The FBMS will provide a unified
interface for managing all aspects of food service operations, from order taking to inventory
management and customer engagement.

2.2 Product Functions

The major functions of the FBMS include:


 Order Management: Handles the entire process of taking, modifying, and canceling orders.
Includes real-time updates to the kitchen display and integration with the billing system.
 Inventory Management: Tracks stock levels in real-time, automates reordering, and generates
detailed reports on inventory usage and waste.
 Billing and Payment Processing: Generates accurate bills, supports multiple payment
methods (credit/debit cards, mobile payments, cash), and manages receipts.
 Customer Relationship Management (CRM): Manages customer data, loyalty programs,
and feedback, enabling targeted marketing and personalized service.
 Reporting and Analytics: Provides insights into sales, inventory levels, customer behavior, and
other key metrics through customizable reports.
 Reservation and Table Management: Manages online reservations, table assignments, and
waitlists, optimizing seating arrangements and customer flow.
 Menu Management: Allows easy updates to menu items, prices, and availability, reflecting
changes across all platforms in real-time.

2.3 User Classes and Characteristics

 Waitstaff: Primarily use the system for order management, billing, and table management. Requires
an intuitive interface with minimal training.
 Kitchen Staff: Use the kitchen display system for order preparation. Needs clear and timely updates
on order status.
 Managers: Use the system for inventory tracking, reporting, and CRM. Requires access to detailed
reports and analytics for decision-making.
 Customers: Interact with the system for online reservations, providing feedback, and
accessing loyalty programs. Requires a user-friendly interface with quick access to relevant
features.
 System Administrators: Responsible for system maintenance, updates, and user
management. Requires full access to all system functionalities and settings.

2.4 Operating Environment

The FBMS will operate in the following environments:

 Hardware: Desktops, tablets, smartphones.


 Operating Systems: Windows, macOS, Linux, Android, iOS.
 Browsers: Chrome, Firefox, Safari, Edge.
 Other Software: Integration with kitchen display systems, payment gateways, and CRM tools.

2.5 Design and Implementation Constraints

 Compliance: The system must comply with GDPR for data protection and PCI DSS for payment
information security.
 Integration: The system must integrate with existing kitchen display systems and payment gateways
used by the establishment.
 Performance: The system must maintain high performance, especially during peak hours, ensuring
that there are no delays in order processing or billing.

2.6 User Documentation

The system will include the following user documentation:

 User Manual: A comprehensive guide covering all features and functionalities.


 Quick Start Guide: A concise guide for new users to quickly learn the basics of the system.
 Online Help: Context-sensitive help accessible within the application.
 Video Tutorials: Step-by-step video guides for common tasks.
2.7 Assumptions and Dependencies

 Stable Internet Connection: The system assumes the availability of a stable internet connection for
real-time updates and cloud-based features.
 Third-Party Integrations: The system depends on third-party services for payment
processing, customer feedback, and kitchen display systems. Any changes in these services may
impact the system's functionality.

3. External Interface Requirements


3.1 User Interfaces

 Order Entry Screen: Designed for waitstaff to input and modify orders. Features an intuitive layout
with options for adding, editing, and canceling orders. Supports quick access to popular items and
specials.
 Kitchen Display Interface: Provides a clear view of incoming orders, grouped by priority. Allows
kitchen staff to mark orders as in-progress or completed. Supports touch input for ease of use.
 Billing Interface: Automates bill generation, supports split payments, and integrates with multiple
payment methods. Displays a summary before finalizing the bill.
 Manager Dashboard: Central hub for inventory management, reporting, and CRM. Offers
customizable widgets and reports for real-time insights.
 Customer Portal: Accessible via web and mobile, allows customers to make reservations, provide
feedback, and view their loyalty points.

3.2 Hardware Interfaces

 Kitchen Display Systems: The FBMS will interface with existing kitchen display systems via
standard communication protocols (e.g., HTTP, WebSocket).
 Payment Terminals: Integration with various payment terminals to facilitate seamless
payment processing.
 Barcode Scanners: Used in inventory management to quickly update stock levels.

3.3 Software Interfaces

 Payment Gateways: Integration with leading payment gateways like Stripe, PayPal, and Square
to process payments securely.
 CRM Systems: Interface with third-party CRM tools to manage customer data and loyalty
programs.
 POS Systems: If needed, the system can integrate with existing POS systems to maintain
consistency in order and billing data.

3.4 Communications Interfaces

 HTTP/HTTPS: Used for communication between the client and server components of the system.
 SMTP: For sending email notifications to customers and staff.
 WebSockets: For real-time communication between the order entry system and kitchen display.

4. System Features
4.1 Order Management

4.1.1 Feature Description

The Order Management module is the core of the FBMS, responsible for handling all customer orders.
It includes:

 Order Entry: Allows waitstaff to enter orders quickly and efficiently. Supports custom orders,
special requests, and modifications.
 Order Tracking: Provides real-time updates to both waitstaff and kitchen staff on the status of
orders.
 Order History: Maintains a record of all orders for reporting and analysis.
 Integration with Kitchen Display: Orders are automatically sent to the kitchen display
system, where they are prioritized and managed.

4.1.2 Functional Requirements

 FR1: The system shall allow waitstaff to enter new orders within 10 seconds.
 FR2: The system shall update the kitchen display within 2 seconds of an order being placed.
 FR3: The system shall store order history for at least one year.

4.2 Inventory Management

4.2.1 Feature Description

The Inventory Management module tracks all stock levels in real-time and automates reordering processes.
Key functionalities include:

 Stock Tracking: Monitors the quantity of each inventory item and updates the database in real-time.
 Automated Reordering: Generates purchase orders when stock levels fall below
predefined thresholds.
 Waste Management: Tracks waste and spoilage, providing reports on inventory usage efficiency.

4.2.2 Functional Requirements

 FR4: The system shall provide real-time inventory updates.


 FR5: The system shall generate automated purchase orders when stock levels are below 10%
of capacity.
 FR6: The system shall track and report waste levels monthly.

4.3 Billing System

4.3.1 Feature Description

The Billing System handles all aspects of bill generation and payment processing. Features include:

 Bill Generation: Automatically generates itemized bills based on orders.


 Payment Processing: Supports multiple payment methods and handles split bills.
 Receipt Management: Offers digital receipts via email and prints physical receipts.

4.3.2 Functional Requirements

 FR7: The system shall generate an itemized bill within 5 seconds of order completion.
 FR8: The system shall support at least three payment methods (credit card, cash, mobile payments).
 FR9: The system shall email receipts to customers upon request.
4.4 Customer Data Management (CRM)

4.4.1 Feature Description

The CRM module manages customer information and engagement strategies. It includes:

 Customer Profiles: Stores detailed customer data, including contact information and order history.
 Loyalty Programs: Manages customer loyalty programs, tracking points, and rewards.
 Feedback Management: Collects and analyzes customer feedback to improve service quality.

4.4.2 Functional Requirements

 FR10: The system shall create and store a customer profile for every customer with more than one
visit.
 FR11: The system shall track loyalty points and allow customers to redeem rewards.
 FR12: The system shall allow customers to provide feedback through the online portal.

4.5 Reporting and Analytics

4.5.1 Feature Description

This module provides detailed insights into various aspects of the business, such as sales performance,
inventory levels, and customer behavior. Key features include:

 Customizable Reports: Users can generate reports based on selected criteria and time frames.
 Sales Analysis: Tracks daily, weekly, and monthly sales, identifying trends and high-performing
items.
 Inventory Reports: Provides insights into stock levels, usage rates, and waste.

4.5.2 Functional Requirements

 FR13: The system shall generate sales reports within 10 seconds based on selected criteria.
 FR14: The system shall provide monthly inventory reports, including waste and
reorder recommendations.
 FR15: The system shall allow managers to export reports in CSV and PDF formats.

4.6 Menu Management

4.6.1 Feature Description

The Menu Management module allows for easy updates to the menu, reflecting changes in items, prices,
and availability across all platforms. Features include:

 Menu Updates: Users can add, edit, or remove menu items in real-time.
 Price Management: Adjusts prices based on demand, time of day, or special promotions.
 Availability Tracking: Automatically updates item availability based on inventory levels.

4.6.2 Functional Requirements

 FR16: The system shall allow managers to update menu items and prices in real-time.
 FR17: The system shall automatically update item availability based on current inventory.
 FR18: The system shall reflect menu changes across all user interfaces within 2 seconds.

4.7 Reservation and Table Management


4.7.1 Feature Description

This module handles online reservations and table assignments, optimizing seating and reducing wait times.
It includes:

 Online Reservations: Allows customers to book tables in advance via the website or mobile app.
 Table Assignment: Automatically assigns tables based on party size, preferences, and availability.
 Waitlist Management: Manages walk-ins by adding them to a waitlist and providing estimated wait
times.

4.7.2 Functional Requirements

 FR19: The system shall allow customers to make reservations online, specifying date, time, and
party size.
 FR20: The system shall automatically assign tables based on availability and customer preferences.
 FR21: The system shall manage a waitlist for walk-ins, providing estimated wait times.

5. Other Nonfunctional Requirements


5.1 Performance Requirements

 NFR1: The system shall process 95% of all transactions (orders, payments) within 2 seconds
during peak hours.
 NFR2: The system shall handle up to 500 concurrent users without performance degradation.

5.2 Safety Requirements

 NFR3: The system shall perform daily backups of all data and store backups in a secure, off-
site location.
 NFR4: The system shall include a disaster recovery plan that allows for full restoration of
services within 24 hours in case of a major failure.

5.3 Security Requirements

 NFR5: The system shall use SSL/TLS encryption for all data transmitted between clients
and servers.
 NFR6: The system shall comply with PCI DSS standards for handling and storing
payment information.
 NFR7: The system shall enforce strong passwords for all user accounts and provide multi-
factor authentication for administrative access.

5.4 Software Quality Attributes

 Reliability: The system must have an uptime of 99.9%.


 Scalability: The system must be scalable to support future growth, including the addition of new
modules or features.
 Usability: The system must be user-friendly, with an intuitive interface requiring minimal training.

5.5 Business Rules

 BR1: All customer orders must be processed in the order they are received unless marked as high
priority.
 BR2: Inventory levels must be updated immediately after an order is completed to ensure
accurate tracking.
 BR3: Customer data must be handled in accordance with GDPR regulations.

6. Other Requirements
6.1 Localization Requirements

 NFR8: The system shall support multiple languages, including English, Spanish, and French,
with the ability to add more languages as needed.
 NFR9: The system shall allow users to set their preferred language in their profile settings.

6.2 Regulatory and Compliance Requirements

 NFR10: The system must comply with local health and safety regulations related to food
service operations.
 NFR11: The system must ensure that all customer data handling practices are GDPR-compliant.

6.3 Accessibility Requirements

 NFR12: The system shall be accessible to users with disabilities, meeting the WCAG 2.1 AA
standard.
 NFR13: The system shall provide screen reader support for visually impaired users.

Result:
Thus the software requirement specification for the project the Food and Beverages
Management System has been identified successfully
Ex No: CLASS DIAGRAM FOR FOOD AND
Date: BEVERAGES MANAGEMENT SYSTEM

AIM:
To develop the class diagram for the food and beverages management system

What is a Class Diagram?

A Class Diagram is a type of UML (Unified Modeling Language) diagram that represents the static
structure of a system. It illustrates the system's classes, their attributes, methods, and the relationships
between the classes. Class diagrams are used to model the data and behavior of a system and are essential in
designing and understanding the architecture of a software system.

Purpose of a Class Diagram


The purpose of a Class Diagram is to:

❖ Define Structure: Shows the structure of the system by identifying classes and their attributes and
methods.
❖ Clarify Relationships: Illustrates how classes interact with one another through relationships such as
associations, inheritance, and dependencies.
❖ Facilitate Design: Helps in designing the system by providing a blueprint for developers to implement
the system's structure.
❖ Enhance Communication: Provides a visual representation that aids in discussions
with stakeholders and development teams.

Notations in a Class Diagram


Classes: Represent entities in the system, shown as rectangles divided into three sections: name, attributes, and
methods.

Attributes: Properties or data held by a class, listed in the second section of the class rectangle.


Methods: Functions or operations that a class can perform, listed in the third section of the class rectangle.

Relationships:

• Association: Represents a relationship between two classes, usually shown as a line connecting
them.

• Inheritance (Generalization): Indicates that one class is a specialized version of another


class, shown with a line and an open arrowhead.

• Aggregation: A type of association that represents a whole-part relationship, depicted with


a line and a diamond at the whole end.

• Composition: A strong form of aggregation where the part cannot exist


independently of the whole, shown with a line and a filled diamond at the whole end.

• Dependency: Indicates that one class depends on another, shown with a dashed line and
an open arrowhead.
Classes

User

 Attributes:
o userID: Unique identifier for each user.
o name: Name of the user.
o email: Email address of the user.
o phoneNumber: Contact number of the user.
 Methods:
o register(): Allows a user to register in the system.
o logIn(): Enables the user to log into their account.
o updateProfile(): Allows the user to update their personal information.
o placeOrder(): Facilitates the user to place an order for food and beverages.

Order

 Attributes:
o orderID: Unique identifier for each order.
o userID: Identifier of the user who placed the order.
o items: A list of MenuItem objects included in the order.
o totalAmount: Total cost of the order.
o status: Current status of the order (e.g., Pending, Completed, Cancelled).
 Methods:
o createOrder(): Creates a new order for the user.
o updateOrder(): Allows modifications to an existing order.
o cancelOrder(): Cancels an existing order.

MenuItem

 Attributes:
o itemID: Unique identifier for each menu item.
o name: Name of the menu item.
o description: Brief description of the menu item.
o price: Price of the menu item.
 Methods:
o updateMenuItem(): Allows updates to the menu item details.
o deleteMenuItem(): Deletes a menu item from the system.

Admin

 Attributes:
o adminID: Unique identifier for each admin user.
o name: Name of the admin.
o email: Email address of the admin.
 Methods:
o manageMenu(): Allows the admin to add, update, or remove menu items.
o reviewOrders(): Enables the admin to review and manage customer orders.
o generateReports(): Generates reports related to orders, sales, and inventory.

Payment

 Attributes:
o paymentID: Unique identifier for each payment transaction.
o orderID: Identifier of the order associated with the payment.
o amount: The amount to be processed for the order.
o paymentStatus: Current status of the payment (e.g., Successful, Failed).
 Methods:
o processPayment(): Processes the payment for the order.
o refundPayment(): Initiates a refund for a cancelled or returned order.

Relationships Between Classes

User - Order:

 Association:
o Users can place multiple orders, represented by a solid line connecting User and Order. This
indicates that one user can have many orders, while each order is associated with one user.

Order - MenuItem:

 Association:
o Orders consist of multiple menu items, represented by a solid line connecting Order and
MenuItem. This shows that one order can contain many menu items, and each menu item can
belong to many orders.

Admin - MenuItem:

 Aggregation:
o Admins manage MenuItems, representing a whole-part relationship where Admin
oversees multiple MenuItems. This is depicted with a hollow diamond at the Admin end
connecting to MenuItem.

Admin - Order:

 Dependency:
o Admins depend on Orders to review and manage them, depicted with a dashed line and
an open arrowhead pointing towards Order. This indicates that the Admin's actions rely on
the existence of Orders.

Payment - Order:

 Association:
o Payments are associated with specific Orders, shown with a solid line connecting Payment and
Order. This indicates that each order is linked to one payment, and each payment is for one
specific order.

Steps to Draw a Class Diagram


1. Identify Classes:
o Determine all the entities that will be part of the system (e.g., User,
Order, MenuItem, Admin, Payment).
2. Define Attributes and Methods:
o List the attributes and methods for each class to capture their characteristics and behaviors.
3. Determine Relationships:
o Identify and represent the relationships between classes, such as
associations, aggregation, and dependencies.
4. Draw Classes:
o Represent each class as a rectangle divided into three sections for the class
name, attributes, and methods.
5. Apply Notations:
o Use UML notations to show relationships between classes, including solid lines
for associations, hollow diamonds for aggregation, and dashed lines for
dependencies.
6. Draw the System Boundary Box:
o Enclose all classes within a boundary box to define the system's scope clearly.

How We Drew the Class Diagram for FBMS


1. Identified Classes:
o Defined key classes such as User, Order, MenuItem, Admin, and Payment.
2. Defined Attributes and Methods:
o Listed relevant attributes and methods for each class to detail their functionalities.
3. Determined Relationships:
o Used associations to show interactions between Users and Orders.
o Applied aggregation to represent the Admin's management of MenuItems.
o Used dependency notation to illustrate the Admin's reliance on Orders for management
purposes.
4. Drawn Classes:
o Represented each class with its attributes and methods in rectangular boxes, ensuring clarity.
5. Applied Notations:
o Included UML notations to clearly depict relationships and interactions, ensuring
easy understanding.
6. System Boundary Box:
o Enclosed all classes within a boundary box to define the system's scope for the Food
and Beverages Management System.
RESULT:

Thus, the classes are identified and the class diagram is developed successfully for Food
and Beverages Management System.
EX.NO:
5 SEQUENCE AND COLLABORATION DIAGRAM FOR
DATE:
FOOD AND BEVERAGES MANAGEMENT SYSTEM

Aim:
To create a sequence diagram and collaboration diagram that models the interactions between
the Waitstaff, Customer, Food and Beverages Management System (FBMS), Kitchen Display
System, Billing System, Inventory Management System, and Database during an order placement
event initiated by the Customer

What is Sequence Diagram?


A Sequence Diagram is a type of interaction diagram that shows how actors (users or external
systems) interact with system components in a time sequence. The diagram models the flow of actions
in the system and is useful for understanding how the system works step by step.

Purpose of a Sequence Diagram


1. Visualize Interactions:
Sequence diagrams show the flow of messages between actors and system components over time,
helping to visualize how different parts of the system interact.

2. Model System Behavior:


They provide a clear understanding of the dynamic behavior of a system, capturing the sequence
of operations for specific use cases.

3. Clarify Process Logic:


By detailing the order of interactions, sequence diagrams help clarify the logic and structure of
processes, ensuring consistency in system design.

4. Facilitate Communication:
Sequence diagrams serve as a communication tool for developers, testers, and stakeholders to
understand the interactions and timing between system elements.

5. Support System Design and Documentation:


These diagrams assist in system design by offering a detailed view of object interactions and serve
as valuable documentation for development and maintenance teams.
Notations in a Sequence Diagram
 Actors: Represents external entities that interact with the system. Example:
User, Emergency Contact, and Admin.

 Lifelines: Represents the sequence of actions over time for both actors and system components.

 Call Message: A call message is a type of message that represents the invocation of an
operation on the target lifeline.

 Return Message: A return message represents the passing of information back to the caller of
a corresponding former message.

 Self Message: A self message represents the invocation of a message on the same lifeline.
 Destroy Message: A destroy message represents the request for destroying the lifecycle of
the target lifeline.

 Comment(or)Note: A note or comment provides the ability to attach various remarks


to elements, carrying no semantic force but containing useful information for modelers.

 Sequence Fragments:
 The fragment operator (in the top left cornet) indicates the type of fragment.
 sequence fragment is represented as a box, called a combined fragment, which
encloses a portion of the interactions within a sequence diagram.
 A Fragment types: ref, assert, loop, break, alt, opt, neg.

Steps to Draw a Sequence Diagram


1. Identify Actors and Objects:
 Determine the key actors (users, external systems) and objects (components,
modules) involved in the process.
2. Define Lifelines:
 Draw a lifeline for each actor and object, representing their presence over time in
the system.
3. Establish Sequence of Interactions:
 Identify and arrange the interactions (messages) in chronological order, showing how
the actors and objects communicate.
4. Add Message Types:
 Use synchronous and asynchronous messages (with solid or dashed arrows) to
represent communication between lifelines.
5. Include Self-Messages:
 Add self-messages where objects perform actions internally, looping back to their
own lifeline.
6. Specify Activation Bars:
 Represent active periods during which an object is performing an action with
vertical rectangles on the lifeline.
7. Incorporate Conditions and Loops:
 Use alt (alternatives), opt (optional), or loop frames to depict conditional logic or
repeating actions.
8. Add Return Messages:
 Draw dashed arrows to show responses or returned values after the execution of actions.
9. Include Object Destruction (Optional):
 If an object is destroyed during the sequence, represent this with a cross at the end of
its lifeline.
10. Review and Validate:
 Ensure the diagram accurately reflects the sequence of events and interactions within the
system.

Steps to Draw the Sequence Diagram for Food and Beverages Management System
1. Identify Actors:
o Waitstaff: Takes customer orders and processes payments.
o Customer: Places orders or reservations.
o Kitchen Staff: Prepares orders based on input from the system.
o Manager: Manages inventory, menu updates, and generates reports.

2. Identify System Components:


o Order Management System: Handles customer orders and interactions with other
modules.
o Inventory Management System: Tracks inventory and automates
reordering. o Billing System: Generates bills and processes
payments.
o Menu Management System: Manages menu updates and item availability.
o Kitchen Display System: Displays order details to the kitchen.
o CRM System: Manages customer profiles and loyalty programs.
o Database: Stores orders, inventory, customer details, and sales data.
o Reservation System: Handles table reservations and seating arrangements.

3. Choose a Scenario:
o Example: Order Placement and Fulfillment (Waitstaff takes an order, sends it to the
kitchen, and completes the billing process).

4. Draw Lifelines:
o Draw vertical lines for each actor and component (Waitstaff, Kitchen Staff,
Customer, Order Management System, Billing System, Inventory System, Kitchen
Display, Database).

5. Add Messages:
o Waitstaff → Order Management System: "Enter New Order"
o Order Management System → Kitchen Display: "Send Order to Kitchen"
o Order Management System → Database: "Save Order Details"
o Kitchen Display → Kitchen Staff: "Display Order"
o Kitchen Staff → Order Management System: "Mark Order as Complete"
o Order Management System → Billing System: "Generate Bill"
o Billing System → Customer: "Process Payment"
o Billing System → Database: "Store Payment Details"

6. Include Self-Messages:
o If the system does something internally, add a message from the Order Management
System to itself (e.g., checking availability of items in the inventory).

7. Add Condition:
o If there are choices (like item availability or out-of-stock scenarios), use an if/else block.
For example, if an item is out of stock, the system could notify the waitstaff.

8. End of Process:
o Close the lifeline for the Order Management System, Kitchen Display, and Billing System
after the order is fulfilled and payment is processed.
What is Collaboration Diagram?

A Collaboration Diagram is a type of interaction diagram that emphasizes the structural


organization of objects that send and receive messages. Unlike a sequence diagram, which focuses on
the chronological order of events, a collaboration diagram highlights the relationships between
objects and how they work together to achieve a specific task.

Purpose of a Collaboration Diagram



Visualize Object Interactions:
Collaboration diagrams illustrate the communication between objects within
a system, making it easier to see how objects collaborate to accomplish tasks.

Model Relationships:
By showing the relationships between objects, collaboration diagrams help model
the structure of the system's dynamic behavior.

Clarify Object Responsibilities:
These diagrams help in understanding which objects are responsible for specific
actions and how they interact with others to complete a process.

Support Design and Communication:
Collaboration diagrams are useful tools for developers and designers to
understand and document system behavior, supporting communication across teams.

Notations in a Collaboration Diagram:

1. Objects:
Objects in a collaboration diagram are depicted as rectangles and represent the
entities that interact in the system. For the SecureShe application, these are:

User:
The individual who initiates an emergency SOS, logs in, and uses the app.

SecureShe App:
The main application that processes user actions, manages location data, and
communicates with other services.

Emergency Contacts:
The contacts that receive SOS alerts and location updates.

Location Services:
Provides real-time user location information.

SMS Services:
Handles sending SMS alerts asynchronously.

Database:
Stores logs of SOS events, credentials, and location history.

2. Links:
Links are the connections between objects, shown as solid lines, representing the ability of
objects to communicate. In this diagram, links between User, SecureShe App, Emergency
Contacts, Location Services, and SMS Services are depicted, reflecting how they interact during
an emergency.
3. Messages:
Messages are labeled arrows showing the flow of communication between objects.
Each message is numbered to indicate the sequence of interactions in the system, such as
sending an SOS, retrieving location, or logging an event.

4. Return Messages
Return messages represent the return value of a message. They are shown as
dashed arrows with a label indicating the return value. Return messages are used to indicate
that a message has been processed and a response is being sent back to the calling object.
5. Self Message
This is a message that an object sends to itself. It represents an action or behavior that
the object performs internally without involving any other objects. Self-messages are useful for
modeling scenarios where an object triggers its own methods or processes.

Steps to Draw a Collaboration Diagram

Identify Key Objects:


Determine the primary objects involved in the process.

Draw Links Between Objects:


Show the relationships between the objects that allow communication.

Establish Sequence of Interactions:


Indicate the messages being passed between objects, labeling the arrows with message
names and numbering them to reflect the order of interactions.

Ensure Proper Object Placement:


Arrange objects to clearly show their relationships and the flow of messages.
Steps to Draw the Collaboration Diagram for Food and Beverages
Management System

1. Identify Key Objects:


The collaboration diagram involves the following objects:
o Waitstaff
o Customer
o Order Management System
o Kitchen Display System
o Billing System
o Inventory Management System
o CRM System
o Database

2. Establish Relationships:
Relationships are represented by links showing the communication between objects. The
Waitstaff interacts with the Order Management System, which communicates with the
Kitchen Display System, Billing System, and Inventory Management System. The Database
stores order, billing, and inventory data.

3. Sequence of Interactions:
The collaboration diagram illustrates several key message exchanges, with each message
numbered to indicate its place in the sequence. Below is a detailed description of the interaction
sequence:

1. Order Placement:

o Message 1: The Customer places an order via Waitstaff.


o Message 2: The Waitstaff enters the order into the Order Management System.
o Message 3: The Order Management System sends the order details to the Kitchen
Display System.
o Message 4: The Kitchen Display System acknowledges receipt of the order and
begins preparation.

2. Inventory Check:

o Message 5: The Order Management System checks the item availability with the
Inventory Management System.
o Message 6: The Inventory Management System returns the stock status to the Order
Management System.
3. Bill Generation:

o Message 7: After order completion, the Waitstaff requests the bill generation from
the Billing System.
o Message 8: The Billing System generates an itemized bill based on the order and sends it
to the Waitstaff.
o Message 9: The Billing System stores the payment details in the Database.

4. CRM Update (Optional):

o Message 10: If the Customer is part of a loyalty program, the Order Management
System updates the CRM System with order history.
o Message 11: The CRM System stores loyalty points and updates the Database.

5. Order Fulfillment:

o Message 12: The Kitchen Display System informs the Waitstaff when the order is ready.
o Message 13: The Waitstaff serves the order to the Customer.
4. Arrange Object Placement:
In the collaboration diagram, objects are placed logically to show clear relationships. The
Customer, Waitstaff, Order Management System, Kitchen Display System, Billing
System, and Inventory Management System are positioned to reflect the flow of interactions.

5. Numbering the Messages:


The messages are numbered sequentially, from the Customer placing the order (Message 1) to the
Waitstaff serving the order (Message 13), reflecting the complete interaction. Key points include:
o Message 5: Checking item availability in the Inventory Management System.
o Message 7: Requesting bill generation from the Billing System.
o Message 12: Notifying the Waitstaff when the order is ready.
Description Marks Allotted Marks Obtained

Preparation 20

Design / 20
Implementation
Viva 15

Output 10

Record 10

Total 75

Result:
The sequence and collaboration diagrams for the Food and Beverages Management
System (FBMS) were successfully designed and modeled. These diagrams effectively illustrate the
interaction between various entities such as the Customer, Waitstaff, Order Management
System, Kitchen Display System, Billing System, Inventory Management System, and
Database during the order placement and fulfillment process.
EXP.NO:
ACTIVITY DIAGRAM AND STATE DIAGRAM FOR
27/9/2024 FOOD AND BEVERAGES MANAGEMENT SYSTEM

AIM:

To create activity diagram and state diagram for Food and Beverages Management
System.

DESCRIPTION:

ACTIVITY DIAGRAM:

An Activity Diagram is a graphical representation of a workflow or business process,


showing the sequence of activities, decisions, and actions.

PURPOSE:

p Process Modeling: To visualize and document complex workflows, business processes, or


system functionality.

q Communication: To facilitate understanding among stakeholders, developers, and users.

r Analysis: To identify inefficiencies, bottlenecks, and potential problems.

4. Design: To plan and design new processes or systems.

p Documentation: To provide a permanent record of the process or system.

q Improvement: To identify opportunities for improvement and optimization.

r Simulation: To simulate and test different scenarios.

s Verification: To verify the correctness of the process or system.

NOTATION:

Activity: Represent individual activity of system.

Transition: Represents flow of data from one activity to another.

Decision: Decision node is a control node that accepts tokens on one or more
incoming edges and selects outgoing edge from two or more outgoing flows. The
notation for a decision node is a diamond-shaped symbol.
Initial activity: Initial node is a control node at which flow starts when the activity is
invoked. Activity may have more than one initial node. Initial nodes are shown as a
small solid circle.

Final activity: Final node is a control final node that stops all flows in an activity.
Activity final nodes are shown as a solid circle with a hollow circle inside. It can be
thought of as a goal notated as "bull’s eye," or target.

Fork: A fork in the activity diagram has a single incoming transition and multiple
outgoing transitions exhibiting parallel behavior.The incoming transition triggers the
parallel outgoing transitions.

Join: A join in the activity diagram synchronizes the parallel behavior started at a
fork. Join ascertains that all the parallel sets of activities (irrespective of the order) are
completed before the next activity starts. It is a synchronization point in the diagram.
Each fork in an activity diagram has a join where the parallel behavior terminates.

STEPS TO DRAW:
Here are the steps to draw an Activity Diagram

Step 1: Identify the Process

1. Define the process or system to be modeled.


Determine the scope and boundaries.

p Gather requirements and information.

Step 2: Determine the Level of Detail

Decide on the level of abstraction.

2. Choose the granularity of activities.

Step 3: Identify Activities

p Break down the process into individual activities.

q Identify the actions, tasks, or functions.

r Use verbs to describe activities (e.g., "Login," "Place Order").

Step 4: Determine Activity Types

Identify:

oInitial activity (start)

pFinal activity (end)

qDecision activities

r Merge activities

s Fork activities

Step 5: Draw Activities

Use rectangles with rounded corners.

Label each activity with a brief description.

Step 6: Draw Transitions

Use arrows to connect activities.

Show the flow of control.

Step 7: Add Decisions

Use diamonds to represent decisions.

Label decision outcomes.


Step 8: Add Guards

Use brackets to represent guards.

Specify conditions for transitions.

Step 9: Add Merge and Fork

Use converging and diverging arrows.

Show parallel processing.

Step 10: Review and Refine

Check for consistency.

Ensure clarity.

Validate against requirements.

Activity Diagram for Food and Beverages Management System (FBMS):


Initial Node: Customer Places an Order

Activity 1: Order Entry

Waitstaff accepts the customer’s order


Input order into the system
Customize order (special requests, modifications)

Decision 1: Is Order Complete?

Yes: Proceed to Send Order to Kitchen


No: Request Additional Information from Customer

Activity 2: Send Order to Kitchen

Order is sent to the Kitchen Display System


Order is prioritized based on preparation time

Activity 3: Inventory Check

 The system checks item availability in the Inventory Management System


 Updates stock levels based on the order

Decision 2: Is Item Available?

 Yes: Proceed to Preparation


 No: Notify Waitstaff to inform the customer
Activity 4: Order Preparation

 Kitchen staff prepares the order


 Updates the system when the order is ready

Activity 5: Billing Process

 Waitstaff generates the bill using the Billing System


 Customer makes payment (cash, card, or mobile payment)
 Payment status is updated

Activity 6: Serve Order

 Waitstaff serves the order to the customer


 Update order status as completed

Activity 7: Update CRM

 Update customer data (loyalty points, order history) in the CRM System

Final Node: Order Completed and Payment Processed

ACTIVITY DIAGRAM
STATE DIAGRAM

A state diagram is a graph in which nodes correspond to states and directed arcs correspond
to transitions labeled with event names. A state diagram combines states and events in the
form of a network to model all possible object states during its life cycle, helping to visualize
how an object responds to different stimuli.A state diagram is a graph whose nodes are states
and whose directed arcs are transitions between states.

PURPOSE

The state model describes those aspects of objects concerned with time and the
sequencing of operations events that mark changes, states that define the context for
events, and the organization of events and states.

They are used to give an abstract description of the behavior of a system.

It provides direction and guidance to the individual counties within the states.

It specifies the possible states, what transitions are allowed between states.

It describes the common behavior for the objects in a class and each object changes its
behavior from one state to another.

It is used to describe the dependence of the functionality on the state of the system
that is how the functionality of an object depends on its state and how its state
changes as a result of the events that it receives.

It describes dynamic behavior of the objects of the system.

NOTATION

State: A state is an abstraction of the values and links of an object. State models a
situation during which some (usually implicit) invariant condition holds.

Transition: A transition is a directed relationship between a source state and a


target state. It may be part of a compound transition, which takes the state machine
from one state configuration to another.

Event: A transition is an instantaneous change from one to another state.


Change Event: A change in value of a Boolean expression .

Time Event: The arrival of an absolute time or the passage of a relative amount of
time.

Guarded transition: A guard condition is a Boolean expression that must be true


in order for a transition to occur.

Do activity: A do activity an activity that continuous for extended time within state.

Entry activity: An state is entered by any incoming transition the entry activity is
performed.

Exit activity: When the state is exited by any outgoing transition the exit activity is
performed.

Sub machine: A submachine state specifies the insertion of the specification of a


submachine. The state machine that contains the submachine state is called the
containing state machine.
Activity: An activity is actual behavior that can be invoked by any number of
effects.

Initial state: It shows the starting state of object.

Final state: It shows the terminating state of object.

STEPS TO DRAW STATE DIAGRAM:

Step 1: Define the System

Identify the system or process to be modeled.

Determine the system's purpose and scope.

Step 2: Identify States

Determine the possible states the system can be in.

Use verbs or verb phrases to describe each state (e.g., "Idle", "Running").

Step 3: Identify Transitions

Determine the events or conditions that trigger state changes.

Use arrows to represent transitions between states.

Label each transition with the event or condition.

Step 4: Define Transition Conditions

Specify any conditions or guards that must be true for a transition to occur.

Use square brackets [] to represent guards.

Step 5: Define Actions

1. Specify any actions or activities performed during transitions.


2. Use slash (/) to separate actions from transition labels.

Step 6: Draw the Diagram

p Use a graphical editor or drawing tool.

q Draw rectangles with rounded corners for states.

r Draw arrows for transitions.

p Label states and transitions.

STATE DIAGRAM FOR FOOD AND BEVERAGES MANAGEMENT


SYSTEM (FBMS)

Step 1: Identify States

Determine the possible states of the Food and Beverages Management System.
List the states:

 Order Received
 Order Verification
 Payment Processing
 Order Preparation
 Quality Check
 Order Dispatch
 Order Delivered
 Order Rejected
 Order Cancelled

Step 2: Identify Transitions

Determine the events or conditions that trigger state changes.


List the transitions:

 Order Received -> Order Verification [Order Complete]


 Order Verification -> Payment Processing [Verification Successful]
 Payment Processing -> Order Preparation [Payment Received]
 Order Preparation -> Quality Check [Order Prepared]
 Quality Check -> Order Dispatch [Order Approved]
 Order Dispatch -> Order Delivered [Order Dispatched]
 Order Verification -> Order Rejected [Verification Failed]
 Payment Processing -> Order Cancelled [Payment Failed]

Step 3: Determine Transition Conditions (Guards)

p Specify conditions that must be true for transitions to occur.


q Use square brackets to represent guards:

 [Order Complete]
 [Verification Successful]
 [Payment Received]
 [Order Prepared]
 [Order Approved]
 [Order Dispatched]
 [Verification Failed]
 [Payment Failed]

Step 4: Draw States

p Use a graphical editor or drawing tool to create the diagram.


q Draw rectangles with rounded corners for states.
r Label each state:
Order Received
p Order Verification
o Payment Processing
o Order Preparation o
Quality Check
o Order Dispatch o
Order Delivered o
Order Rejected o
Order Cancelled

Step 5: Draw Transitions

Draw arrows to represent transitions.


Label each transition with the event or condition.

 Example: Order Received -> Order Verification [Order Complete]

Step 6: Add Guards


Add guards to transitions.
Use square brackets to show the conditions required for transitions.

 Example: [Verification Successful]

Step 7: Add Initial and Final States

Draw a solid circle to represent the initial state (Order Received).


Draw a hollow circle to represent the final state (Order Delivered or Order Cancelled)
Description Allotted marks Obtained marks
Preparation 20
Design/Implementation 20
Viva 15
Output 10
Record 10

RESULT:
Thus the activity diagram and state diagram for Food and Beverages Management System
is successfully implemented.
EXP. NO: 7
Implementation of Food And Beverages Management System

Aim:
To implement a restaurant management system with Firebase backend,
ensuring features like dynamic menu browsing, order management,
reservations, and customer relationship management.

System Requirements for Elegant Eats:


1. Hardware

Requirements Server

(Firebase):

Firebase Cloud Services for hosting and data storage (no dedicated hardware required).

Client Machines:
Processor: Dual-Core or higher (Intel i3/i5
equivalent). RAM: Minimum 2 GB.
Storage: 500 MB free disk space.
Network: Reliable internet
connection.

2. Software

Requirements

Operating System:

Backend: Firebase (cloud-hosted).


Frontend Development: Windows, macOS, or
Linux. Web Browsers:
Google Chrome (Recommended), Mozilla Firefox, Safari, or Microsoft Edge.
Technology Stack:
Frontend:
HTML5, CSS3, JavaScript.
Bootstrap for responsive
design. Backend:
Firebase Realtime
Database/Firestore. Firebase
Authentication.
Firebase Hosting.
Cloud Functions for server-side
logic. Testing Tools:
Jest

3. Technical

Architecture
Frontend (Client-
Side):
Developed with HTML, CSS, JavaScript,
and Bootstrap. Responsive interface for
customer interactions. Backend
(Server-Side): Firebase Authentication
for secure login/registration. Firestore
for storing menu,
order, and reservation data. Cloud
Functions for order processing and
analytics. Database: Firebase Firestore for
real-time database operations.

Database Design
Users Collection:
Fields: id, name, email, role.
Menu Collection:
Fields: id, name, category, price, availability.
Orders Collection:
Fields: id, user_id, items, total_price, status.
Reservations Collection:
Fields: id, user_id, date, time, party_size.

System Workflow

User Authentication:
Secure login and registration using Firebase.

Dynamic Menu
Management: Admins
manage the menu.
Users browse categories and place orders.
Order Processing:
Users add items to cart and confirm
orders. Cloud Functions manage backend
processing.

Reservations:
Customers book tables with date, time, and party size.

Feedback and CRM:


Customers leave feedback, stored in Firestore for admin review.

Frontend Implementation
1. Home Page (index.html)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,
initial- scale=1.0"> <title>ELEGANT EATS
RESTAURANT</title> <link rel="stylesheet" href="style.css">
</head>
<body>
<!-- Hero Section -->
<section class="hero">
<h1>Welcome to Elegant Eats</h1>
<p>Delicious food, outstanding service!</p>
</section>

<section id="menu" class="menu">


<h2>Our Mesmerizing Menu</h2>
<!-- Category Selection -->
<div class="category-select">
<label for="category">Select Category:</label>

<select id="category" onchange="filterMenu()">

<option value="all">All</option>
<option value="pizza">Pizza</option>
<option value="sandwiches">Sandwiches</option>

<option value="chicken">Chicken</option>

<option value

="Beverages">Beverages</option>

</select>
</div>

2. Menu Page
Description: Displays dynamic menu
categories. Key Features:
Users can filter menu items by categories (e.g., Pizza, Beverages).

Option to add items to the order.


<section id="menu" class="menu">
<h2>Our Menu</h2>
<div class="category-select">
<label for="category">Select Category:</label>

<select id="category" onchange="filterMenu()">

<option value="all">All</option>
<option value="pizza">Pizza</option>
<option value="beverages">Beverages</option>
</select>
</div>
<div class="menu-grid">

<!-- Dynamic items -->


<div class="menu-item" data-category="pizza">

<h3>Cheese Pizza</h3>

<button onclick="addToOrder('Cheese
Pizza', 179)">Order</button> </div>
</div>
</section>

3. Order Management
Description: Allows users to manage their
orders. Key Features:
View order summary.
Finalize orders and proceed to billing.
<section id="order-summary">
<h3>Your Order</h3>
<p>Total Items: <span

id="total-items">0</span></p> <p>Total Price: Rs

<span id="total-price">0.00</span></p> <button

onclick="finalizeOrder()">Finalize Order</button>

</section>

4. Reservation Page (reservation.html)


Description: Customers reserve tables by filling
a form. Key Features:
Date and time selection.
Party size input.
<form id="reservation-form">
<label>Date:</label>
<input type="date" required>
<label>Time:</label>
<input type="time" required>
<label>Party Size:</label>
<input type="number" required>
</form>

5. Customer Feedback
Description: Collects feedback from customers for
CRM. Key Features:
Submit feedback via a form.
<form id="feedback-form">
<label>Your Feedback:</label>
<textarea required></textarea>
<button type="submit">Submit</button>
</form>

Our Project Webpage Link:

https://dafniagnanashelli.github.io/elegant-eats/

The website Elegant Eats is a beautifully designed platform that provides an


immersive experience for food enthusiasts. It features a sophisticated layout with rich
visuals, offering users a glimpse into fine dining options. The main highlights of the
website include:

Homepage: Welcoming visitors with stunning food photography and


elegant typography, creating a luxurious vibe.
Menu Section: Displays an extensive list of dishes, categorized for easy navigation. It
likely includes mouth-watering descriptions and prices to guide customers.
Reservation Feature: A dedicated section where users can book tables
seamlessly, catering to those who value convenience.
Contact Information: Includes an accessible way for visitors to connect with
the restaurant, such as location details, phone numbers, and email.
Responsive Design: Optimized for both desktop and mobile devices,
ensuring a smooth experience for all users.
Homepage:

Welcoming visitors with stunning food photography and elegant


typography, creating a luxurious vibe.

Menu Section:

Displays an extensive list of dishes, categorized for easy navigation. It likely


includes mouth-watering descriptions and prices to guide Customers
Reservation Feature:

A dedicated section where users can book tables seamlessly, catering to


those who value convenience.

Contact Information:
Includes an accessible way for visitors to connect with the restaurant, such as
location details, phone numbers, and email.

Report Analysis:
Includes the report analysis for the day which displays all the information
about the orders and the billing details
Staff Management:
Includes an accessible way for customers to connect with the staffs , it
displays all the staffs who are working in the restaurant .
Description Marks Allotted Marks Obtained

Preparation 20

Design / 20
Implementation
Viva 15

Output 10

Record 10

Total 75

Result:
Thus the implementation of a restaurant management system with Firebase
backend, ensuring features like dynamic menu browsing, order management,
reservations, and customer relationship management.
EX.NO: IMPROVING THE MODIFIED SYSTEM AND TESTING
IN VARIOUS SCENARIOS

AIM:
To enhance the Food and Beverages Management System by adding a Customer Relationship
Management (CRM) module and an updated Navbar for seamless navigation.

MODIFICATIONS:
1. CRM Module:
The CRM module allows customers to provide feedback and ratings. It includes:
A form for entering customer name, rating (out of 5), and detailed feedback.
Submission of feedback to improve service quality.
2. Updated Navbar:
The navigation bar now includes:
Links for various modules such as Menu, Order, Reservation, Billing, CRM, Analytics,
Staffs, and Contact Us.
Enhanced accessibility for better user experience.

IMPLEMENTATION:
CRM Section
<section id="crm">
<h2>Customer Relationship Management
(CRM)</h2> <form id="feedback-form">
<label for="name">Your Name:</label>
<input type="text" id="name" required>
<label for="rating">Your Rating:</label>
<input type="number" id="rating" max="5" required>
<label for="feedback">Your Feedback:</label>
<textarea id="feedback" required></textarea>

<center><button type="submit">Submit
Feedback</button></center> </form>
</section>
Updated Navbar
<nav class="navbar">
<div class="logo">ELEGANT EATS</div>
<ul class="nav-links">
<li><a href="#menu">Menu</a></li>
<li><a href="#order-management">Order</a></li>
<li><a href="#reservation">Reservation</a></li>
<li><a href="#billing">Billing</a></li> <li><a
href="#crm">CRM</a></li>
<li><a href="#analytics">Analytics</a></li>
<li><a href="#staffs">Staffs</a></li>
<li><a href="#contact-us">Contact Us</a></li>
</ul>
</nav>

JavaScript for Feedback Submission


document.getElementById('feedback-form').addEventListener('submit', function(event)
{ event.preventDefault();

const name = document.getElementById('name').value;


const rating = document.getElementById('rating').value;
const feedback = document.getElementById('feedback').value;

if (name && rating && feedback) {


alert("Feedback submitted successfully!\nThank you, " + name + ".");
document.getElementById('feedback-form').reset();
} else {
alert("Please fill in all fields before submitting.");
}
});
TESTING SCENARIOS:
CRM Section:
Scenario 1: Valid Feedback Submission
Test Steps:
Navigate to the CRM section.
Enter a valid name, rating (1-5), and feedback.
Submit the form.
Expected Behavior:
Feedback is accepted, and a success message is displayed.
The form is reset after successful submission.

Scenario 2: Invalid Feedback Submission


Test Steps:
Navigate to the CRM section.
Leave one or more fields empty.
Submit the form.
Expected Behavior:
The system displays an alert asking the user to fill in all fields.

Updated Navbar:
Scenario 1: Navigation to Modules
Test Steps:
Click on each link in the navbar.
Verify that the page scrolls to the corresponding section.
Expected Behavior:
Each link smoothly navigates to the correct section.
Scenario 2: Broken or Incorrect Links
Test Steps:
Inspect the navbar and check all links.
Verify the href attribute for correctness.
Expected Behavior:
All links should lead to the intended sections without errors.

TESTING CODE:
CRM Form Validation Tests
function testValidFeedbackSubmission() { document.getElementById('name').value =

"John Doe"; document.getElementById('rating').value = 5;

document.getElementById('feedback').value = "Great food and service!";

document.getElementById('feedback-form').dispatchEvent(new Event('submit'));

console.assert(alert.mock.calls[0][0] === "Feedback submitted successfully!\nThank


you, John Doe.", "Success message failed.");
console.assert(document.getElementById('feedback-form').reset.called, "Form reset
failed.");
}

function testInvalidFeedbackSubmission() { document.getElementById('name').value

= ""; document.getElementById('rating').value = 3;

document.getElementById('feedback').value = "";

document.getElementById('feedback-form').dispatchEvent(new Event('submit'));

console.assert(alert.mock.calls[0][0] === "Please fill in all fields before submitting.",


"Error message failed.");
}
Navbar Tests
Link Navigation Validation
document.querySelectorAll('.nav-links a').forEach(link =>
{ console.assert(link.getAttribute('href').startsWith('#'), "Navbar link is broken.");
});

OBSERVATIONS:
CRM Module:
Feedback form works as expected for valid and invalid submissions.
Alerts and form reset functionality are correctly implemented.

Updated Navbar:
Navigation links smoothly scroll to their respective sections.
All links are functional and correctly mapped.

OUTPUT:
1. CODE IMPLEMENTATION:
CRM Section:

Navigation Section:
2. UI:
CRM section:

Navigation Section:
Description Allotted Marks Obtained Marks

Preparation 20

Design/Implementation 20
Viva 15
Output 10
Record 10
Total 75

RESULT:
Thus, the CRM Module and Updated Navbar were successfully implemented and tested for
various scenario.
Ex no:11
Date: Implement TDD rules (Red, Green, Refactor) to
develop a typical model code using Ruby on Rails
framework

Aim:
To implement Test-Driven Development (TDD) principles (Red, Green, Refactor) to
develop a Ruby on Rails model for calculating the volume of a cylinder.

Introduction:
This report demonstrates the implementation of the Test-Driven Development (TDD) cycle—
Red, Green, Refactor—using the Ruby on Rails framework. TDD is a software development
process that relies on the repetition of a short development cycle, where requirements are
converted into specific test cases before the software is improved to pass the tests.

TDD Steps:
1. Red: Write a failing test to define the desired functionality.
2. Green: Write the minimal amount of code to make the test pass.
3. Refactor: Improve the code without changing its external behavior.

In this experiment, a Cylinder model is created to calculate the volume of a cylinder given
its radius and height.

Framework:
RSpec:

RSpec is a popular testing framework for Ruby. It provides a domain-specific


language (DSL) to write test cases in a readable format.

Features of RSpec:
1. Readable Syntax: Tests are written in plain English using describe, it, and
expect blocks.

2. Flexible Matchers: Matchers like eq, be_valid, and raise_error allow for
comprehensive testing.
3. Setup and Teardown: Hooks like before and after help manage test contexts.

4. Output Clarity: Failing tests are clearly reported, showing the test expectation and
the actual result.
Implementation:
Red (Write failing tests):

Create the test file spec/models/cylinder_spec.rb to define the required


functionality. ruby
require 'rails_helper'
RSpec.describe Cylinder, type: :model do
describe '#volume' do

it 'calculates the volume of a cylinder given radius and height' do

cylinder = Cylinder.new(radius: 3, height: 5)

expect(cylinder.volume).to eq(141.37) # Expected value is π * r² * h

end

it 'raises an error if radius or height is negative' do

expect { Cylinder.new(radius: -3, height: 5).volume }.to


raise_error(ArgumentError) end
end
end

Run the test suite:


bundle exec rspec
Output:
vbnet

Failures:
1) Cylinder calculates the volume of a cylinder given radius and height
2) Cylinder raises an error if radius or height is negative
The tests fail because the Cylinder model and volume method are not yet implemented.

Green (Write minimal code to pass the test)


Create the Cylinder model in app/models/cylinder.rb:
ruby
class Cylinder
attr_accessor :radius, :height

def initialize(radius:, height:)


raise ArgumentError, 'Radius and height must be positive' if radius < 0 || height < 0

@radius = radius
@height = height
end

def volume:
(Math::PI * radius**2 * height).round(2)
end
end
Run the tests again:

bundle exec rspec


Output:
Finished in X seconds
2 examples, 0 failures
The tests pass successfully.

Refactor (Improve the code):


Improve the code for readability and maintainability:
1. Refactor Error Handling: Move validation logic into a separate method.

2. Enhance Clarity: Add documentation for methods.


Updated Cylinder model:
ruby

class Cylinder
attr_accessor :radius, :height

def initialize(radius:, height:)


validate_inputs(radius, height)
@radius = radius

@height = height
end

# Calculates the volume of the cylinder


def volume

(Math::PI * radius**2 * height).round(2)


end

private

def validate_inputs(radius, height)

raise ArgumentError, 'Radius and height must be positive' if radius < 0 || height <
0 end
end
Run the tests once more:

bundle exec rspec


Output:
Finished in X seconds
2 examples, 0 failures

The tests continue to pass, confirming that the code refactor is successful without altering
functionality.

Detailed Explanation of Test Cases:


1. Volume Calculation Test:

o Objective: To validate that the volume method correctly calculates the


volume using the formula π×r2×h\pi \times r^2 \times hπ×r2×h.

o Assertions: Verify the returned value matches the expected result up to


two decimal places.
2. Negative Inputs Test:

o Objective: To ensure the model raises an error when radius or height


is negative.
o Assertions: Check that an ArgumentError is raised.

Output:
The Cylinder model successfully calculates the volume of a cylinder, and all test cases pass.

Finished in X seconds
2 examples, 0 failures
SPLIT UP:

Description Alloted Marks Obtained Marks

Preparation 20

Design/Implementation 20

Viva 15

Output 10

Record 10

Total 75

Result:
The application successfully demonstrates the implementation of TDD (Red, Green,
Refactor) to develop a Ruby on Rails model for calculating the volume of a cylinder.
EX.NO.:12
ENHANCING CUSTOMER EXPERIENCE USING
RETAIL DOMAIN DEEP DIVE

Aim:
To implement Inventory Management Optimization and enhance customer experience for
a fictional retail store using a retail domain deep dive.

Domain Deep Dive:


A Domain Deep Dive involves a comprehensive exploration and analysis of the retail
domain to understand inventory challenges, opportunities, and workflows. This ensures
solutions are tailored to optimize inventory management processes effectively.

Key Objectives:
• Ensure accurate stock tracking and real-time visibility.

• Minimize overstocking and stockouts.

• Improve demand forecasting and inventory turnover.

Benefits:
• Reduced operational costs through efficient stock management.

• Improved order fulfillment rates and customer satisfaction.

• Data-driven decision-making to handle seasonal demand and trends.

Installation Steps for Inventory Management Optimization :


To implement inventory management optimization, follow these steps using specific
tools and frameworks:
Step 1: Install Inventory Tracking Tools

• Tools like Zoho Inventory, Fishbowl, or Odoo for centralized inventory


management. o Odoo Installation:

1. Install Odoo: sudo apt-get install odoo

2. Configure product categories, warehouses, and suppliers.

3. Enable barcode or RFID tracking.


Step 2: Setup Real-Time Monitoring

• Implement barcode or RFID systems for stock movement


tracking. o Use scanners integrated with the inventory
system.

o Train warehouse staff to use scanning devices for stock-in and stock-
out updates.

Step 3: Configure Demand Forecasting Models

• Use ML models or built-in forecasting tools.


o Install TensorFlow for demand prediction: pip install tensorflow.
o Train models with historical sales data to predict trends.

Step 4: Integrate With Existing Systems

• Connect the inventory system to POS, ERP, and e-commerce platforms for real-
time updates.
o Integration with Shopify:

▪ Use Shopify API to synchronize inventory levels and sales.

Step 5: Automate Reordering

• Set reorder thresholds and automate purchase orders.


o Configure safety stock levels in the inventory management system.

Module Taken for Implementation: Real-Time Inventory Monitoring :


Objective of the Module:

The Real-Time Inventory Monitoring Module ensures that inventory levels are
accurately updated with every transaction, preventing discrepancies and enabling quick
decision-making.

Features of the Real-Time Inventory Monitoring Module:

1. Barcode Scanning: Automatically update stock levels during sales and restocking.

2. Real-Time Alerts: Notifications for low stock or overstocked items.

3. Demand-Based Reordering: Automated reordering based on sales trends.

4. Centralized Dashboard: Provides visibility across multiple warehouses or stores.


Code Implementation:
1. Database Setup:

• Add fields for quantity and reorder_threshold in the products table.

rails generate migration AddInventoryFieldsToProducts


quantity:integer reorder_threshold:integer

rails db:migrate

2. Model Modifications:

Update the Product model to manage inventory logic.


PROGRAM:

class Product < ApplicationRecord


def check_reorder
if quantity < reorder_threshold
reorder_stock
end
end
private

def reorder_stock

# Logic to generate purchase order

puts "Reorder triggered for #{name}"

end
end

3. Controller Logic:

a. Updating Inventory After Sales:


• Deduct stock levels automatically after a sale.

PROGRAM:

class SalesController < ApplicationController


def create
@sale = Sale.new(sale_params)
if @sale.save
product = Product.find(@sale.product_id)
product.quantity -= @sale.quantity
product.save
product.check_reorder
redirect_to sales_path, notice: "Sale recorded and inventory updated."

else

render :new, alert: "Failed to record sale."


end
end
end
b. Restocking Inventory:

• Update stock levels after new stock arrives.


PROGRAM:

class InventoryController <


ApplicationController def restock

product = Product.find(params[:product_id])
product.quantity += params[:quantity].to_i
product.save
redirect_to inventory_path, notice: "Stock updated successfully."
end
end

4. Frontend Integration:

a. Inventory Dashboard:

• Display current stock levels and low-stock alerts.

PROGRAM:
<h2>Inventory Dashboard</h2>

<table>

<tr>
<th>Product</th>

<th>Quantity</th>

<th>Reorder Threshold</th>

</tr>
<% @products.each do |product| %>

<tr>

<td><%= product.name %></td>

<td><%= product.quantity %></td>

<td><%= product.reorder_threshold %></td>

</tr>

<% end %>


</table>
b. Restock Form:

p Allow manual restocking.

PROGRAM:

<%= form_with url: restock_inventory_path, method: :post do |form| %>

<%= form.text_field :product_id, placeholder: "Product ID"


%> <%= form.number_field :quantity, placeholder: "Quantity"
%> <%= form.submit "Restock" %>
<% end %>

5. Testing the Module:

Red Stage: Write test cases for missing functionalities.

PROGRAM:

require "test_helper"

class InventoryManagementTest < ActiveSupport::TestCase

test "should deduct inventory after sale" do

product = products(:one)
sale = Sale.create(product: product, quantity: 5)
assert_equal product.quantity, product.quantity -
5 end

test "should trigger reorder when quantity low" do


product = products(:one)
product.update(quantity: 2, reorder_threshold: 5)
assert_output(/Reorder triggered for/) { product.check_reorder }

end
end

Green Stage: Implement functionality and ensure tests pass.


Refactor Stage: Optimize code for readability and performance.

SPLIT UP:

Description Allotted Marks Obtained Marks

Preparation 20

Design/Implementation 20
Viva 15
Output 10
Record 10
Total 75

RESULT:

Thus, the implementation of Inventory Management Optimization using a retail domain


deep dive has been successfully completed.

You might also like