You are on page 1of 71

HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY AND EDUCATION

FACULTY FOR HIGH QUALITY TRAINING


----🙣🕮🙡----

COURSE REPORT

1. SOFTWARE DESIGN PATTERNS


2.

3. CYBER GAME MANAGEMENT


4.

5.

6.

7. GROUP MEMBERS:
8. Lê Thiện An 19110105
9. Lê Duy Tường 19110065
10. Đỗ Trần Công Phương 19110133
11. Nguyễn Thành Thiện 19110150

12.

Instructor: Mr Nguyen Tran Thi Van

Ho Chi Minh City – 2022


INSTRUCTOR’S COMMENTS
..................................................................................................................................
..................................................................................................................................
..................................................................................................................................
..................................................................................................................................
..................................................................................................................................
..................................................................................................................................
..................................................................................................................................
..................................................................................................................................
..................................................................................................................................
..................................................................................................................................
..................................................................................................................................
..................................................................................................................................
..................................................................................................................................
..................................................................................................................................
..................................................................................................................................
..................................................................................................................................
..................................................................................................................................
..................................................................................................................................
..................................................................................................................................
..................................................................................................................................
..................................................................................................................................
Foreword Page iii

FOREWORD
For Vietnam in particular and the world in general, Cyber Game is a fairly popular
form of business. Especially after the time of the Covid-19 pandemic, when everyone
started to return to community activities, returning to Cyber Games to both play games
and enjoy Cyber's food is indispensable. Therefore, we chose the topic of building an
analysis and design to manage the Super League football tournament for the final project
of the course.
Because the implementation time is limited and the scope of the topic is quite
wide, the content of the project is not very complete and accurate with reality. Hopefully,
when conditions allow, the content of the project can be expanded more fully and can be
applied in practice.
We sincerely thank Mr. Nguyen Tran Thi Van has imparted to us the necessary
knowledge for this subject. We would also like to thank you for your guidance in
consulting our project.

Cyber game management


Mục lục Trang

TABLE OF CONTENTS
INSTRUCTOR’S COMMENTS............................................................................................................ii
FOREWORD..........................................................................................................................................iii
TABLE OF CONTENTS.......................................................................................................................iv
LIST OF FIGURES...............................................................................................................................vii
LIST OF TABLES................................................................................................................................viii
OVERVIEW ABOUT CYBER GAME.................................................................................................ix
1. CHAPTER 1: SURVEY......................................................................................................................1
1.1. Survey:.......................................................................................................................................1
1.2. Objectives:.................................................................................................................................1
1.3. Scope of the topic:.....................................................................................................................1
2. CHAPTER 2: ANALYSIS...................................................................................................................2
2.1. Entity Detection.........................................................................................................................2
2.2. Model Interpretation.................................................................................................................2
2.3. Survey the current status and requirements..............................................................................3
2.4. Identify actors and functions in use case diagrams....................................................................4
2.5. Actors and Use cases description...............................................................................................5
2.5.1. Actors description.......................................................................................................................5
2.5.2. Use cases description:................................................................................................................5
2.6. Use Case Diagram:.....................................................................................................................7
2.6.1. Use Case Diagrams:....................................................................................................................7
2.6.2. Use Case Specifications:...........................................................................................................10
2.7. Sequence Diagrams:.................................................................................................................16
3. CHAPTER 3: LIST OF SOFTWARE REQUIREMENTS............................................................25
3.1. List of system functional requirements:...................................................................................25
3.2. List of non-functional requirements of the system:..................................................................25
4. CHAPTER 4: DATA DESIGN.........................................................................................................27
4.1. ERD:.........................................................................................................................................27
4.2. Detailed data sheets:...............................................................................................................29
4.2.1. Account: Account(UserName, DisplayName, Password, Type).................................................29
4.2.2. Computer Order: ComputerOrder (id, name, status)...............................................................29

Cyber game management


Mục lục Trang

4.2.3. Bill: Bill(id, DateCheckIn, DateCheckOut, idComputer, status).................................................29


4.2.4. Bill Infomation: BillInfo(id, idBill, idOrder, count).....................................................................30
4.2.5. Order: Order(id, name, idCategory, price)................................................................................30
4.2.6. Order Category: OrderCategory(id, name)...............................................................................31
4.2.7. Relation map:...........................................................................................................................31
5. CHAPTER 5: INTERFACE DESIGN.............................................................................................32
5.1. Transform Diagram..................................................................................................................32
5.2. Detailed description of screens................................................................................................32
5.2.1. Login screen..............................................................................................................................32
5.2.2. Main srceen..............................................................................................................................34
5.2.3. Admin screen:...........................................................................................................................34
5.2.4. User Account:...........................................................................................................................38
5.2.5. Computer management screen................................................................................................39
5.2.6. Order and payment screen.......................................................................................................39
5.2.7. Rate us screen..........................................................................................................................40
6. CHAPTER 6: DESIGN PATTERN..................................................................................................42
6.1. Singleton Pattern:....................................................................................................................42
6.2. Decorator Pattern:...................................................................................................................43
6.3. Façade Pattern:........................................................................................................................45
7. CHAPTER 7: SETTING PROGRAM & TEST..............................................................................48
7.1. Setting Program.......................................................................................................................48
7.1.1. Support tools............................................................................................................................48
7.1.2. Brief introduction of the technologies used in the program....................................................48
7.1.3. Structure of the program and implementation process:..........................................................49
7.2. Testing:....................................................................................................................................51
7.2.1. Test login, logout:.....................................................................................................................52
7.2.2. Test order computer:................................................................................................................54
7.2.3. Test payment, feedback, switch computer, discount...............................................................54
7.2.4. Test Statisticize bill:..................................................................................................................55
7.2.5. Add, delete, update items:.......................................................................................................57
7.2.6. Add, delete, update accounts:..................................................................................................57
8. CHAPTER 8: CONCLUSION:.........................................................................................................59

