PTTKHT
PTTKHT
IT3120E
SCHOOL OF INFORMATION AND COMMUNICATION TECHNOLOGY
CYBER SECURITY K67 SYSTEM ANALYSIS AND
DESIGN
MEMBER LIST
Nguyen Thanh An 20225541 [email protected]
Pham Tuan Anh 20225542 [email protected]
Le Tien Dat 20225543 [email protected]
Pham Doan Phuc Lam 20225546 [email protected]
Pham Hong Quan 20225551 [email protected]
Le Hai Nhat 20225583 [email protected]
Lecturer: Nguyen Duc Anh, PhD
Hà Nội — 2024
CONTENTS
C ONTENTS
1 Introduction 5
2 Stage 1 - Planning 6
2.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2 Initial System Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2.1 Business need . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2.2 Business requirement . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2.3 Business values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.3 Feasibility Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.3.1 Technical feasibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.3.2 Economic feasibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.3.3 Organizational feasibility . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.4 Project Plan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.4.1 Methodologies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.4.2 Estimate project scope (size) and time . . . . . . . . . . . . . . . . . . . 9
2.4.3 Staffing plan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.4.4 Case tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3 Stage 2 - Analysis 11
3.1 Functional Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2 Non-Functional Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.3 Use Case Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.4 Activity Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.5 Sequence Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4 Stage 3: Design 32
4.1 Design Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.1.1 View (Front-end) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.1.2 Controller (Back-end) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.1.3 Model (Back-end) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.2 Detailed Package Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
5 Stage 4: Implementation 47
6 Conclusion 51
L IST OF F IGURES
1 Use Case Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2 Manage Recipe Activity Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3 Manage Restaurant Activity Diagram . . . . . . . . . . . . . . . . . . . . . . . 21
4 Manage User Activity Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
5 Login Sequence Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
6 Register Sequence Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
7 Manage Recipe Sequence Diagram . . . . . . . . . . . . . . . . . . . . . . . . . 24
8 Manage Restaurant Sequence Diagram . . . . . . . . . . . . . . . . . . . . . . . 25
9 Manage User Sequence Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . 26
10 Search Recipe Sequence Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . 27
11 Search Restaurant Sequence Diagram . . . . . . . . . . . . . . . . . . . . . . . 29
12 Request Handle Sequence Diagram . . . . . . . . . . . . . . . . . . . . . . . . . 31
13 View and Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
14 Model package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
15 User class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
16 RestaurantOwner class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
17 Admin class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
18 Recipe class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
19 Restaurant class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
20 Assessment class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
21 UserDao class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
22 RecipeDao class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
23 RestaurantDao class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
24 AssessmentDao class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
25 RecipeAssessment class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
26 RestaurantAssessment class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
27 AppDb class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
28 Login . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
29 Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
30 Dashboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
31 Recipe details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
2.1 Motivation
Cook Handbook project is an interactive and community-driven platform that fills a gap in
the current market of cooking resources. Unlike traditional recipe app, the project focuses
not only on providing users with access to recipes but also on encouraging them to share
their personal culinary experiences, experiments, and specialty dishes. This project is ex-
citing because it combines the creativity of food enthusiasts with the power of technology,
fostering a sense of community around a shared love for cooking. The concept of users con-
tributing their own content, engaging in cooking experiments, and sharing unique dishes
offers a level of interaction that other platforms lack. This level of innovation aligns with
current trends in social media and user-generated content, making it a forward-thinking
project that has the potential to stand out.
The decision to pursue the Cook Handbook project is also driven by its alignment with
broader business strategies focused on customer engagement and brand loyalty. In an in-
creasingly digital world, creating a platform that allows users to connect over food provides
an opportunity to tap into a large and passionate audience. This project supports the busi-
ness by creating a space where users can engage with the brand, interact with one another,
and potentially drive traffic through features like user-generated content and cooking ex-
periments. Moreover, the platform offers multiple monetization possibilities, such as adver-
tising, premium subscriptions, or partnerships with food brands and restaurants, making it
not only a community-building tool but also a revenue-generating initiative.
There are many notable websites and apps contributing to cooking platforms, most notable
Yummly - providing personalized recipe recommendations based on user preferences and
dietary restrictions with AI assistant or Tasty – video centric platform that simplifies cook-
ing by offering short, visually appealing recipe tutorials. However, most of them lack of is
a collaborative and interactive experience between users or experiment and innovate cook-
ings. Therefore, selecting the Cook Handbook project is a strategic choice that combines
innovation, customer engagement, and business growth potential in one cohesive platform.
Cooking enthusiasts, whether seasoned food lovers or apprentice cooks eager to learn, often
face challenges in discovering and mastering unique recipes. Existing platforms primarily
focus on generic or popular dishes, leaving little room for personalized guidance or explo-
ration of creative culinary techniques. Additionally, aspiring cooks may lack the confidence
to experiment in the kitchen without a supportive environment. This app addresses the
need for a comprehensive platform that not only provides access to diverse and unique
recipes but also fosters a community of like-minded individuals. By offering step-by-step
guidance, interactive features, and a space to share culinary successes and challenges, this
app empowers users to expand their cooking skills, explore new cuisines, and confidently
create standout dishes. It bridges the gap between learning, sharing, and enjoying the art of
cooking, making it an essential tool for any food lover or aspiring chef.
The application is designed to create a win-win scenario for both restaurants and users,
providing value to each stakeholder in unique ways. Below are the detailed business re-
quirements:
For restaurants:
• Increased Visibility: Restaurants can achieve a higher appearance rate on the app’s rec-
ommendation system by providing quality content, such as high-resolution images,
detailed menu descriptions, and engaging promotions. The app will use algorithms to
prioritize restaurants based on user preferences, location, and popularity.
• Targeted Marketing: Restaurants can promote special deals, seasonal menus, or events
to users in their vicinity, ensuring their marketing efforts reach the right audience at
the right time.
• Integration of Reviews and Ratings: Restaurants will benefit from user-generated reviews
and ratings, which help build credibility and attract more customers.
For users:
Mutual features:
• Feedback and Suggestions System: Both restaurants and users will have a voice in shaping
the platform. Restaurants can respond to user reviews, and users can suggest features
or share feedback about the app’s recommendations.
• Trust and Transparency: The app will ensure transparency by displaying accurate rat-
ings, real reviews, and up-to-date information about restaurants. This builds trust and
fosters long-term engagement with the platform.
The app will improve efficiency by automating restaurant recommendations and discovery,
reducing the need for manual searches. It enhances accuracy by providing tailored sugges-
tions based on user preferences and location. Transparency is ensured through real reviews,
ratings, and up-to-date restaurant information, fostering trust. By increasing visibility for
restaurants and offering personalized experiences for users, the app creates mutual benefits,
driving engagement and satisfaction for both parties.
The project can be developed for app platforms to maximize accessibility and user reach.
Key technical considerations include:
• Interface: The interface will be designed to support either a web or mobile environment,
depending on user preferences.
• Object-Oriented Design: The project will utilize object-oriented programming to ensure
maintainable and scalable code.
• Database and Web Server: A robust database is required to manage user information,
recipes, and restaurant details, along with a reliable web server for hosting the appli-
cation and supporting concurrent users.
The platform is expected to attract a large user base, leveraging the widespread interest
in cooking, sharing recipes, and exploring local restaurants. Revenue generation strategies
include:
• Freemium Model: The app will offer free basic features, with premium features such as
advanced search filters, recipe suggestions based on available ingredients, or exclusive
content available for a subscription fee.
• Advertising Opportunities: Partnerships with restaurants or food brands can provide an
additional revenue stream through targeted advertisements.
The app has broad potential for adoption, serving a diverse audience with varying needs:
• General Appeal: Suitable for all age groups, genders, and cultural backgrounds, foster-
ing inclusivity.
• Tourism: A helpful resource for tourists seeking local cuisine recommendations and
authentic dining experiences.
• Beginner Cooks: Provides easy-to-follow recipes, tips, and a supportive community for
sharing culinary experiments.
• Creative Features: Users can explore diverse recipes, get meal ideas based on available
ingredients, and share cooking tips and techniques.
2.4.1 Methodologies
The top two models considered were system prototyping and throwaway prototyping. Sys-
tem prototyping was chosen for its balance of visibility, flexibility, and efficient task distribu-
tion. It leverages team skills, accommodates schedules, and allows continuous refinement
for cohesive collaboration.
For system modeling, tools like astahUML and drawIO tools are used. For version control,
we implement the project at GitHub for collaborative development and version control.
Post-conditions
• A new account is created and stored in the
system.
• The user is notified of successful registration.
Post-conditions The user is logged into their account and can use the
system features.
Post-conditions
• The selected recipe or restaurant is either
approved or rejected by the admin.
• The status of the recipe or restaurant is updated
in the system.
• The submitter is notified of the decision.
The Manage Recipe sequence diagram shows the interactions involved when a user man-
ages their recipes. The process includes three main actions: uploading, retrieving, and delet-
ing recipes. First, the user uploads a recipe through the UI, which forwards the request to
the ManageRecipeController, then to the Recipe DAO, where an SQL query saves the recipe
in the database. Next, the user requests their recipes, prompting the system to fetch the data
from the database through similar interactions. Finally, the user can delete a recipe, where
the system processes the deletion request and updates the database accordingly. For each
action, if the operation is valid, the system confirms success and refreshes the interface to
reflect the updated recipe list.
The Manage Restaurant sequence diagram demonstrates the steps involved when a restau-
rant owner manages their restaurant data. The process includes three main operations: sign-
ing up a restaurant, retrieving restaurant details, and deleting a restaurant. First, when
the restaurant owner signs up a new restaurant, the request is sent through the UI to the
ManageRestaurantController, which saves the data via the Restaurant DAO and executes a
database query to store the information. Second, when the owner requests to retrieve their
restaurant details, the flow proceeds through the UI and ManageRestaurantController to the
Restaurant DAO, which queries the database to fetch the required data. Lastly, for deleting
a restaurant, the delete request follows the same process chain, where the Restaurant DAO
executes a delete operation on the database. After each operation, if successful, the system
validates the response and refreshes the interface to reflect the changes.
The Manage User sequence diagram illustrates the interactions involved in managing user
data within the system. It encompasses three primary operations: creating, retrieving, and
deleting user records. When a user initiates the creation of a new user, the request is trans-
mitted from the UI to the AdminController, which then delegates the creation process to
the UserDao. The UserDao subsequently executes a database query to insert the new user
details into the database. For retrieving all users, the request is similarly routed from the UI
to the AdminController, which then forwards it to the UserDao. The UserDao retrieves the
user data through a database query and returns it to the AdminController. Finally, to delete
a user, the request originates from the UI and is directed to the AdminController, which
then instructs the UserDao to execute a database delete query to remove the specified user
from the database. Upon successful completion of each operation, the system validates the
outcome and updates the user interface accordingly.
The Search Recipe sequence diagram outlines the interactions when a user searches for
recipes. The process involves several key actions: initiating a search with specific crite-
ria, viewing detailed information about individual recipes, submitting reviews for recipes,
and managing a favorites list by adding or removing recipes. First, when the user initiates
a search, the request is sent from the UI to the SearchController, which delegates the search
operation to the Recipe DAO. The Recipe DAO executes a database query to retrieve recipes
that match the search criteria. Next, when the user views a recipe’s details, the request flows
through the UI and SearchController to the Recipe DAO, which retrieves the detailed infor-
mation from the database. For submitting reviews, the user initiates the review operation
through the UI, and the SearchController forwards the request to the Recipe DAO, which ex-
ecutes a database query to store the review. Lastly, for managing favorites, the user initiates
the add/remove operation through the UI, and the SearchController forwards the request
to the Recipe DAO, which executes the necessary database queries to update the user’s fa-
vorites list. After each action, if successful, the system validates the operation and updates
the user interface accordingly.
The Search Restaurant sequence diagram illustrates the interactions when a user searches
for restaurants. The process involves several key actions: initiating a search with specific
criteria, viewing detailed information about individual restaurants, submitting reviews for
restaurants, and managing a favorites list by adding or removing restaurants. First, when
the user initiates a search, the request is sent from the UI to the SearchController, which del-
egates the search operation to the RestaurantDao. The RestaurantDao executes a database
query to retrieve restaurants that match the search criteria. Next, when the user views a
restaurant’s details, the request flows through the UI and SearchController to the Restau-
rantDao, which retrieves the detailed information from the database. For submitting re-
views, the user initiates the review operation through the UI, and the SearchController for-
wards the request to the RestaurantDao, which executes a database query to store the review.
Lastly, for managing favorites, the user initiates the add/remove operation through the UI,
and the SearchController forwards the request to the RestaurantDao, which executes the
necessary database queries to update the user’s favorites list. After each action, if success-
ful, the system validates the operation and updates the user interface accordingly.
The Request Handle sequence diagram outlines the interactions when an admin handles a
user’s request. The process involves three main actions: viewing the request, accepting the
request, and rejecting the request. First, when the admin views a request, the request is sent
from the UI to the AdminController, which delegates the retrieval of the request details to
the UserDao. The UserDao executes a database query to fetch the request information and
returns it to the AdminController. Next, when the admin accepts the request, the request is
sent from the UI to the AdminController, which delegates the acceptance operation to the
UserDao. The UserDao executes a database query to update the request status to "accepted".
Lastly, for rejecting a request, the admin initiates the rejection operation through the UI,
and the AdminController forwards the request to the UserDao, which executes a database
query to update the request status to "rejected". After each action, if successful, the system
validates the operation and updates the user interface accordingly.
Based on the MVC architecture, the system is divided into three main packages.
The View package represents the user interface, allowing users to interact with the system.
It includes: Register, Login, Dashboard and DetailRecipe.
These interfaces (defined in FXML) display data to users and capture user actions.
The Controller package handles logic and user actions, bridging the View and Model. Key
controllers include:
The Model package manages the data and business logic. It includes:
User
Attribute Name Data Type Access Modifier Description
id int private User’s ID
email String private User’s email
username String private User’s username
password String private User’s password
myRecipes ArrayList<Recipe> private User’s created recipes
favRecipes ArrayList<Recipe> private User’s favorite recipes
favRestaurants ArrayList<Restaurant> private User’s favorite restaurants
User
Method Name Method Type Access Modifier Description
setId void public Set Id for user
setEmail void public Set email for user
setUsername void public Set username
setPassword void public Set password
setMyRecipes void public Set user’s created recipes
setFavRecipes void public Set user’s favorite recipes
setFavRestaurants void public Set user’s favorite restaurants
getId int public Get Id for user
getUsername String public Get username
getPassword String public Get password
getMyRecipes ArrayList<Recipe> public Get user’s created recipes
getFavRecipes ArrayList<Recipe> public Get user’s favorite recipes
getFavRestaurants ArrayList<Restaurant> public Get user’s favorite restaurants
RestaurantOwner
Attribute Name Data Type Access Modifier Description
List of names of restaurants
myRestaurants ArrayList<Restaurant> private
owned by an user
RestaurantOwner
Method Name Method Type Access Modifier Description
setMyRestaurants void public User’s ID
getMyRestaurants ArrayList<Restaurant> public User’s email
Admin
Attribute Name Data Type Access Modifier Description
Recipes queue waiting for
recipesQueue ArrayList<Recipe> private
approved from admin
Restaurant queue waiting for
restaurantQueue ArrayList<Restaurant> private
approved from admin
Admin
Method Name Method Type Access Modifier Description
Set the waiting
setRecipesQueue void public
recipes queue
Set waiting
setRestaurantsQueue void public
restaurants queue
Get waiting
getRecipesQueue ArrayList<Recipe> public
recipes queue
Get waiting
getRestaurantsQueue ArrayList<Restaurant> public
restaurants queue
Recipe
Attribute Name Data Type Access Modifier Description
id int private ID of recipe
name String private Name of recipe
authorId int private Author ID of recipe
cuisineType String private Cuisine type of recipe
time int private Time to cook
ingredients String private Ingredients of recipe
tutorial String private Tutorial (Step by step)
assessments ArrayList<Assessment> private Assessments of recipe
Recipe
Method Name Method Type Access Modifier Description
setId void public Set id for Recipe
setName void public Set name for Recipe
setAuthorId void public Set author name of the Recipe
setCuisine void public Set cuisine type of the Recipe
setTime void public Set time creation of the Recipe
setIngredients void public Set ingredients of the Recipe
setTutorial void public Set tutorial text of the Recipe
setAssessments void public Set assessments of the Recipe
getId int public Get id for Recipe
getName String public Get name for Recipe
getAuthorId String public Get author id of the Recipe
getCuisine String public Get cuisine type of the Recipe
getTime int public Get time creation of the Recipe
getIngredients String public Get ingredients of the Recipe
getTutorial String public Get tutorial text of the Recipe
getAssessments ArrayList<Assessment> public Get assessments of the Recipe
Restaurant
Attribute Name Data Type Access Modifier Description
id int private ID of restaurant
name String private Name of restaurant
ownerId int private Owner ID of restaurant
address String private Address of restaurant
phoneNumber String private Phone Number of restaurant
Assessment
Attribute Name Data Type Access Modifier Description
authorId int private ID of author
rate int private Rating from author
comment String private Comment from author
UserDao
Method Name Method Type Access Modifier Description
insert void public Insert to the users table
update void public Update a row in the users table
deleteByID void public Delete a row in users table
findUser User public Return user by username and password
This is the dashboard displaying a list of recipes. Users can access their profile through "My
Profile," "Newsfeed," and "My Favorite Recipes." For each recipe shown on the dashboard,
users can click "View Details" to see the recipe details or "Add to Favorites" to save it. They
can also upload their own recipes to share with the community.