-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CS2113-F10-3] TARBS #26
base: master
Are you sure you want to change the base?
Changes from 94 commits
5c616f8
80c25f7
6035a3d
4fda6aa
e8f9de0
8407b47
d40c81f
cd544ae
06dd055
354e627
d41ab0e
8c7ce9b
b4799bf
5628838
146fd7c
9142291
aa628d0
66bf249
20ecd8b
ba42c73
40314b7
5932e94
4b66d08
2b759a9
b9fc095
212b268
2948ac2
add2be9
d809612
9b7ebe6
64ba090
098dc21
3006887
6f15baa
a73a44c
122fc40
03f2e88
d01889c
4c85f6b
300b235
fd4f689
acdd0fb
d6f852f
9654fc6
6aa0c39
54f4643
bc3456c
66c0907
e449f68
87c824f
20ee0ca
175cf40
2b93114
b6b12f9
297d751
b371ad8
c6b416a
a75449a
77b29ee
1f74e31
9077526
de7169f
d123fc4
9cd44c1
85419f6
42bcaef
24aea0c
f9486b4
6e0658c
86fc569
5770959
24cd456
00eaf19
b8da5d6
c58d435
dcabde9
b813516
3f89b4e
8876ca1
da2c5b8
66050d9
bfd3199
cb5c05c
8baf8b1
15874e3
896c5ea
8e581cb
00ed778
a9c753b
340d229
2c872a5
32a3257
0020ae1
708bd52
39e9523
cb25cf6
c2dfe9a
e3b8a37
37f4bdc
5e4da5f
bab17d8
6569dea
eb94f62
3b1d3d8
be7cda6
40ed8a8
608e954
a690e3b
7181984
25c7843
c0fc452
1aa1306
728cb32
c3a5171
231b364
74cf9ab
4c09fe0
f905639
733bd63
1c40c95
b6b8dde
78bfb2e
b60b0ae
15f00bd
2764c3e
8154180
b1dc964
a90d94e
ece0522
9e0ab99
d7d75b8
ab804e0
e065dc5
44cce7b
0a820ca
142421e
10fac69
2b954f0
0a94da3
724c9cb
885c839
6f3ee1a
17b7f09
141351b
5424332
ba84d08
0d5af47
ecd630f
55e6f2a
ca39a96
0002a5e
82791e8
57de34d
c04d893
ea1ce11
76eb910
4f0cdcf
e46e412
98f99e4
0445a59
af9f247
67dabef
effd44e
b01ae46
46027b4
c9678ea
c52e37a
e181cf4
c6477c3
378da6f
09fbaac
2c01e2c
5c5b2ac
54c8511
d3c4822
25ce741
9174973
580c48d
da9996a
69994cc
c87982b
4835e4c
7cd5b49
a961318
dcb082f
22ab575
fe73ca9
faeab7e
b0feb67
cc1434c
fb358a7
d0a073b
231098d
200d75a
db95f13
c6d88d7
bd890aa
28e8c64
8d02948
f5d4f48
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,5 @@ bin/ | |
|
||
/text-ui-test/ACTUAL.txt | ||
text-ui-test/EXPECTED-UNIX.TXT | ||
|
||
.vscode/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Experience Seoul | 1 | 01/4/2022 | 08/4/2022 | Marriott Seoul | 100.11 | Korea | 20 | 19$1,Tim,98765432,3%1,Brendan,12345,3%1,Tim,91234567,10%1,Bren,2468,3% | ||
Conquer Summits | 2 | 05/5/2022 | 11/5/2022 | Hotel Schweizerhof Luzern | 80.0 | Switzerland | 20 | 6$2,Tim,98765432,3%2,Brendan,12345,3% | ||
Back To Our Roots | 3 | 01/4/2022 | 20/4/2022 | Hotel in Malaysia | 50.0 | Malaysia | 100 | 6$3,Tim,98765432,3%3,Brendan,12345,3% |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
# About us | ||
|
||
Display | Name | Github Profile | Portfolio | ||
--------|:----:|:--------------:|:---------: | ||
![](https://via.placeholder.com/100.png?text=Photo) | John Doe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | Don Joe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | Ron John | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | John Roe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | ||
![](https://via.placeholder.com/100.png?text=Photo) | Don Roe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | ||
| Display | Name | Github Profile | Portfolio | | ||
| --------------------------------------------------- |:---------------:|:-----------------------------------------:| :-------------------------------: | | ||
| ![](https://via.placeholder.com/100.png?text=Photo) | Ege Demirkirkan | [Github](https://github.com/edemirkirkan) | [Portfolio](docs/team/johndoe.md) | | ||
| ![](https://via.placeholder.com/100.png?text=Photo) | Don Joe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md) | | ||
| ![](https://via.placeholder.com/100.png?text=Photo) | Timothy Chang | [Github](https://github.com/timchang27) | [Portfolio](docs/team/timothy.md) | | ||
| ![](https://via.placeholder.com/100.png?text=Photo) | Brendan Ang | [Github](https://github.com/bbawj) | [Portfolio](docs/team/brendan.md) | | ||
| ![](https://via.placeholder.com/100.png?text=Photo) | Chin Tai Ann | [Github](https://github.com/chintaiann) | [Portfolio](docs/team/chintaiann.md) | |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,3 +1,4 @@ | ||||||
# Travel Agency Reservation Booking System (TARBS) | ||||||
# Developer Guide | ||||||
|
||||||
## Acknowledgements | ||||||
|
@@ -7,32 +8,127 @@ | |||||
## Design & implementation | ||||||
|
||||||
{Describe the design and implementation of the product. Use UML diagrams and short code snippets where applicable.} | ||||||
### Basic Class Diagram | ||||||
![image](https://user-images.githubusercontent.com/53790951/160271319-4a351f51-afd7-4e04-9451-f04143146551.png) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remember to use standard UML syntaxes taught in the module. Some of the notations are not compliant with the notation covered in the module. |
||||||
|
||||||
|
||||||
## Product scope | ||||||
### Target user profile | ||||||
|
||||||
{Describe the target user profile} | ||||||
- Studies in a non-IT field | ||||||
- Usually works alone | ||||||
- Working in a small travel agency that offers affordable budget travel packages to only some countries | ||||||
- Handles many customers a day | ||||||
- Is unfamiliar with using CLI apps | ||||||
|
||||||
### Value proposition | ||||||
|
||||||
{Describe the value proposition: what problem does it solve?} | ||||||
- Travel agencies often have to manage multiple customers and their respective bookings or plans. | ||||||
- For employees of the travel agencies to track and record customers’ booking of travel packages. | ||||||
|
||||||
|
||||||
## User Stories | ||||||
|
||||||
|Version| As a ... | I want to ... | So that I can ...| | ||||||
|--------|----------|---------------|------------------| | ||||||
|v1.0|new user|see usage instructions|refer to them when I forget how to use the application| | ||||||
|v2.0|user|find a to-do item by name|locate a to-do without having to go through the entire list| | ||||||
|v1.0|new user|Add reservation for a customer with basic information such as name, country etc. |Make a reservation| | ||||||
|v1.0|new user|Print a list of all current and available travel packages |View all current travel packages and tell customers about our travel packages with one look| | ||||||
|v1.0|new user|Remove an existing reservation|Remove information that we do not need anymore| | ||||||
|v1.0|User ready to start using the app| Find out which travel packages are available for the specific location and duration|Make a recommendation of travel package to customers based on their desired location| | ||||||
|v1.0|new user|Search for a specific travel package|Make recommendations to a customer based on their desired travel package requirements| | ||||||
|v2.0|User ready to start using the app|Upload existing reservation data|Get started quickly| | ||||||
|v2.0|User ready to start using the app|Make reservations based on custom input and edit them where necessary|Get familiar with inputting| | ||||||
|v2.0|User ready to start using the app|See the changes I made from the previous day|Continue working| | ||||||
|v2.1|Expert user|Create and use shortcuts|Quickly enter the details needed for a reservation and query any details I might need for an existing reservation| | ||||||
|v2.1|Expert user|Update ratings of travel packages based on customer feedback|Provide a better recommendations for future customers| | ||||||
|v2.1|Expert user|Ascertain the error in my input based on the error messages from the application|Quickly troubleshoot any mistakes that would slow down my work| | ||||||
|v2.1|Expert user|View all reservations currently under a specific travel package|Optimize that travel package according to user’s feedback| | ||||||
|v2.1|Expert user|I can build a customized travel package based on what the customer wants|It appeals to customers who do not want our existing tour packages| | ||||||
|v2.1|Expert user|Add in hotels to the list of available hotel options|Update the itinerary | | ||||||
|v2.1|Expert user|Add in countries to the list of available countries|Update the itinerary| | ||||||
|v2.1|Expert user|Sort all reservations according to month|Analyze trends throughout the year| | ||||||
|v2.1|Expert user|Mark a reservation as ‘completed’|Access both completed and ongoing reservations| | ||||||
|v2.1|Expert user|Compute the price of custom travel packages|Get a rough estimate for what to charge the customer| | ||||||
|
||||||
## Non-Functional Requirements | ||||||
|
||||||
{Give non-functional requirements} | ||||||
### Performance Requirements | ||||||
- Should work on any mainstream OS as long as it has Java 11 or above installed. | ||||||
|
||||||
### Usability | ||||||
- A user with above average typing speed for regular English text (i.e. not code, not system admin commands) should be able to accomplish most of the tasks faster using commands than using the mouse. | ||||||
- Prompts and instructions must be in proper and concise sentences for ease of understanding. | ||||||
|
||||||
## Glossary | ||||||
|
||||||
* *glossary item* - Definition | ||||||
* Packages - Travel Package within the agency's database | ||||||
* Reservations - Reservation of travel package made by one customer through the app | ||||||
|
||||||
## Instructions for manual testing | ||||||
|
||||||
{Give instructions on how to do a manual product testing e.g., how to load sample data to be used for testing} | ||||||
|
||||||
### Summary of User Commands | ||||||
|
||||||
| Command | Format Examples | | ||||||
| ------- | --------------- | | ||||||
|packages|packages <br/> (prints details of all packages)| | ||||||
|info|info {num} (num < number of available packages) <br/> e.g. info 2 | | ||||||
|add|add {package_name},{ID},{startDate},{endDate},{hotel},{price},{country},{vacancies} <br/> e.g. add Skiing Trip,1,23/2/2022,24/2/2022,hotelName,90.99,Singapore,20 <br/> adds a TravelPackage| | ||||||
|delete|delete {num} (num < number of available packages) <br/> e.g. delete 2 <br/> delete a TravelPackage| | ||||||
|reserve|reserve {package_id},{contact_name},{contact_number},{number_pax} <br/> e.g reserve 3,John,91234567,3| | ||||||
|remove|remove {package_id},{contact_number} <br/> e.g remove 1,8888888 <br/> remove an existing reservation| | ||||||
|reservations|reservations {package_number} <br/> eg. reservations 2 <br/> print all reservations for a given travelPackageID| | ||||||
|
||||||
### Test Case 1 | ||||||
|
||||||
New employees can enter `packages` to view all available packages by the agency. | ||||||
|
||||||
Additionally, they can enter `info {package number}` to view more in-depth information about the package. | ||||||
|
||||||
![image](https://user-images.githubusercontent.com/64303732/161110520-8ed18ddc-b356-43d5-95ed-7df5ca2de91d.png) | ||||||
|
||||||
Employees can also input new reservations using `reserve {package_id},{contact_name},{contact_number},{number_pax}` | ||||||
|
||||||
They can then view and verify reservations for that package using `reservation {package_number}` | ||||||
|
||||||
![image](https://user-images.githubusercontent.com/64303732/161111482-a2f9600d-d1f0-45b1-9a51-ef28848e4b57.png) | ||||||
|
||||||
![image](https://user-images.githubusercontent.com/64303732/161111551-c1acfd1e-90f3-426e-b8e3-175f050dba42.png) | ||||||
|
||||||
|
||||||
## Feature - Help Command | ||||||
Aim: Displays a list of all available commands that the user can refer to as a guide | ||||||
|
||||||
![image](https://user-images.githubusercontent.com/64303732/161110894-f9226a6c-e9f2-4cf3-9158-72cc8df19604.png) | ||||||
|
||||||
|
||||||
|
||||||
## Feature - Storage | ||||||
#### Initialisation (Loading Data) | ||||||
The sequence diagram that shows how `Storage` is created and the data is loaded from the saved files when the program is initialised is shown below: </br> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps you mean
Suggested change
|
||||||
![](LoadFileSeqDiag.png) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider using a consistent UML diagramming software unless the primary has limitations. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||||
|
||||||
1. `TARBS` creates a Storage object with the relevant file name (`filePath`). | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||
2. `TARBS` then calls the `createPackages()` method of the Storage class | ||||||
3. `storage` will call the `parseSavedFile()` method, which initiates a while loop that iterates through the text file and processes the string data using the respective `parse` methods. | ||||||
4. A new `TravelPackage` object is constructed with the relevant data. | ||||||
5. A new `Packages` object is created using the `TravelPackage` object and returned back to `TARBS`. | ||||||
|
||||||
#### Saving data | ||||||
The sequence diagram that shows how `Storage` is used to save the current list of travel packages and reservations is shown below: </br> | ||||||
|
||||||
![](SaveFilesSeqDiag.png) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as previous comment |
||||||
|
||||||
1. `TARBS` calls the `savePackageToFile()` method of `storage`, passing in the `packages` object. | ||||||
2. `storage` will then use a loop to iteratively retrieve the data in string format from the individual `TravelPackage` objects. | ||||||
3. `storage` will create a new `FileWriter` object to write the string data into a text file. | ||||||
|
||||||
## Feature - Parser | ||||||
The sequence diagram shows an example of how a user input is parsed and returns a new `Command`. | ||||||
|
||||||
For simplicity, `ByeCommand` is shown here: | ||||||
|
||||||
![image](https://user-images.githubusercontent.com/53790951/160289728-5a17b2ea-0599-48f4-a18b-cadfbbcbfb11.png) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
theme: jekyll-theme-minimal |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Tai Ann - Project Portfolio Page | ||
|
||
## Overview | ||
|
||
|
||
### Summary of Contributions |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
mugg | 2 | 1 | mariott | 50.0 | korea | 30 | 0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1 | 123 | bawj | 98765432 | 2 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package seedu.duke; | ||
|
||
public class Customer { | ||
private String customerID; | ||
private String name; | ||
private String contactNumber; | ||
|
||
public Customer(String customerID, String name, String contactNumber){ | ||
this.customerID = customerID; | ||
this.name = name; | ||
this.contactNumber = contactNumber; | ||
} | ||
|
||
public String getCustomerID() { | ||
return customerID; | ||
} | ||
public String getName() { | ||
return name; | ||
} | ||
public String getContactNumber() { | ||
return contactNumber; | ||
} | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package seedu.duke; | ||
import java.util.ArrayList; | ||
|
||
public class Help { | ||
private ArrayList<String[]> desc; | ||
|
||
public Help(){ | ||
this.desc = new ArrayList<>(); | ||
String[] packages = {"View all available packages", "packages"}; | ||
desc.add(packages); | ||
String[] info = {"View package details", "info {num}"}; | ||
desc.add(info); | ||
String[] add = {"Add a new package", "add {package_name} {country} {duration} {price} {vacancies}"}; | ||
desc.add(add); | ||
String[] delete = {"Delete a package", "delete {num}"}; | ||
desc.add(delete); | ||
String[] reserve = {"Create a reservation for a package", "reserve {package_number},{contact_name},{contact_number},{number_pax}"}; | ||
desc.add(reserve); | ||
String[] remove = {"Remove a reservation","remove {travelpackageID},{contact_number}"}; | ||
desc.add(remove); | ||
String[] reservations = {"Shows all reservations for a package", "reservations {package_number}"}; | ||
desc.add(reservations); | ||
} | ||
|
||
public void printHelp(){ | ||
for (String[] strings : desc) { | ||
String foo = String.format("%-50s %s", strings[0], strings[1]); | ||
System.out.println(foo); | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think more descriptive roles can be used to describe these relationships, since things like
uses
orinstantiates
can already be implied by the arrows? Also, ifinstantiates
implies an association, consider using a solid line for it instead.