Cyber game management


Mục lục Trang

8.1. Knowledge and skills:...............................................................................................................59


8.2. Pros and cons:..........................................................................................................................59
8.3. Development...........................................................................................................................59
9. REFERENCES...................................................................................................................................60
10. JOB TABLE.....................................................................................................................................61

Cyber game management


Danh mục các hình vẽ Trang vii

LIST OF FIGURES
Figure 2.6-1. Use Case General system..............................................................................7
Figure 2.6-2. Use Case Hired PC Management.................................................................8
Figure 2.6-3. Use Case Account Management....................................................................8
Figure 2.6-4. Use Case Menu Management........................................................................9
Figure 2.6-5. Use Case Statistic..........................................................................................9
Figure 5.1-1. Transformation Diagram.............................................................................32
Figure 5.2-1. Login screen................................................................................................33
Figure 5.2-2. Event diagram Login screen........................................................................34
Figure 5.2-3. Main screen.................................................................................................34
Figure 5.2-4. Turnover screen...........................................................................................35
Figure 5.2-5. Order screen................................................................................................36
Figure 5.2-6. Account screen............................................................................................37
Figure 5.2-7. Account user screen.....................................................................................38
Figure 5.2-8. Computer management screen.....................................................................39
Figure 5.2-9. Order and payment screen...........................................................................40
Figure 5.2-10. Rate us screen............................................................................................41
Figure 6.1-1. Singleton Pattern Structure..........................................................................42
Figure 6.1-2. Create Instance............................................................................................43
Figure 6.1-3. Singleton for AccountDAO.........................................................................43
Figure 6.2-1. Decorator Pattern Strucrture........................................................................44
Figure 6.2-2. Decorator Pattern Setting............................................................................44
Figure 6.2-3. Using Decorator Pattern..............................................................................45
Figure 6.3-1. Façade Pattern Structure..............................................................................46
Figure 6.3-2. Façade Pattern Setting.................................................................................47
Figure 6.3-3. Using Façade Patter.....................................................................................47
Figure 7.1-1. Data Access Layer.......................................................................................50
Figure 7.1-2. Data Transfer Object...................................................................................51
Figure 7.1-3. View............................................................................................................51
Figure 7.2-1. Login test.....................................................................................................52

Cyber game management


Overview Trang

LIST OF TABLES
Table 2.4-1. Actors and Use cases......................................................................................5
Table 2.5-1. Actors and their roles......................................................................................5
Table 2.5-2. Use cases description......................................................................................6
Table 2.6-1. Use Case Login Specifications.....................................................................10
Table 2.6-2. Use Case Lease PC Specifications................................................................10
Table 2.6-3. Use Case Return PC Specifications..............................................................11
Table 2.6-4. Use Case Ordering food Specifications........................................................11
Table 2.6-5. Use Case Add food Specifications................................................................12
Table 2.6-6. Use Case Delete food Specifications............................................................12
Table 2.6-7. Use Case Update food Specifications...........................................................13
Table 2.6-8. Use Case Add new account Specifications...................................................14
Table 2.6-9. Use Case Delete account Specifications.......................................................14
Table 2.6-10. Use Case Update account information Specifications.................................15
Table 2.7-1. Sequence Diagram Login..............................................................................16
Table 2.7-2. Sequence Diagram Hired PC Management...................................................17
Table 2.7-3. Sequence Diagram Return PC Management.................................................18
Table 2.7-4. Sequence Diagram Add new Food...............................................................19
Table 2.7-5. Sequence Diagram Delete Food....................................................................20
Table 2.7-6. Sequence Diagram Update Food..................................................................21
Table 2.7-7. Sequence Diagram Update Account.............................................................22
Table 2.7-8. Sequence Diagram Add new Account..........................................................23
Table 2.7-9. Sequence Diagram Delete Account..............................................................24
Table 5.2-1. Objects in the login screen............................................................................33
Table 5.2-2. Objects in the Main screen............................................................................34
Table 5.2-3. Objects in the Turnover screen.....................................................................35
Table 5.2-4. Objects in the Order screen...........................................................................37
Table 5.2-5. Objects in the Account screen.......................................................................38
Table 5.2-6. Objects in the Account user screen...............................................................39
Table 5.2-7. Objects in the Computer management screen...............................................39
Table 5.2-8. Objects in the Order and payment screen.....................................................40
Table 5.2-9. Objects in the Rate us screen........................................................................41

Cyber game management


Overview Trang

OVERVIEW ABOUT CYBER GAME


Cyber Game is a high-end net room business model with a large scale that is
heavily invested in configuration, service and engine room space to bring gamers the best
gaming services. A Cyber Game is usually invested with a large number of machines
from 100 machines or more, combined with other services such as dining, concocted
drinks, milk tea… This report includes serveral topic are as follow:
Chapter 1: Survey.
Chapter 2: Analysis.
Chapter 3: List of Software Requirements.
Chapter 4: Data Design.
Chapter 5: Interface Design.
Chapter 6: Design Pattern.
Chapter 7: Setting Program & Test.
Chapter 8: Conclusion.

