From 85b66bf2d050c56b7264fe82455a048d1ebd9acb Mon Sep 17 00:00:00 2001 From: TIANYAO ZHANG <88520881+ZHANGTIANYAO1@users.noreply.github.com> Date: Sat, 13 Apr 2024 13:07:54 +0800 Subject: [PATCH 1/3] Update salary constrain Add constrains for each keyword in UG --- docs/UserGuide.md | 51 +++++++++++++++++++ .../seedu/address/model/person/Salary.java | 2 +- 2 files changed, 52 insertions(+), 1 deletion(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 0ab9e2a0399..f4088db6bd2 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -119,6 +119,19 @@ i/Birthday: 12 May 2001 s/5000 pl/Java t/friends t/owesMoney pri/2` * `add cn/ Amazon n/Betsy Crowe p/81234567 e/betsycrowe@example.com a/Newgate Prison tt/121220241200 i/Remote work s/4000 pl/Python t/criminal pri/4` +#### Constraint +* The `COMPANY_NAME` should be less than 100 chracters, and it should not be blank. +* The `NAME` should only contain alphanumeric characters and spaces, and it should not be blank. +* The `PHONE_NUMBER` should only contain numbers, and it should be at least 3 digits long. +* The `EMAIL` should be a valid email address. +* The `ADDRESS` can take any values, and it should not be blank. +* The `SALARY` should only contain numbers, with range [0, 2147483647] or two pure digital numbers with '-' in between. Both digital numbers should be within the range [0, 2147483647]. +* The `PROGRAMMING_LANGUAGE` should be alphanumeric and may contain some special characters (+ and #), and must be less than 50 characters. +* The `TAG` should be alphanumeric. +* The `PRIORITY` should be a number between 0 and 4. +* The `INTERVIEW_TIME` should be in the format `ddMMyyyyHHmm`. +* The `INFO` can take any values, and it should not be blank. + ### Adding a resume: `resume` Adds a resume to the addressbook. @@ -129,6 +142,15 @@ Examples: * `resume cn/Google n/John Doe p/98765432 e/johnd@example.com s/3000 edu/NUS a/311, Clementi Ave 2, #02-25 pl/Java pl/C++` * `resume cn/Apple n/Amy Birch p/87654321 e/amy@example.com s/3000 edu/NUS a/311, Clementi Ave 2, #02-25` +#### Constraint +* The `COMPANY_NAME` should be less than 100 chracters, and it should not be blank. +* The `NAME` should only contain alphanumeric characters and spaces, and it should not be blank. +* The `PHONE_NUMBER` should only contain numbers, and it should be at least 3 digits long. +* The `EMAIL` should be a valid email address. +* The `ADDRESS` can take any values, and it should not be blank. +* The `SALARY` should only contain numbers, with range [0, 2147483647] or two pure digital numbers with '-' in between. Both digital numbers should be within the range [0, 2147483647]. +* The `EDUCATION` should only contain alphanumeric characters and spaces, and it should not be blank. + ### Listing all persons : `list` Shows a list of all persons in the address book. @@ -153,6 +175,19 @@ Examples: * `edit 1 p/91234567 e/johndoe@example.com` Edits the phone number and email address of the 1st person to be `91234567` and `johndoe@example.com` respectively. * `edit 2 n/Betsy Crower t/` Edits the name of the 2nd person to be `Betsy Crower` and clears all existing tags. +#### Constraint +* The `COMPANY_NAME` should be less than 100 chracters, and it should not be blank. +* The `NAME` should only contain alphanumeric characters and spaces, and it should not be blank. +* The `PHONE_NUMBER` should only contain numbers, and it should be at least 3 digits long. +* The `EMAIL` should be a valid email address. +* The `ADDRESS` can take any values, and it should not be blank. +* The `SALARY` should only contain numbers, with range [0, 2147483647] or two pure digital numbers with '-' in between. Both digital numbers should be within the range [0, 2147483647]. +* The `PROGRAMMING_LANGUAGE` should be alphanumeric and may contain some special characters (+ and #), and must be less than 50 characters. +* The `TAG` should be alphanumeric. +* The `PRIORITY` should be a number between 0 and 4. +* The `INTERVIEW_TIME` should be in the format `ddMMyyyyHHmm`. +* The `INFO` can take any values, and it should not be blank. + ### Locating persons by name / company name: `find` Finds persons whose names / company names contain any of the given keywords. @@ -365,3 +400,19 @@ Character | Explaination, Examples **edu/**|Education level **pl/**|Programming languages **jd/**|The job difficulty (only for `sort` command) + +## Constraints Summary +| Field | Constraint | +|----------------------|----------------------------------------------------------------------------------------------------------| +| `COMPANY_NAME` | Should be less than 100 characters, and it should not be blank. | +| `NAME` | Should only contain alphanumeric characters and spaces, and it should not be blank. | +| `PHONE_NUMBER` | Should only contain numbers, and it should be at least 3 digits long. | +| `EMAIL` | Should be a valid email address. | +| `ADDRESS` | Can take any values, and it should not be blank. | +| `SALARY` | Should only contain numbers, with range [0, 2147483647] or two pure digital numbers with '-' in between. Both digital numbers should be within the range [0, 2147483647]. | +| `PROGRAMMING_LANGUAGE` | Should be alphanumeric and may contain some special characters (+ and #), and must be less than 50 characters. | +| `TAG` | Should be alphanumeric. | +| `PRIORITY` | Should be a number between 0 and 4. | +| `INTERVIEW_TIME` | Should be in the format `ddMMyyyyHHmm`. | +| `INFO` | Can take any values, and it should not be blank. | +| `EDUCATION` | Should only contain alphanumeric characters and spaces, and it should not be blank. | \ No newline at end of file diff --git a/src/main/java/seedu/address/model/person/Salary.java b/src/main/java/seedu/address/model/person/Salary.java index 979866e7ae6..494911dd345 100644 --- a/src/main/java/seedu/address/model/person/Salary.java +++ b/src/main/java/seedu/address/model/person/Salary.java @@ -8,7 +8,7 @@ * Represents a Person's salary in the address book. */ public class Salary { - public static final String MESSAGE_CONSTRAINTS = "Salaries should only contain numbers, with range [0, 4294967295] " + public static final String MESSAGE_CONSTRAINTS = "Salaries should only contain numbers, with range [0, 2147483647] " + "or two pure digital numbers with '-' in between. " + "There's no space on either side of '-'." + "Both digital numbers should be within the range [0, 2147483647]"; From 44f152fc6bd32dad07ce33f7861ff6323a0a9534 Mon Sep 17 00:00:00 2001 From: TIANYAO ZHANG <88520881+ZHANGTIANYAO1@users.noreply.github.com> Date: Sat, 13 Apr 2024 13:20:18 +0800 Subject: [PATCH 2/3] Update syntax --- docs/UserGuide.md | 74 +++++++++++++++++++++++------------------------ docs/index.md | 2 +- 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index f4088db6bd2..152a3fb8930 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -3,9 +3,9 @@ layout: page title: User Guide --- -Career Connect Bot (CCBot) is a **desktop app for managing job interview contacts, optimized for use via a Command Line -Interface** -(CLI) while still having the benefits of a Graphical User Interface (GUI). If you can type fast, CCBot can get your +Career Connect Bot (CCBot) is a **desktop app for managing job interview contacts, optimized for use via a Command Line +Interface** +(CLI) while still having the benefits of a Graphical User Interface (GUI). If you can type fast, CCBot can get your contact management tasks done faster than traditional GUI apps. * Table of Contents @@ -31,9 +31,9 @@ contact management tasks done faster than traditional GUI apps. * `list` : Lists all contacts. * `add cn/Google n/John Doe p/98765432 e/johnd@example.com a/311, Clementi Ave 2, #02-25 tt/121220221400 - i/remote work s/5000 pl/Java t/friends t/referral pri/2` : + i/remote work s/5000 pl/Java t/friends t/referral pri/2` : Adds a contact named `John Doe` to the Address Book. - + * `delete 3` : Deletes the 3rd contact shown in the current list. * `clear` : Deletes all contacts. @@ -48,7 +48,7 @@ contact management tasks done faster than traditional GUI apps. -**0 - High Priority** - This is the highest priority. +**0 - High Priority** - This is the highest priority. @@ -105,7 +105,7 @@ Format: `help` Adds a person to the address book. -Format: `add cn/COMPANY_NAME n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [tt/INTERVIEW-TIME] [i/INFO] +Format: `add cn/COMPANY_NAME n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [tt/INTERVIEW-TIME] [i/INFO] [s/SALARY] [pl/PROGRAMMING-LANGUAGE] [t/TAG] [pri/PRIORITY(0-4)] …​` @@ -167,7 +167,7 @@ Format: `edit INDEX [cn/COMPANY_NAME] [n/NAME] [p/PHONE_NUMBER] [e/EMAIL a/ADDRE * Edits the person at the specified `INDEX`. The index refers to the index number shown in the displayed person list. The index **must be a positive integer** 1, 2, 3, …​ * At least one of the optional fields must be provided. * Existing values will be updated to the input values. -* When editing tags and info, the existing tags and info of the person will be removed i.e adding of tags and info are +* When editing tags and info, the existing tags and info of the person will be removed i.e adding of tags and info are not cumulative. * You can remove all the person’s tags by typing `t/` without specifying any tags after it. * You can remove all the person’s info by typing `i/` without specifying any info after it. @@ -236,8 +236,8 @@ Format: `filter tt/INTERVIEW_TIME_RANGE [MORE_INTERVIEW_TIME_RANGE]...` * `from/INTERVIEWTIME-INTERVIEWTIME` Examples: -* `filter tt/before/010120200000 from/010120220000-010120230000` returns persons with interview times before 1 Jan - 2020, 1200am `(010120200000)` or persons with interview times within 1 Jan 2022, 1200am `(010120220000)` and 1 Jan +* `filter tt/before/010120200000 from/010120220000-010120230000` returns persons with interview times before 1 Jan + 2020, 1200am `(010120200000)` or persons with interview times within 1 Jan 2022, 1200am `(010120220000)` and 1 Jan 2023, 1200am `(010120230000)`. * `filter tt/after/010120220000` returns persons with interview times after 1 Jan 2022, 1200am `(010120220000)`. @@ -248,7 +248,7 @@ Format: `filter s/SALARY_RANGE [MORE_SALARY_RANGE]...` * Only the salaries of each of the contacts are searched. * Persons with salaries within the range provided will be returned. * Valid `SALARY_RANGE` includes: - * Valid `SALARY` + * Valid `SALARY` * `>=INTEGER` * `<=INTEGER` @@ -256,7 +256,7 @@ Format: `filter s/SALARY_RANGE [MORE_SALARY_RANGE]...` Examples: * `filter s/5000` returns persons with salaries of $5000. -* `filter s/2000-5000 >=7000` returns persons with salaries that contain any number from $2000 to $5000 or with +* `filter s/2000-5000 >=7000` returns persons with salaries that contain any number from $2000 to $5000 or with salaries more than or equals to $7000. (e.g. persons with salaries `3000-6000`, `4000`, `8000-20900` are returned). #### Filter by programming language: `filter pl/` @@ -372,34 +372,34 @@ This value cannot be modified or added by the `edit` or `add` commands. ## Command summary -Action | Format, Examples ---------|------------------ -**Add** | `add cn/COMPANY_NAME n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [tt/INTERVIEW-TIME] [i/INFO] [s/SALARY] [pl/PROGRAMMING-LANGUAGE] [t/TAG] [pri/PRIORITY(0-4)]...`
e.g., `add n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665 t/friend t/colleague` -**Clear** | `clear` -**Delete** | `delete INDEX`
e.g., `delete 3` -**Edit** | `edit INDEX [cn/COMPANY_NAME] [n/NAME] [p/PHONE_NUMBER] [e/EMAIL a/ADDRESS] [tt/INTERVIEW-TIME] [i/INFO] [s/SALARY] [pl/PROGRAMMING-LANGUAGE] [t/TAG] [pri/PRIORITY(0-4)]…​`
e.g.,`edit 2 n/James Lee e/jameslee@example.com` -**Find** | `find KEYWORD [MORE_KEYWORDS]`
e.g., `find James Jake` -**Filter**| `filter t/TAG [MORE TAGS]...`
e.g., `filter t/manager HR`
`filter tt/INTERVIEW_TIME_RANGE [MORE INTERVIEW_TIME_RANGE]...`
e.g., `filter tt/before/010120200000 from/010120220000-010120230000 after/010120220000`
`filter s/SALARY_RANGE [MORE SALARY_RANGE]...`
e.g., `filter s/2000-5000 >=7000`
`filter pl/PROGRAMMING_LANGUAGE [MORE PROGRAMMING_LANGUAGE]...`
e.g., `filter pl/python C` -**List** | `list` -**Help** | `help` -**Sort** | `sort` or `sort rev/ [pri/PRIORITY] [n/NAME] [cn/COMPANY_NAME] [s/SALARY] [tt/INTERVIEW_TIME] [jd/JOB_DIFFICULTY]`
e.g., `sort pri/`
e.g., `sort rev/ tt/` -**Resume**|`resume cn/COMPANY_NAME n/NAME p/PHONE e/EMAIL edu/EDUCATION s/SALARY [pl/SKILLS]`
e.g., `resume cn/Google n/John Doe p/98765432 e/johnd@example.com s/3000 edu/NUS a/311, Clementi Ave 2, #02-25 pl/Java pl/C++ ` +| Action | Format, Examples | +|------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **Add** | `add cn/COMPANY_NAME n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [tt/INTERVIEW-TIME] [i/INFO] [s/SALARY] [pl/PROGRAMMING-LANGUAGE] [t/TAG] [pri/PRIORITY(0-4)]...`
e.g., `add n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665 t/friend t/colleague` | +| **Clear** | `clear` | +| **Delete** | `delete INDEX`
e.g., `delete 3` | +| **Edit** | `edit INDEX [cn/COMPANY_NAME] [n/NAME] [p/PHONE_NUMBER] [e/EMAIL a/ADDRESS] [tt/INTERVIEW-TIME] [i/INFO] [s/SALARY] [pl/PROGRAMMING-LANGUAGE] [t/TAG] [pri/PRIORITY(0-4)]…​`
e.g.,`edit 2 n/James Lee e/jameslee@example.com` | +| **Find** | `find KEYWORD [MORE_KEYWORDS]`
e.g., `find James Jake` | +| **Filter** | `filter t/TAG [MORE TAGS]...`
e.g., `filter t/manager HR`
`filter tt/INTERVIEW_TIME_RANGE [MORE INTERVIEW_TIME_RANGE]...`
e.g., `filter tt/before/010120200000 from/010120220000-010120230000 after/010120220000`
`filter s/SALARY_RANGE [MORE SALARY_RANGE]...`
e.g., `filter s/2000-5000 >=7000`
`filter pl/PROGRAMMING_LANGUAGE [MORE PROGRAMMING_LANGUAGE]...`
e.g., `filter pl/python C` | +| **List** | `list` | +| **Help** | `help` | +| **Sort** | `sort` or `sort rev/ [pri/PRIORITY] [n/NAME] [cn/COMPANY_NAME] [s/SALARY] [tt/INTERVIEW_TIME] [jd/JOB_DIFFICULTY]`
e.g., `sort pri/`
e.g., `sort rev/ tt/` | +| **Resume** | `resume cn/COMPANY_NAME n/NAME p/PHONE e/EMAIL edu/EDUCATION s/SALARY [pl/SKILLS]`
e.g., `resume cn/Google n/John Doe p/98765432 e/johnd@example.com s/3000 edu/NUS a/311, Clementi Ave 2, #02-25 pl/Java pl/C++ ` | ## CLI Syntax Summary -Character | Explaination, Examples -----------|------------------ -**n/**|Name of the contact -**cn/**|The company name -**tt/**|The time of the interview -**s/**|The salary -**a/**|The place of residence -**e/**|The email address -**i/**|Any additional info -**pri/**|Priority of the job -**edu/**|Education level -**pl/**|Programming languages -**jd/**|The job difficulty (only for `sort` command) +| Character | Explaination, Examples | +|-----------|----------------------------------------------| +| **n/** | Name of the contact | +| **cn/** | The company name | +| **tt/** | The time of the interview | +| **s/** | The salary | +| **a/** | The place of residence | +| **e/** | The email address | +| **i/** | Any additional info | +| **pri/** | Priority of the job | +| **edu/** | Education level | +| **pl/** | Programming languages | +| **jd/** | The job difficulty (only for `sort` command) | ## Constraints Summary | Field | Constraint | diff --git a/docs/index.md b/docs/index.md index 4bc280ea137..b6ffd2b8a61 100644 --- a/docs/index.md +++ b/docs/index.md @@ -3,7 +3,7 @@ layout: page title: CCBOT --- -[![CI Status](https://github.com/se-edu/addressbook-level3/workflows/Java%20CI/badge.svg)](https://github.com/se-edu/addressbook-level3/actions) +[![CI Status](https://github.com/se-edu/addressbook-level3/workflows/Java%20CI/badge.svg)](https://github.com/se-edu/addressbook-level3/actions) [![codecov](https://codecov.io/gh/AY2324S2-CS2103T-T08-3/tp/graph/badge.svg?token=0RG4SRDBHW)](https://codecov.io/gh/AY2324S2-CS2103T-T08-3/tp) From 6a60bd5e75d4b1234b40bd0bba915f6e0c8db9a2 Mon Sep 17 00:00:00 2001 From: TIANYAO ZHANG <88520881+ZHANGTIANYAO1@users.noreply.github.com> Date: Sat, 13 Apr 2024 14:02:17 +0800 Subject: [PATCH 3/3] add team PPP markdown file --- docs/team/zhangtianyao1.md | 40 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 docs/team/zhangtianyao1.md diff --git a/docs/team/zhangtianyao1.md b/docs/team/zhangtianyao1.md new file mode 100644 index 00000000000..1b7400ac188 --- /dev/null +++ b/docs/team/zhangtianyao1.md @@ -0,0 +1,40 @@ +--- +layout: page +title: Zhang Tianyao's Project Portfolio Page +--- + +### Project: CCBOT + +CCBOT is a desktop application for managing your job application details.** While it has a GUI, most of the user interactions happen using a CLI (Command Line Interface). + +Given below are my contributions to the project. + +* **New Feature**: Added the ability to sort person list. + * What it does: allows the user to sort the person list by name, company name, job difficulty, priority, salary, and interview date. + * Justification: This feature improves the product significantly because a user can easily find the person he/she wants to check. + * Highlights: This enhancement affects existing commands and commands to be added in future. It required an in-depth analysis of design alternatives. The implementation too was challenging as it required changes to existing commands. + +* **New Feature**: Added the job difficulty model. + * What it does: allows the program auto calculate the job difficulty based on the job description. + * Justification: This feature improves the product significantly because a user can easily identify the job difficulty. + * Highlights: This enhancement affects existing commands and commands to be added in future. It required an in-depth analysis of design alternatives. The implementation too was challenging as it required changes to existing commands. + +* **Project management**: + * Managed releases `v1.2` - `v1.4` (4 releases) on GitHub + +* **Enhancements to existing features**: + * Add salary range to the person card (Pull requests [\#20]()) + * Fix add command examples (Pull requests [\#35]()) + * Add job difficulty comparator (Pull requests [\#69]()) + * Add priority to person card (Pull requests [\#39]()) + +* **Documentation**: + * User Guide: + * Added documentation for the features `sort` and `job difficulty` [\#93]() [\#86]() + * Added documentation for the constraints of the `add`, `edit` and `add resume` command [\#169]() + * Developer Guide: + * Added implementation details of the `sort` feature. + * Added implementation details of the `job difficulty` feature.[\#54]() + * Update UML diagrams. [\#37]() + * Add UML diagrams for `sort` command. [\#43]() +