Hotel Reservation Android App Report
Hotel Reservation Android App Report
Hotel Reservation Android App Report
Submitted by:
Biruk Tesfaw
ATR/4514/05
ATR/3676/05
Dawit Samuel
ATR/1378/05
Yared Abera
ENR/1849/04
Submitted to:
Sahilu Wendeson
29 /12 /2016
Addis Ababa
Ethiopia
Part 2: Class
Diagram
50%
Yared
Abera
50%
Part 3: System
Architecture and
design
30%
70%
Part 4: User
interface
20%
80%
Part 5: Testing
Design
Part 6: Project
Management
33%
67%
50%
50%
Table of contents
Individual Contributions Breakdown............................................................................ i
Table of figures........................................................................................................... iii
List of tables.............................................................................................................. iv
1.
2.
Interaction Diagram............................................................................................. 1
1.1.
Sequence Diagrams....................................................................................... 1
1.2.
Design Principles............................................................................................ 9
Class Diagram.................................................................................................... 10
2.1.
3.
Description................................................................................................... 11
System Architecture........................................................................................... 12
3.1.
3.2.
Concurrency................................................................................................. 13
4.
Testing Design.................................................................................................... 13
5.
6.
5.1.
5.2.
5.3.
Plan of Work................................................................................................. 19
5.4.
References......................................................................................................... 21
Table of figures
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
1:UC1............................................................................................................... 1
2:UC2............................................................................................................... 2
3: UC3.............................................................................................................. 3
4: UC 4 & UC 5................................................................................................. 4
5: UC 6............................................................................................................. 5
6: UC 8............................................................................................................. 6
7: UC 9............................................................................................................. 7
8: UC 10........................................................................................................... 8
9: Class Diagram............................................................................................ 10
10: Architecture For The Web App.................................................................12
11: Client-Server Architecture........................................................................12
12: Plan of work............................................................................................. 20
List of tables
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
1: user authentication..................................................................................... 13
2: Display list on app....................................................................................... 14
3: Search for hotels......................................................................................... 14
4:Display current data..................................................................................... 15
5: Book a room................................................................................................ 15
6:Connect multiple cell phones.......................................................................16
7: Write review................................................................................................ 16
8: Add hotel data............................................................................................. 17
9:Edit hotel data.............................................................................................. 17
10: Manage profile.......................................................................................... 18
11: View Hotels Data....................................................................................... 18
1. Interaction Diagram
1.1. Sequence Diagrams
UC 1
Figure 1:UC1
Description
The above interaction diagram is for Use case 1 Search info. The user inputs the
search parameters. The search filter filters out wrong characters and wrong inputs.
The system or database searches for the desired hotels and displays the results
from the best much down.
UC2
Figure 2:UC2
Description
The above interaction diagram is for Use case 2 Signup. User clicks on sign up. Then
user enters personal information on the signup form. If the entered information is
incorrect displays error message. If information is valid displays user profile created.
UC 3
Figure 3: UC3
Description
The above interaction diagram is for Use case 3 give feedback. The user opens the
leave review dialogue box. If the comments or review is longer than the allowed
number of characters it returns invalid comment to the user. If the comment is valid
UC 4 &UC 5
Figure 4: UC 4 & UC 5
Description
The above interaction diagram is for Use case 4 Online Payment and Use case 5
Book rooms. User logs in to page. System authenticates validity of the user. If the
user is valid the user moves on to book rooms. Check balance checks if the user has
sufficient balance. If the user has sufficient balance the user books the room and
GUI displays room booked. But if user doesnt have sufficient balance it displays
insufficient balance.
Figure 5: UC 6
Description
The above interaction diagram is for Use case 6 Edit Account. User logs into
account. User gets authenticated. If user is valid, user edits personal information
such as names and bank account or paying information. The system then displays
updated information.
Figure 6: UC 8
Description
The above interaction diagram is for Use case 8 Update Profile. Hotel admin logs in
to page. The information gets authenticated. If the submitted information is invalid
system displays error message. If user input is correct, hotel admin updates
information of their hotel. The system then displays successful information.
Figure 7: UC 9
Description
The above interaction diagram is for Use case 9 browse information. Hotel admin
logs into page using the correct information or username and password. If
information submitted is incorrect system displays error message. After user gets
authenticated, user searches or inputs for specific information concerning their
hotel. System displays the results or information.
UC 10
Figure 8: UC 10
Description
The above interaction diagram is for Use case 10 Authorize Hotels. System admin
logs in to system. User gets authenticated. System admin then authorizes or adds
new hotels to the system. If successful system the displays the successful
information.
2. Class Diagram
2.1. Description
User user class is a class that parents customer and hotel manager classes. It has
the string attributes name, username and password. The user class employs the
method updateAccount() which allows the user to make changes to their account
this method is implemented both in hotel manager and customer classes.
Customer has the method search() which runs searches and displays data, it also
has the method make reservation which would call other functions related to
reservations. Customer has methods to implement viewing and writing reviews.
Hotel Admin has methods
manageRoomType() - edits the type of room
viewReservations() retrieves reservation data about the hotel in question
viewCustomerInfo() retrieves information of customer of the hotel the hotel
manager is responsible for
manageServices() adds services and offers to hotels attributes
offers() allows hotel manager to make offers to customers
Hotel has attributes keeping track of the hotels address, name and location
(possibly coordinates) and parents rooms which connect via its id.
Room has attributes pertaining to room #, type of room, price of booking the
room and whether or not it allows smoking. It employs the method getAvailability()
which returns a Boolean describing current status of the room
Reservation has attributes that keep track of check-in time, check-out time, the
customers id and the total cost. Reservation class employs a method reservation
status() which returns true if reservation process goes through flawlessly meaning
no flags on payment.
System Admin has user name and password for authentication and has methods
allowing for addition and removal of hotels and hotel managers.
Payment has the attribute payment type declaring the type of payment to be
performed and attribute payment status holding the value of successful payment.
3. System Architecture
The architecture that we use for the web app is the three tier architecture, the
tiers are the presentation tier, the business tier & the data tier. The role of the
presentation tier is providing an interface that the user can interact with where as
the Business tier is where the main business logic exists .The data tier which is
responsible for interacting with a database, so data persistence is executed in this
tier.
The advantage of using three tier architecture is separation of concern. The
presentation tier can be changed without changing the other tiers similarly the
business logic can change without affecting the presentation tier, so this separation
into components will help the division of tasks even further, aids in maintenance of
the system and prompts scalability and extensibility.
Finally our web app is also a Restful web service meaning it provides access
to any device irrespective of its platform. In the REST architectural style, every
piece of information is a resource, and these resources are addressed using Uniform
Resource Identifiers (URIs), typically links on the Web. The resources are acted on
by using a set of simple, well-defined operations. The REST client-server
architectural style is designed to exchange representations of these resources using
a defined interface and protocol. These principles encourage RESTful applications to
be simple and lightweight, and to have high performance.
3.2. Concurrency
In android the main thread is the ui thread it is in this thread all views are drawn so
any task that takes longer time to complete like network I/o file I/o will block the
main thread and as a result causes hang-up and freeze up to the ui . Therefore in
order for the ui to be fluid and responsive this tasks should run on separate
background thread.
Hardware Requirement
4. Testing Design
user authentication
Test covers : security
Assumption: Hotel manager is trying to log in to his/her account to view or
make changes to their hotel.
Unit Testing
Steps :
Hotel manager enters user authentication page
Hotel manager inputs user id and pass
Expected : if user id and pass check out Hotel manager gets access to next
page
Fails if :
System doesnt allow access with correct id and pass entered
System allows access with fake credentials
Table 1: user authentication
Press search
Expected : app runs search, retrieves data from the database and displays a
list of hotels matching search parameters
Fails if :
System cant run search
System presents search results not matching parameters
Table 3: Search for hotels
Book a room
Test covers : functionality
Assumption : user has chosen a room and is trying to book online
Functional Testing
Steps :
Enter payment information
Confirm payment
Expected : once user enters payment data and payment comes through room
is set to be booked and database updated
Fails if :
All affected members of database are not updated
Table 5: Book a room
Write review
Test covers : functionality
Assumption : user wants to post a review about a hotel or about the app itself
and has navigated to the right page to do that
Unit Testing
Steps :
Write comment and post
Expected : review is added and available for viewing by others
Fails if :
Review is not posted on site
Table 7: Write review
Manage profile
Test covers : user interface
Assumption : Hotel manager wants to change user name or pass and has
navigated to the right page
Unit Testing
Steps :
Enter new information
Confirm change with old password
Expected : user name and pass get updated and functional on next log in
Fails if :
System doesnt allow login with new credentials
old pass and username still work
Table 10: Manage profile
6. References
1. Report 2,Prepared forPersonal Health Monitoring,Prepared by: Yuanxi Li,
Xiaoran Fan, Lun Li, Jingsong Yuan, Tian Xie,Oct. 22,2014
2. beginning java EE 7, by Antonio Goncalves
3. UML - Interaction Diagrams, Tutorials Point
4. Slides on interaction diagram, class diagram Supplied to us by Sahilu
Wendeson
5. Software Architecture in Practice, Book by Len Bass, Paul Clements, and Rick
Kazman
6. Just Enough Software Architecture: A Risk-driven Approach, Book by George
Fairbanks
7. A Practitioner's Guide To Software Test Design, Book by Lee Copeland