Cyber game management


Chapter 1: Survey Trang 1

1. CHAPTER 1: SURVEY
1.1. Survey:
Through press and media to collect information.

1.2. Objectives:
Analyze and design the management system of the most popular type of Cyber
Game today with the functions of playtime, food, drinks,...

1.3. Scope of the topic:


Limited scope in the project of information system analysis and design and the
above objectives.

Cyber game management


Chapter 2: Analysis Trang 2

2. CHAPTER 2: ANALYSIS
2.1. Entity Detection
Entity 1: Account

Attributes: UserName, DisplayName, PassWord, Type

Entity 2: Bill
Atttributes: id, DateCheckIn, DateCheckOut, IdComputer, status
Entity 3: BillInfo
Atttributes: id, idBill, idOrder, ViTri
Entity 4: Category
Attributes: MSVD, TenVD
Entity 5: Order
Attributes: id, name, idCategory, price
Entity 6: OrderCategory
Atttributes: id, name
Entity 7: Computer
Attributes: id, name, status

2.2. Model Interpretation


The software will store and manage information about the machines played at the
shop.
Create login function for Admin and User
For Users:
View and change personal information
Users can buy more time to play, order more foods and drinks from the shop
Search for the restaurant's food and drink
When setting the playing time and the item, the player can see the bill as well as
the total amount that he needs to pay.

Cyber game management


Chapter 2: Analysis Trang 3

Users also have the function to add, delete, edit playtime or ordered dishes.
There is also a very necessary feature that is to change the machine when the
machine is playing with problems or damage.
For Admins:
Admin can manage how many hours the player has ordered, what dishes and
drinks are ordered from the restaurant and bill the player.
Show list of invoices
Show list of food and drink
Add, remove, edit Cyber's food and drink
Show list of player accounts
Print invoices for players

2.3. Survey the current status and requirements


Survey the current status:

Each Cyber Game will have about 20-30 computers for users to use and each
player will be able to order food and drink to see the bill they need to spend. In which the
administrators will be the ones who have the function to manage 20-30 machines of
Cyber with the management of the player's food and drink playtime.

Requirements:

Store:
User's information: username, password, display name
Admin information: username, password, display name
Invoice: Play time, amount to be paid.
Menu: number of hours of play, food, drinks, price of each type
Computer: Status on or off
Search:
Look up information about food
Look up drink information

Cyber game management


Chapter 2: Analysis Trang 4

Look up player account information.


Look up information about computer status
Calculate:
Billing for each meal, drink and playtime
Calculate the total amount to be paid on each bill
Output:
User account information
List of dishes
List of drinks
List of machines
Money for each type of playtime food and drink
Total amount on invoice

2.4. Identify actors and functions in use case diagrams

Actors Use cases

- Login
- PC management
- Account management
- Menu/Food management
Storekeeper
- Lease PC
- Food ordering management
- Payment management
- Statistic

- Login
- Lease PC
Staff
- Food ordering management
- Payment management

Khách hàng - Rent PC (empty)

Cyber game management


Chapter 2: Analysis Trang 5

- Order food
- Make a payment
Table 2.4-1. Actors and Use cases
2.5. Actors and Use cases description
2.5.1. Actors description
Actors Use cases

- Login
- Lease PC
- Let the customer return PC
- Let the customer order food
- Add new food
Store keeper
- Delete food
- Update food/menu
- Add new account
- Delete account
- Update account (in private)

- Login
- Lease PC
Staff - Let the customer return PC
- Let the customer order food
- Update account (in private)

- View PC list
- Rent PC
Customer
- View menu
- Order food
Table 2.5-2. Actors and their roles
2.5.2. Use cases description:

No. Use cases Description

1 Login Allows storekeeper or staff login into the system.

Cyber game management


Chapter 2: Analysis Trang 6

Staff changes the rented status of selected PC to


2 Lease PC
« In use » and let the customer use this PC.

Staff changes the rented status of selected PC to


3 Customer return PC
« Empty » and make a payment for the customer.

Staff selects the food that the customer order (type,


4 Customer order food name and quantity). Update payment cost after
selected « Order ».

Storekeeper inputs new food into the system with


Add new food
5 category, name and price, food ID is updated
automatically.

Storekeeper can remove the food from the menu


6 Xóa thực đơn
list when it is no longer served at the shop.

Storekeeper updates the information of food with


7 Update food/menu
relevant category, name and price.

When a new employee joined the shop,


storekeeper can create a new account for this
8 Add new account
employee with relevant roles: 1 for store owner
and 0 for employee.

When the employee no longer works at the shop,


9 Delete account
storekeeper can delete that employee’s account.

An employee or a net shop owner can change the


display information and password of the account
10 Update account
they own, information including: username, display
name and password.

Shop owner uses statistics to capture the operation


11 Statistic of the store, statistical information can be
customers, computer information, computer rental
situation.

Cyber game management


Chapter 2: Analysis Trang 7

Table 2.5-3. Use cases description

2.6. Use Case Diagram:


2.6.1. Use Case Diagrams:
uc General UC

Login

Manage hired PC

Manage food
ordering
Staff

Manage payment

Manage accounts

Storekeeper

Manage menu

Figure 2.6-1. Use Case General system

Cyber game management


