Skip to content
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

[beefsausagee] iP #457

Open
wants to merge 63 commits into
base: master
Choose a base branch
from
Open
Changes from 2 commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
55f9f9f
docs/README.md: Tweak document template
Jan 7, 2024
f837ddb
Add Gradle support
May 24, 2020
a6f7324
Bump gradle and lib version
Eclipse-Dominator Aug 5, 2023
b19d562
Implement changes for Level-0
alvislowyh Feb 1, 2024
85dcedc
Level 1
alvislowyh Feb 2, 2024
8380b0e
Level-2
alvislowyh Feb 2, 2024
98302d6
Level 3. Mark As Done
alvislowyh Feb 6, 2024
e597f5e
Level 3. Mark As Done
alvislowyh Feb 6, 2024
22274ba
Level 4. ToDos, Events, Deadlines
alvislowyh Feb 7, 2024
e7c4c66
Level 5. Handle Errors
alvislowyh Feb 7, 2024
f5ba09f
Level 5. Handle Errors
alvislowyh Feb 7, 2024
8031d99
Level 6. Delete
alvislowyh Feb 7, 2024
676000f
Level 6. Delete
alvislowyh Feb 7, 2024
6cd69dc
Text UI Testing
alvislowyh Feb 9, 2024
2795a19
Level-7
alvislowyh Feb 13, 2024
d1ae4d1
Level 8
alvislowyh Feb 14, 2024
e09a661
Level 8
alvislowyh Feb 15, 2024
9879c00
Implemented changes for MoreOOP
alvislowyh Feb 16, 2024
7630968
Implemented changes for packages
alvislowyh Feb 16, 2024
48daa44
Merge branch 'add-gradle-support'
alvislowyh Feb 16, 2024
c9b9ea9
Added JUnit Test for Deadline class and Event class
alvislowyh Feb 16, 2024
da7892d
Package the App as a JAR file
alvislowyh Feb 16, 2024
51672c1
Add JavaDoc comments
alvislowyh Feb 16, 2024
eb187d4
Tweak the code to comply with a coding standard
alvislowyh Feb 16, 2024
d92ee08
Implement changes for Level-9
alvislowyh Feb 16, 2024
847b1f8
Merge changes from branch-Level-9
alvislowyh Feb 16, 2024
6b47835
Merge branch 'branch-Level-9'
alvislowyh Feb 16, 2024
e1dfcd8
Merge changes from branch-A-JavaDoc
alvislowyh Feb 16, 2024
1a7fa85
Implement changes to Duke and Task
alvislowyh Feb 16, 2024
08e649b
Implement changes to Duke
alvislowyh Feb 16, 2024
882183b
Add comments to Ui and Duke
alvislowyh Feb 16, 2024
49a2820
Merge branch 'branch-A-CodingStandard'
alvislowyh Feb 16, 2024
a514e94
Implement changes for Level 10
alvislowyh Feb 21, 2024
def0e91
Implement changes for Level-10
alvislowyh Feb 22, 2024
8521af1
Add XiaoBai and User image
alvislowyh Feb 22, 2024
0c57575
Change Duke to XiaoBai
alvislowyh Feb 22, 2024
af87374
Implement changes: Duke to XiaoBai
alvislowyh Feb 22, 2024
986b26b
Implement changes for code quality
alvislowyh Feb 22, 2024
456decf
Add assertions to improve input validation and error handling
alvislowyh Feb 22, 2024
ecbb3a0
Merge pull request #2 from beefsausagee/branch-A-Assertions
alvislowyh Feb 22, 2024
e3345b9
Add Javadoc comments to all classes in the project
alvislowyh Feb 22, 2024
4f38f31
Merge pull request #3 from beefsausagee/branch-A-CodeQuality
alvislowyh Feb 22, 2024
2972aaa
Removed txt file
alvislowyh Feb 22, 2024
d6e6b0f
Implement changes to tasks
alvislowyh Feb 22, 2024
e2495aa
Added extension C-Sort
alvislowyh Feb 23, 2024
57dc2af
Merge pull request #4 from beefsausagee/branch-C-Sort
alvislowyh Feb 23, 2024
b0c3bae
Implemented separate methods for processing todo, deadline, event, ma…
alvislowyh Feb 23, 2024
65484bd
Merge branch 'master' of https://github.com/beefsausagee/ip
alvislowyh Feb 23, 2024
6e6c6e3
Implement changes to Storage, UI, XiaoBai
alvislowyh Feb 23, 2024
ee38c98
Implement changes to text outcome to include personality for XiaoBai
alvislowyh Feb 25, 2024
782753b
Implemented changes to MainWindow.fxml to change design of GUI window
alvislowyh Feb 25, 2024
4f0bc96
Implemented changes to README.md
alvislowyh Feb 25, 2024
ad10551
Implemented changes for assertions
alvislowyh Feb 25, 2024
66f4897
Implemented changes to README.md
alvislowyh Feb 25, 2024
e256bc0
Implemented changes to README.md
alvislowyh Feb 25, 2024
edd5820
Implemented changes to runtest
alvislowyh Feb 25, 2024
69c11da
Implemented changes to Storage
alvislowyh Feb 25, 2024
e69e059
Implemented changes to UG
alvislowyh Feb 25, 2024
4169926
Add additional date and time formats
alvislowyh Feb 26, 2024
dd10ff6
Implement changes to parser
alvislowyh Feb 26, 2024
b79ce5f
Implement changes to Storage description
alvislowyh Feb 26, 2024
96c70a1
Implement changes to Ui for personality
alvislowyh Feb 26, 2024
8b620c5
Implement changes to XiaoBaiException to only display error message
alvislowyh Feb 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/main/java/duke/Duke.java
Original file line number Diff line number Diff line change
@@ -73,6 +73,10 @@ public void run() {
taskList.removeTask(deleteIndex);
ui.deleteTask(deletedTask, taskList);
break;
case FIND:
String stringToFind = input.substring(5);
ui.findTask(taskList, stringToFind);
break;
case UNKNOWN:
throw new DukeException("Unknown input");
}
@@ -100,6 +104,6 @@ public static void main(String[] args) {
}

