1. Trang chủ
  2. » Luận Văn - Báo Cáo

Design data structures, algorithms and build a hotel

49 0 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 49
Dung lượng 3,11 MB

Nội dung

Software feature:- To login as a staff in a hotel - Can manage the hotel as a manager - Update information ID, Name, Password, Address, Age, Gender, Day Joined - Update room Decide to l

Trang 1

FACULTY OF INFORMATION TECHNOLOGY

FINAL TERM PROJECT Course name: Data Structures and Algorithms

DESIGN DATA STRUCTURES, ALGORITHMS AND BUILD A HOTEL

22110048 Nguyen Hoang Lam 100% 22110060 Nguyen Tan Phat 100% 22110080 Ly Dang Trieu 100%

Ho Chi Minh City, December 2023

Trang 2

LIST OF MEMBER

Class: Monday – Lesson 9-12

- Contribution (%) = 100%: Percentage level of each student participating - Leader: Nguyen Tan Phat

Hoang Van Dung

No.Student IDStudent NameContribution(%)

Trang 3

To fully adapt this topic and report, we would like to express our sincere thanks to lecturer, associate professor Hoang Van Dung, who directly supported us throughout the process of working on the topic We appreciate you for guiding us to complete this topic, always answer questions and provide timely comments and corrections, help us overcome our shortcomings and complete it on time.

We finished the topic and report in a short period of time, with lack of knowledge and experience in implementing a software project Therefore, there will be some unpredictable mising from us, so we look forward to receive comments from you so that we can do better for our next projects.

Finally, we respectfully wish all teachers good health and success in the career of cultivating people Once again we sincerely thank you.

Ho Chi Minh City, December 2023 Group 10

Nguyen Hoang Lam Nguyen Tan Phat Ly Dang Trieu

Trang 6

FIGURE LIST

2.1 Linked list presentation 2.1 Multi-Linked list presentation

Trang 7

TABLE LIST

1.1 Planning table 1.2 Task division table 3.1.1 Struct table

3.1.2 Manager function table 3.1.3 Staff function table 3.1.4 Room function table 3.2.1 Main menu display 3.2.2 Manager text file 3.2.3 Manager login display 3.2.4 Manager options display 3.2.5 Edit manager display 3.2.6 Read manager data display 3.2.7 Add manager display 3.2.8 Remove manager display 3.2.9 Manager list display 3.2.10 Write manager file display 3.2.11 Save file checker 3.2.12 Hotel income display 3.2.13 Edit staff display 3.2.14 Add new staff display 3.2.15 Delete staff display 3.2.16 Sort list by ID 3.2.17 Load the staff display 3.2.18 Save the staff display 3.2.19 Save file checker

Trang 8

3.2.20 View staff information 3.2.21 Receptionist menu display 3.2.22 Room management menu display 3.2.23 All rooms list display

3.2.24 All booked rooms display 3.2.25 All rented rooms display 3.2.26 Check-in display

3.2.27 Check-in successfully show 3.2.28 Reserve room display 3.2.29 Check-out room display 3.2.30 Reset room display 3.2.31 Service staff menu display 3.2.32 Services menu display 3.2.33 Service used display

Trang 9

A HEADING

1 Reason for choosing topic:

Technology plays a huge role in our everyday lives It has also become integrated into the daily operations of hotel management By leveraging the latest technologies, businesses can streamline operations, increase efficiency, and improve customer service This helps to reduce costs, increase revenue, and ensure long-term profitability Therefore, our group decided to choose the topic which to design data structures, algorithms and build a hotel management software Applying technology to hotel management help user to optimize the amount of manual management on paper that waste lots of time, narrow storage space, avoid losing data, reduce costs and human resources, so that improve work efficiency and product quality.

2 Software feature:

- To login as a staff in a hotel - Can manage the hotel as a manager

- Update information (ID, Name, Password, Address, Age, Gender, Day Joined) - Update room ( )

Decide to let the guest rent, book or return the room or not - Caculate income

3 Expected interface:

- Menu to choose which position to login as (manager, accountant, security…) - Login console (Type ID, Pasword)

- Manager interface

+ Can hire or fired the staff, can search for other staff ìnormation - Receptionist interface

+ Can see the room status (rented/booked/empty) so that decide to let the guest rent or book the room

- Accountant interface

+ To caculate revenue and expenditure - Service staff interface

+ Guest can use the service so that the income will increase

Trang 10

Code, write an asingment, make presentation, fix code bugs

Nguyen Hoang Lam Design view level Design logical level

Trang 11

B CONTENT

1 Project descriptions:

A hotel need to manage and control the people who work in the hotel and arrange all the rooms in the hotel, so that it needs to have a software to manage the manager, the accountant, the receptionist, the service staff and rooms including these information:

- All the staffs and managers at login console such as account, password, information, salary

-The manager such as edit manager list, edit every staff list and check the hotel

-The receptionist such as rent room, book room, reserve room, show all room-The service staff such as using the service

-Rooms such as ID, type, status, day begin, day end, money

2 Background knowledge:2.1.Programming method:

Data Structures and Algorithmsin introduce abstract concepts for data organization and manipulation, to show how these concepts are useful in problem solving.

- Basic – used data structures: Lists, Stacks, Queues, Trees, Hash tables - Algorithms in data structures: Sorting, searching, inserting, deleting - Apply data structures to solve practical problems

- Programming language: C++

2.2.Linked list:

Linked list is using a structure which allows to store elements in a list A linked list is made of nodes that are pointing to each other - Link: each link of linked list can store data called an element

- Next: every link of linked list store a link to the next element called Next - Head: a linked list such as links link to first element called Head