Chapter 2: Analysis Trang 8

uc Manage Hired PC

PC reimbursement Payment
management «extend»

PC rental
management

«extend»
Sav e bill

Staff
«extend»

Food ordering
management

Figure 2.6-2. Use Case Hired PC Management

uc Account Management

Create account

Delete account

Storekeeper
Update account

View account

Figure 2.6-3. Use Case Account Management

Cyber game management


Chapter 2: Analysis Trang 9

uc Menu Management

Add new food to


menu

Update menu

Storekeeper Remov e food from


menu

View food list in


menu

Figure 2.6-4. Use Case Menu Management

uc Statistic

Computer list
statistics

Food ordering
statistics

Staff

Rev enue statistics

Figure 2.6-5. Use Case Statistic

Cyber game management


Chapter 2: Analysis Trang 10

2.6.2. Use Case Specifications:

Use Case Login

Description Allows storekeeper and staff login into the system.

Actors Staff/Store keeper.

Pre-conditions User has an account.

Steps (1) Open the system.


(2) Enter username and password.
(3) Click “Login” button or press Enter.
(4) If failure, message “Login failed”. Re-enter and login
again.
(5) If the login is successful, show program interface with
full functions of employees.
Table 2.6-4. Use Case Login Specifications

Use Case Lease PC

Description Allows customer rent PC for use.

Actors Staff.

Pre-conditions Customer come and rent PC.

Steps (1) Open the system.


(2) Login.
(3) Select the PC position (which is empty) and the time
limit once per use.
(4) Click “Order” button.
(5) Create a bill and keep until customer make a payment.
Table 2.6-5. Use Case Lease PC Specifications

Use Case Let customer return PC

Cyber game management


Chapter 2: Analysis Trang 11

Description Staff reset the rented status of returned PC (to empty) and let
the customer make a payment.

Actors Staff

Pre-conditions This PC was rented before.

Steps (1) Open the system.


(2) Login.
(3) Select the returned PC position.
(4) Staff click “Payment by cash” or “Payment by MOMO”
and receive payment from the customer.
(5) The system will update this PC status to “Empty”.
Table 2.6-6. Use Case Return PC Specifications

Use Case Let the customer order foods

Description Staff take orders and order menus from customers.

Actors Staff

Pre-conditions Customer come and rent PC.

Steps (1) Open the system.


(2) Login.
(3) Select rented PC position.
(4) Select food category, name and quantity.
(5) Click “Order” button.
(6) The system will update the bill which is created before.
Table 2.6-7. Use Case Ordering food Specifications

Use Case Add new food

Description Every time there is a new food, the store owner will add a new
one to update the system continuously.

Actors Store owner.

Cyber game management


Chapter 2: Analysis Trang 12

Pre-conditions The shop owner has information about the new food and the food is not
already in the database.

Steps (1) Open the system.


(2) Login with admin account.
(3) Go to “Admin” function.
(4) Show the admin form.
(5) Select the tab “Order”.
(6) The shopkeeper enters the new food information,
including: food category, name and price.
(7) After that, click “Add” button.
(8) If successfully saved, the food information will be
updated to the database and the message “Add
successfully!” will be displayed. If saving fails, show an
error and re-enter.
Table 2.6-8. Use Case Add food Specifications

Use Case Delete food

Description The shop owner deletes food information from the database.

Actors Store owner.

Pre-conditions This food is no longer served at the shop.

Steps (1) Open the system.


(2) Login with admin account.
(3) Go to “Admin” function.
(4) Show the admin form.
(5) Select the tab “Order”.
(6) The shop owner selects the food he/she wants to delete,
click the "Delete" button to delete the food.
(7) The system will delete that menu from the database.
Table 2.6-9. Use Case Delete food Specifications

Cyber game management


Chapter 2: Analysis Trang 13

Use Case Update food

Description The shop owner updates the food information

Actors Store owner

Pre-conditions When there is a food that needs to be changed

Steps (1) Open the system.


(2) Login with admin account.
(3) Go to “Admin” function.
(4) Show the admin form.
(5) Select the tab “Order”.
(6) The shop owner selects the food he/she wants to update
and input new information, including: food category,
name and price.
(7) Click “Update” button to update the food.
(8) The system will update that food from the database.
Table 2.6-10. Use Case Update food Specifications

Use Case Add new account

Description The store owner adds an account when a new employee comes
to work at the store.

Actors Store owner.

Pre-conditions There are new employees to work.

Steps (1) Open the system.


(2) Login with admin account.
(3) Go to “Admin” function.
(4) Show the admin form.
(5) Select the tab “Account”.
(6) The store owner enters the necessary information on the
form including: account name, employee name,

Cyber game management


Chapter 2: Analysis Trang 14

password.
(7) After entering, the store owner clicks the “Add” button
to save the information in the database.
(8) The system connects to the database, creates a new
account, and displays the message “Add successfully”
Table 2.6-11. Use Case Add new account Specifications

Use Case Delete account

Description Store owner deletes employee's account.

Actors Store owner.

Pre-conditions When an employee quits

Steps (1) Open the system.


(2) Login with admin account.
(3) Go to “Admin” function.
(4) Show the admin form.
(5) Select the tab “Account”.
(6) The store owner selects the account he/she wants to
delete, click the "Delete" button to delete the account.
(7) The system will connect to the database to delete the
selected account information. Then will display the
message “Delete successfully!”.
Table 2.6-12. Use Case Delete account Specifications