public enum CommandType {
TODO, DEADLINE, EVENT, LIST, MARK, UNMARK, DELETE, BYE, UNKNOWN
TODO, DEADLINE, EVENT, LIST, MARK, UNMARK, DELETE, BYE, UNKNOWN, FIND
}
}
2 changes: 2 additions & 0 deletions src/main/java/parser/Parser.java
Original file line number Diff line number Diff line change
@@ -25,6 +25,8 @@ public static Command parseCommand(String userInput) {
return new Command(words, Duke.CommandType.DELETE);
case "bye":
return new Command(words, Duke.CommandType.BYE);
case "find":
return new Command(words, Duke.CommandType.FIND);
default:
return new Command(words, Duke.CommandType.UNKNOWN);
}
4 changes: 4 additions & 0 deletions src/main/java/task/Task.java
Original file line number Diff line number Diff line change
@@ -37,6 +37,10 @@ public void setNotDone() {
this.isDone = false;
}

public String getName() {
return this.name;
}

/**
*
* @param dateTimeString
15 changes: 15 additions & 0 deletions src/main/java/ui/Ui.java
Original file line number Diff line number Diff line change
@@ -115,6 +115,21 @@ public void printList(TaskList taskList) {
showLine();
}

public void findTask(TaskList taskList, String findString) {
showLine();
StringBuilder finalString = new StringBuilder();
finalString.append(" Here are the matching tasks in your list:\n");
int counter = 1;
for (Task c : taskList.getList()) {
if (c.getName().contains(findString)) {
finalString.append(String.format(" %d. %s\n", counter, c));
counter++;
}
}
System.out.println(finalString.toString());
showLine();
}

public void showLoadingError(DukeException e) {
showLine();
System.out.println(e.toString() + "\n");