2.1 Linked list presentation

Trang 12

Linked list’s basic functions:

- Insertion: insert an item at the beginning, at the end, after a node - Removing: delete an item at the beginning, at the end, after a node - Searching: Search a node in a list

2.3 Multi-Linked list:

- Inserting into this structure is very much like inserting the same node into two separate lists In multi-linked lists it is quite common to have back-pointers

2.2 Multi-Linked list presentation

Trang 13

//Add manager to the front of the list

void addFirst(string username, string password) {

Trang 14

NodeGD* temp = new NodeGD{ username, password, head };

Trang 15

head = temp; total++; }

//Add manager to the last of the list

void addLast(string username, string password) {

NodeGD* temp = new NodeGD{ username, password, nullptr }; if (head == nullptr)

head = temp; else {

NodeGD* move = head; while (move->next != nullptr)

// Add manager to position pos of the list

void addItem(int pos, const string& username, const string&

NodeGD* move = head; for (int i = 0; i < pos - 1; i++) {

//Delete manager at position pos void deleteItem(int pos) { if (pos < 0 || pos >= total) {

cout << "Invalid position for deletion" << endl; return;

Trang 16

NodeGD* current = head; for (int i = 0; i < pos - 1; i++) {

//Read data from manager text file

bool ReadFileToLinkedList(LinkedListGD& GiamDocList) { string username, password; if (iss >> username >> password) {

Trang 33

If we want to add a manager, we have to input the new manager’s name and a password for the account too

3.2.7 Add manager display

If we want to remove a manager, we just need to type the manager’s name and confirm the deletion

3.2.8 Remove manager display

Then we can display all the manager to check the manager list if it has changed like what we did

3.2.9 Manager list display

Trang 34

And to save all the data of the manager we have edited we will overwrite it into the manager text file

3.2.10 Write manager file display

To ensure that user want to save this file to the text, we include the checker in order to make sure that the user won’t forget to save their files

3.2.11 Save file checker

If we choose to see the income it will show the money of all the room that we have gain before

Trang 35

3.2.12 Hotel income display

If we choose to edit the staff information, the display of some options are different from the rest while editing the manager Take the security staff for an example:

3.2.13 Edit staff display

Trang 36

Unlike adding a manager, adding a staff require to input the ID, name, password, address, age, gender, day joined

3.2.14 Add new staff display

And with the deleting a staff you will have to input the ID and the name of the staff

3.2.15 Delete staff display

After we add some more staff the list would be a mess, but we could sort the list again by the ID, if the list is sorted by ID already it will notify that

Trang 37

3.2.16 Sort list by ID

We add a checker to check whether the user want to load or not

3.2.17 Load the staff display This is the same with the previous but for the written one

Trang 38

3.2.18 Save the staff display

And to ensure that user want to save this file to the text, we include the checker in order to make sure that the user won’t forget to save their files

3.2.19 Save file checker

2.3.Login as guard:

If we login as a guard or as other staffs there is alway have an option, it is view the user information

Trang 39

3.2.20 View staff information

2.4.Login as receptionist:

If we login as a receptionist, there are 2 options such as view your information and manage rooms

3.2.21 Receptionist menu display

When we choose to manage rooms, there are 7 options such as check-in a customer, reserve a room, view all rooms, view all booked rooms, view all rented rooms, check-out a customer and reset the room

3.2.22 Room management menu display We can choose to view all the room, view all booked or rented rooms

Trang 40

3.2.23 All rooms list display

3.2.24 All booked rooms display

Trang 41

3.2.25 All rented rooms display

Trang 42

Now if we choose to check-in a customer the software show the list of the rooms those are empty and ask to input the ID of the room, after we choose a room it’s status will change to rented and the day begin change to today

3.2.26 Check-in display

And the room status will be changed to rented and the day begin will set to today and the money will be updated 5 dollars for single room and 7 dollars for double room respectively

Trang 43

3.2.27 Check-in successfully show

Beside that, if the guest want to reserve a room the software will show the list of the empty room and we have to input room ID, reservation date, number of day(s) for the reservation and confirm it If the reservation date is in the past it will force you to type again.

Trang 44

3.2.28 Reserve room display

If we choose to check-out, the software will display the rented room list, then we can choose the room that need to check out and it will calculate the payment and show it

3.2.29 Check-out room display

Trang 45

And the last option is reset the room just to clear all of the room data

3.2.30 Reset room display

2.5.Login as service staff:

If we login as service staff there are 2 options such as view your information and create service for customer

Trang 46

3.2.31 Service staff menu display

When we choose to creat service, the software will show the service menu display with 6 options such as room service, special occasion services, tech support, culinary experiences, communication services, personal shopping services

3.2.32 Services menu display

Those option are the same when we choose an option there are a menu which has more options for the services, and when you choose an option the payment that room has to pay will update For an example with the first option

Trang 47

3.2.33 Service used display

Trang 48

D CONCLUSION 1 Conclusions:

Our group has solved most of the basic requirements have been set Beside that, we added some useful features for the software such as login console, staff and manager information editing.

- The display is clearly that every user can easily appraoch - The data is well organized that can be finded quickly - The code working well and show the right result Cons:

- Few features are not working logically - Some functions are not fully automated

2 Future development:

- Optimize data when running the software

- Add the rented history for every room, upgrade the calculator so that it can calculate the money for a room in difficult conditions

- Add more features to the function so that the input would be more logical

Trang 49

1 Lecture note Data Structures and Algorithms course, chapter 2,3 2 Giao diện phần mềm EzCloudhotel

Ngày đăng: 09/04/2024, 16:11

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w