Use Case Update account information

Description Employees change their personal information on the system.

Actors Store owner/Staff.

Pre-conditions When the employee's information is not correct or there is some


information that needs to be updated.

Cyber game management


Chapter 2: Analysis Trang 15

Steps (1) Open the system.


(2) Login.
(3) Select “Account  User Information”.
(4) Show information form.
(5) Store owners or employees enter the information that
needs to be updated, including: username, name and
password.
(6) After entering, click “Update” to update the
information.
(7) The system will connect to the database to confirm the
password. If the old password is correct, update the new
information in the database and notify "Update
successsfully!". If the old password is wrong, show an
error and re-enter it.

Table 2.6-13. Use Case Update account information Specifications

Cyber game management


Chapter 2: Analysis Trang 16

2.7. Sequence Diagrams:


sd Login

Database

Staff
frmLogin frmMain

loop

[Incorrect username or password]


Enter username and password()

Get password from db()

Check password()

Send result()

Enter frmMain()

Close Form()

Table 2.7-14. Sequence Diagram Login

Cyber game management


Chapter 2: Analysis Trang 17

sd Hired PC management

Database

Staff
frmMain

PC management()

Query()

Display PC list()

Select PC()

Query()

Send result()

Table 2.7-15. Sequence Diagram Hired PC Management

Cyber game management


Chapter 2: Analysis Trang 18

sd Hired PC management

Database

Staff
frmMain

PC management()

Query()

Display PC list()

Select rented PC()

Select payment()

Query()

Send result()

Table 2.7-16. Sequence Diagram Return PC Management

Cyber game management


Chapter 2: Analysis Trang 19

sd Update menu

Database

Storekeeper
frmMain frmAdmin frmAddFood

Admin()

Show()

Add food()

Show()

loop
[Add new food]
Input new food information()

Add new food()

Save()

Send result()

Table 2.7-17. Sequence Diagram Add new Food

Cyber game management


Chapter 2: Analysis Trang 20

sd Delete food

Database

Storekeeper
frmMain frmAdmin frmFoodList

Admin()

Show()

Order()

Show()

Select food()

Delete()

Query
()

Send result()

Table 2.7-18. Sequence Diagram Delete Food

Cyber game management


Chapter 2: Analysis Trang 21

sd Update food

Database

Storekeeper
frmMain frmAdmin frmFoodList

Admin()

Show()

Order()

Show()

Select food()

Input new updated food information()

Delete()

Save()

Send result()

Table 2.7-19. Sequence Diagram Update Food

Cyber game management


Chapter 2: Analysis Trang 22

sd Update Account

Database

Staff
frmMain frmUserInfo

User Information()

Show()

Input updated information()

Save()

Save()

Send result()

Table 2.7-20. Sequence Diagram Update Account

Cyber game management


Chapter 2: Analysis Trang 23

sd Add Account

Database

Storekeeper
frmMain frmAdmin frmAccount

Admin()

Show()

Account()

Show()

Input new account()

Add()

Save()

Send result()

Table 2.7-21. Sequence Diagram Add new Account

Cyber game management


Chapter 2: Analysis Trang 24

sd Delete Account

Database

Storekeeper
frmMain frmAdmin frmAccount

Admin()

Show()

Account()

Show()

Input new account()

Add()

Save()

Send result()

Table 2.7-22. Sequence Diagram Delete Account

Cyber game management


Chapter 3: List of software requirements Trang 25

3. CHAPTER 3: LIST OF SOFTWARE REQUIREMENTS


3.1. List of system functional requirements:
Content Detailed description Notes
Decentralization - Management: - Managers must be
allowed to use all responsible for their own
functions management
- User: Order add, - Users are responsible
delete, edit Menu, update for what they have booked
information
3.2. List of non-functional requirements of the system:

OrOrd
Content Standarard Detailed description Note
er

Allow to change Software users can change


the price of the unit prices of foods and
1 Evolution
playtime, food, drinks, playtime depending
drinks on market standards

The lookup form is


convenient,
natural, and Support the ability to look
2 intuitive. Comfortable up approximate, look up by
Easy to use even content,...
for non-computer
experts.

3 Allows importing Compatible The list of new movies can


new movies from be directly imported into

Cyber game management


Chapter 3: List of software requirements Trang 26

existing Excel
files.
the Excel file with a
The screens have a
reasonable structure.
general
consistency

Up to 30 seconds for one


Speed of food and
booking
4 drink sales, Effective
Up to 10 seconds to have a
playtime
lookup result.

4.

Cyber game management


Chapter 4: Data Design Trang 27

1. CHAPTER 4: DATA DESIGN


1.1. ERD:

Cyber game management


Chapter 4: Data Design Trang 28

Mô tả ý nghĩa các quan hệ trên và các ràng buộc:

S Tên Mục đích


TT Table

1 Account - Chứa thông tin cá nhân và thông tin đăng nhập của
Admin và User

2 ComputerOrder - Chứa thông tin về tên mỗi máy tính ở trạng thái trống
hay có người

3 Bill - Chứa thông tin về ngày checkin và ngày checkout trạng


thái, giảm giá và tổng giá tiền của mỗi Bill

4 BillInfo - Quan hệ giữa Bill và những phần và số lượng trong


Order

5 IdCategory - Chứa thông tin bao gồm những loại có trong Order

Các ràng buộc khác - Trong mỗi dự án, ngày bắt đầu phải nhỏ hơn ngày kết
thúc

- Trong mỗi Bill, dateCheckin  dateCheckout

- dateCheckin và dateCheckout thuộc dự án nào phải nằm


trong khoảng dateCheckin và dateCheckout của dự án đó

- discount là số % mà máy đó được giảm giá

- totalPrice bằng tổng số tiền Bill của máy tính đã tính


discount

- totalPrice = totalPrice – (totalPrice / 100) * discount

Cyber game management


Chapter 4: Data Design Trang 29

1.2. Detailed data sheets:


1.2.1. Account: Account(UserName, DisplayName, Password, Type)

Orde Properties Data Key Meaning Note


r Type attribute

1 UserName String Primary key Tài khoản khách


hàng

2 DisplayName String Tên khách hàng

3 Password String Mật khẩu của


khách hàng

4 Type Integer Loại khách hàng

1.2.2. Computer Order: ComputerOrder (id, name, status)

Order Properties Data Key Meaning Note


Type attribute

1 id String Primary key Mã máy tính

2 name String Tên máy tính

3 status Logic Trạng thái hiện


tại của máy tính
(đang được
thuê hoặc đang
trống)

Cyber game management


Chapter 4: Data Design Trang 30

1.2.3. Bill: Bill(id, DateCheckIn, DateCheckOut, idComputer, status)

Order Properties Data Type Key attribute Meaning Note

1 id String Primary key Code orders

2 DateCheckIn Ngày tháng check-in time

3 DateCheckOut Ngày tháng check-out time

4 idComputer String Foreign key Computer Code

5 status Logic Order Status

1.2.4. Bill Infomation: BillInfo(id, idBill, idOrder, count)

Order Properties Data Key Meaning Note


Type attribute

1 id String Primary key Order


information code

2 idBill String Foreign key Order code

3 idOrder String Foreign key Bill code

4 count Integer

Cyber game management


Chapter 4: Data Design Trang 31

1.2.5. Order: Order(id, name, idCategory, price)

Order Properties Data Key Meaning Note


Type attribute

1 id String Primary key Bill code

2 name String Name of bill

3 idCategory String Foreign keyy Bill code

4 price Real Total payment


number

1.2.6. Order Category: OrderCategory(id, name)

Order Properties Data Key Meaning Note


Type attribute

1 id String Primary key Bill code

2 name String Name of Bill

1.2.7. Relation map:

Cyber game management


Chapter 4: Data Design Trang 32

Cyber game management


Chương 5: Interface Design Trang 33

2. CHAPTER 5: INTERFACE DESIGN


2.1. Transform Diagram

Figure 5.1-6. Transformation Diagram


2.2. Detailed description of screens
2.2.1. Login screen
Uses: Employees or customers use the account provided to use the application.

Cyber game management


Chương 5: Interface Design Trang 34

Screen Description:

Figure 5.2-7. Login screen


Objects in the screen:

Object Type Use


1 textEdit Enter account
2 textEdit Enter password
3 simpleButton Login to the program
Table 5.2-23. Objects in the login screen

Go to the main
Login screen with the
Click login account you just
screen
logged in

Cyber game management


Chương 5: Interface Design Trang 35

Figure 5.2-8. Event diagram Login screen


2.2.2. Main srceen
Uses: The screen shows the main operations of the program.
Screen Description:

Figure 5.2-9. Main screen


Regions in the main screen:

Regions Use
1 Move to the screen Admin, Account, ...
2 Click to view invoice information from your computer, See if
it's empty or used
3 Food order area and view bill information
4 Payment area and functions of changing PC, feedback,...
Table 5.2-24. Objects in the Main screen

Cyber game management


Chương 5: Interface Design Trang 36

2.2.3. Admin screen:


Uses: Contains cards used to view bill statistics of each machine, manage dishes,
manage accounts.

2.2.3.1. Turnover
Uses: View sales statistics over time
Screen Description:

Figure 5.2-10. Turnover screen


Objects in the screen:

Object Type Use


1 DateTimePicker Select the time period you want to see
statistics
2 DataGridView Display sales statistics by computer

Cyber game management


Chương 5: Interface Design Trang 37

3 simpleButton Used to switch statistics page


Table 5.2-25. Objects in the Turnover screen
2.2.3.2. Order screen
Uses: Used to view and adjust service information
Screen Description:

Figure 5.2-11. Order screen


Objects in the screen:

Object Type Use


1 DataGridView Use to view and select services to be
adjusted
2 TextBox Use to find the service that needs

Cyber game management


Chương 5: Interface Design Trang 38

adjustment
3 TextBox Show the details of the service
4 SimpleButton Perform operations such as view, edit,
delete
Table 5.2-26. Objects in the Order screen
2.2.3.3. Account Screen
Uses: Manage customer and employee accounts
Screen Description:

Figure 5.2-12. Account screen


Objects in the screen:

Object Type Use


1 DataGridView Use to view and select account to be

Cyber game management


Chương 5: Interface Design Trang 39

adjusted
2 SimpleButton Perform operations such as view, edit,
delete
3 TextBox Show the details of the account
Table 5.2-27. Objects in the Account screen
2.2.4. User Account:
Uses: Change personal account information
Screen Description:

Figure 5.2-13. Account user screen


Objects in the screen:

Object Type Use

Cyber game management


Chương 5: Interface Design Trang 40

1 TextBox Show the details of the account


2 SimpleButton Save account information
Table 5.2-28. Objects in the Account user screen
2.2.5. Computer management screen
Uses: View the status and select the computer to change the information
Screen Description:

Figure 5.2-14. Computer management screen


Objects in the screen:

Type Use
SimpleButto Select the computer to view the information
n
Table 5.2-29. Objects in the Computer management screen

Cyber game management


Chương 5: Interface Design Trang 41

2.2.6. Order and payment screen


Uses: Used to order and pay bills
Screen Description:

Figure 5.2-15. Order and payment screen


Objects in the screen:

Object Type Use


1 TextBox Find services to order
2 DataGridView Show information about services ordered
3 SimpleButton Pay bills
Table 5.2-30. Objects in the Order and payment screen
2.2.7. Rate us screen
Uses: Service quality rating
Screen Description:

Cyber game management


Chương 5: Interface Design Trang 42

Figure 5.2-16. Rate us screen


Objects in the screen:

Object Type Use


1 SimpleButton Click to rate the service
2 Panel Show total invoice information
3 Radio Rate service quality
buttonchọn
4 Panel show the store's thank you
Table 5.2-31. Objects in the Rate us screen

Cyber game management


Chapter 6: Design Pattern Trang 43

3. CHAPTER 6: DESIGN PATTERN


3.1. Singleton Pattern:
Application needs one, and only one, instance of an object. Additionally, lazy
initialization and global access are necessary.
Make the class of the single instance object responsible for creation, initialization,
access, and enforcement. Declare the instance as a private static data member. Provide a
public static member function that encapsulates all initialization code, and provides access
to the instance.
The client calls the accessor function (using the class name and scope resolution
operator) whenever a reference to the single instance is required.
Structure: The Singleton class declares the static method getInstance that returns
the same instance of its own class. The Singleton’s constructor should be hidden from the
client code. Calling the getInstance method should be the only way of getting the
Singleton object.

Figure 6.1-17. Singleton Pattern Structure


In the Project, only 1 instance is created at a time, no need to initialize multiple
Providers every time you pull data out. So we apply singleton pattern to this project.
Create an instance to use for Singleton Pattern

Cyber game management


Chapter 6: Design Pattern Trang 44

Figure 6.1-18. Create Instance


Using the Singleton Pattern for Objects:

Figure 6.1-19. Singleton for AccountDAO


Similarly just use “Instance” to use Singleton when needed in Project.

3.2. Decorator Pattern:


Decorator is a structural design pattern that lets you attach new behaviors to
objects by placing these objects inside special wrapper objects that contain the behaviors.
You want to add behavior or state to individual objects at run-time. Inheritance is
not feasible because it is static and applies to an entire class.
Structure:
The client is always interested in CoreFunctionality.doThis(). The client may, or
may not, be interested in OptionalOne.doThis() and OptionalTwo.doThis(). Each of
these classes always delegate to the Decorator base class, and that class always delegates
to the contained "wrappee" object.

Cyber game management


Chapter 6: Design Pattern Trang 45

Figure 6.2-20. Decorator Pattern Strucrture


In this project, we applied the singleton pattern to the rating system with different
customer feedback. Our team's idea is to use recursion for each customer feedback with
Decorator Pattern:

Figure 6.2-21. Decorator Pattern Setting

Cyber game management


Chapter 6: Design Pattern Trang 46

Figure 6.2-22. Using Decorator Pattern


3.3. Façade Pattern:
Facade is a structural design pattern that provides a simplified interface to a
library, a framework, or any other complex set of classes.
A segment of the client community needs a simplified interface to the overall
functionality of a complex subsystem.
Structure:

Cyber game management


Chapter 6: Design Pattern Trang 47

Facade takes a "riddle wrapped in an enigma shrouded in mystery", and interjects a


wrapper that tames the amorphous and inscrutable mass of software.
SubsystemOne and SubsystemThree do not interact with the internal components
of SubsystemTwo. They use the SubsystemTwoWrapper "facade" (i.e. the higher level
abstraction).

Figure 6.3-23. Façade Pattern Structure


In the project, we apply the Facade pattern to the payment system of Cyber Game.
Here we will have 2 forms of payment via Cash or via Momo. Each form of payment will
be a different service.

Cyber game management


Chapter 6: Design Pattern Trang 48

Figure 6.3-24. Façade Pattern Setting

Figure 6.3-25. Using Façade Patter

Cyber game management


Chapter 7: Setting Program & Test Trang 49

4. CHAPTER 7: SETTING PROGRAM & TEST


4.1. Setting Program
4.1.1. Support tools
During the entire process of developing and implementing the project, the team
used the following supporting software:
Visual Studio 2022 with .NET Framework 5.0
SQL server 2019 to build database
Figma to design interface
Using Advanded Installler 19.5 to create .EXE and .MSI (setting file)
Using Enterprise Architect to drawing UML diagrams
Using Adobe Photoshop to design icon, image for project

4.1.2. Brief introduction of the technologies used in the program


The program uses C# language to write code, written on a 3-layer model using
ADO.NET in SQL.

4.1.2.1. 7.1.2.1 ADO.NET


ADO.NET is a collection of libraries provided by Microsoft to help applications to
select, insert, update, delete to any database such as Sql Server, Oracle, MySql, SQLite ...

4.1.2.2. 7.1.2.2 Three layers


The 3-layer model is that we divide the program into functions, each layer will
perform a certain function, the 3 layers are: Presentation, Business Logic, and Data
Access. These classes will communicate with each other through the services that each
layer provides to create the application, this layer does not need to know what is inside
the other layer, just needs to know what service the other layer provides. for yourself and
use it only.
Presentation

Cyber game management


Chapter 7: Setting Program & Test Trang 50

This class is responsible for communicating with the end user to collect data and
display the results/data through elements in the user interface. This layer will use the
services provided by the Business Logic layer. In .NET, we can use Windows Forms,
ASP.NET or Mobile Forms to implement this class.
Business
Logic Layer This layer performs the main system operations, uses the services
provided by the Data Access layer, and provides services to the Presentation layer.
Data Access Layer
This layer performs operations related to storing and retrieving the application's
data. Usually this class will use the services of database management systems such as
SQL Server, Oracle, etc. to perform its tasks.

4.1.3. Structure of the program and implementation process:


The program is divided into 3 parts:

Data Access Layer:

Cyber game management


Chapter 7: Setting Program & Test Trang 51

Figure 7.1-26. Data Access Layer

Cyber game management


Chapter 7: Setting Program & Test Trang 52

Data Tranfers Object:

Figure 7.1-27. Data Transfer Object


View:

Figure 7.1-28. View


4.2. Testing:
Test functions:

Test Login, logout, update user information


Test order computer with food, drink, hours playing.
Test payment, feedback, switch PC, discount
Test admin function: Statisticize bill
Test admin function: add, delete, update users
Test admin function: add, delete, update food & drink

Cyber game management


Chapter 7: Setting Program & Test Trang 53

4.2.1. Test login, logout:


There are two types of accounts: admin account and user account.
Example: Input: Thien2605 | Password: 0 – Admin Account

Figure 7.2-29. Login test


With this account can access the application's admin rights:

As for other accounts, they will not have access to admin rights:

Cyber game management


Chapter 7: Setting Program & Test Trang 54

Cyber game management


Chapter 7: Setting Program & Test Trang 55

4.2.2. Test order computer:


Perform:
Choose the type of food, choose the specific food and quantity - click "Order"
The human computer will display red and the blank display will be as default

When you have not selected the computer to order, the application will display as:

4.2.3. Test payment, feedback, switch computer, discount


Perform:
You can switch from your computer to another empty computer when you intend
to sit on another computer. There are also discounts on bills.

Cyber game management


Chapter 7: Setting Program & Test Trang 56

In the payment section, it can be divided into 2 types of payment with cash
payment and Momo. Alternatively, it is possible to give feedback to our app with the
feedback button

4.2.4. Test Statisticize bill:


Perform:
View statistics by day or week or month or year of Cyber Game:

Cyber game management


Chapter 7: Setting Program & Test Trang 57

Cyber game management


Chapter 7: Setting Program & Test Trang 58

4.2.5. Add, delete, update items:


Perform: You can add, remove, edit dishes and change the names or prices of
items in Cyber Game. In addition, for more convenience, you can search for items.

4.2.6. Add, delete, update accounts:


Perform: You can add, remove, edit dishes and change the names or prices of
accounts in Cyber Game.

Cyber game management


Chapter 7: Setting Program & Test Trang 59

Cyber game management


Chapter 8: Conclusion Trang 60

5. CHAPTER 8: CONCLUSION:
5.1. Knowledge and skills:
Through the process of implementing the project Management of a store that sells
and rents movie discs, the student group has accumulated extremely useful knowledge
and experiences:
Know the process of building and designing software
Practice interviewing and teamwork skills
Practice programming on C# with 3-layer model - Apply Design Patterns to the
project

5.2. Pros and cons:


Pros: The team building program has the following advantages:
Functions are managed by tabs, so users can easily manipulate them
The program has many functions, fully meeting the requirements of users
Function buttons are attached to icons, creating recall and attracting users
Cons:
The program must install a database management system and must create a
database before running
The program uses a lot of images, so sometimes the form loads a bit slow
The program is limited in delete functions

5.3. Development
Because the first time building software and programming experience is still
weak, the program inevitably makes mistakes. In the future, the team will try to perfect
the program and update more features, such as: helping store owners see the activity
history of customers and employees, updating the function of creating database backup
files, Complete data deletion function. The program also depends on the creation of the
database, so next time the team will make the program run without depending on the
database creation and the SQL Server version.

Cyber game management


Chapter 8: ConclusionReferences Trang 61

6. REFERENCES
[1] https://refactoring.guru/
[2] How Kteam - Free Education | How Kteam
[3] http://stackoverflow.com/
[4] Design Patterns & Refactoring (sourcemaking.com)

Cyber game management


Chapter 8: ConclusionReferences Trang 62

7. JOB TABLE
Name Work Report assignment

1. Database design Demo application. Pros


2. Apply singleton pattern & cons, development
Nguyễn Thành
3. Code fComputerManager
Thiện
4. Package the program
into an installation file
1. Support database design Present report using 3
2. Apply decorator pattern pattern: Decorator
Lê Thiện An 3. Support code fComputer
Manager
4. Code fAdmin
1. Design interface Present report using 3
2. Support apply singleton pattern pattern: Singleton
Lê Duy Tường 3. Code fLogin
4. Code DAO & DTO

1. Code Payment Present report using 3


2. Support design database pattern: Facade
Đỗ Trần Công
3. Support code fAdmin
Phương
& fComputerManger
4. Apply façade pattern

Cyber game management

You might also like