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

wrong commit #94

Open
wants to merge 506 commits into
base: master
Choose a base branch
from
Open

Conversation

sallysohyun
Copy link

fixed comments

@nus-se-pr-bot
Copy link

Hi @sallysohyun, your pull request title is not as specified. Please rectify the PR title to match the following requirement.

The PR name should be in the format of [Semester-Module Code-Tutorial Slot-Team ID] Product Name. For example:

  • If you are from CS2113, [AY1920S1-CS2113-T13-1] Contact List Pro;
  • If you are from CS2113T, [AY1920S1-CS2113T-W13-1] Contact List Pro.

Please follow the above format strictly and edit your title for reprocessing.

Note: this comment is posted by a bot. If you believe this is done in error, please create an issue at nus-se-pr-bot and add a link to this PR.

@sallysohyun sallysohyun changed the title Add CommandAddIncomeReceipt and CommandAddSpendingReceipt wrong commit Oct 17, 2019
Copy link

@Rishav1 Rishav1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sallysohyun Good PR! I have added some suggestions and scope for improvements to reduce redundancy of several functions.

Overall, you did a good Job!

@@ -1,10 +1,21 @@
import executor.task.TaskList;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First line should be package name.

protected static TaskList taskList;

/**
* The Main method by which Duke will be launched.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably this can be deleted as it is not adding any value. Main methods are always unique and obvious to identify.

@@ -0,0 +1,11 @@
package duke.exception;

public class DukeException extends Exception {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DukeException should the base exception class for other, more specific exception types related to the application. If you get DukeException error, it gives you no more information about the type other than the message string.


public abstract class Command {
protected Boolean exitRequest = false;
protected CommandType commandType;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe initialize the command type as a no-op type.

public CommandAddIncomeReceipt(String userInput) {
this.commandType = CommandType.IN;
this.userInput = userInput;
this.description = "You can add a new income receipt in format of 'In $5.00 /tags tag'.";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line seems too long. Maybe create a private static final string that stores this default description and assign it inside the constructor.

Comment on lines 73 to 80
generatedStr += " (";
if (this.detailDesc != null && !this.detailDesc.isEmpty()) {
generatedStr += this.detailDesc + ": ";
}
if (this.taskDetails != null && !this.taskDetails.isEmpty()) {
generatedStr += this.taskDetails;
}
generatedStr += ")";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Violation of Single Layer of Abstraction Principle (SLAP).

Comment on lines 100 to 108
int indexMsg = userInput.indexOf(' ', indexBackslash);
if (indexMsg >= 0) {
this.detailDesc = userInput.substring(indexBackslash + 1, indexMsg);
}
String[] splitDetails = userInput.split('/' + this.detailDesc, 2);
this.taskName = splitDetails[0].trim();
if (splitDetails.length > 1) {
this.taskDetails = splitDetails[1].trim();
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Violation of Single Layer of Abstraction Principle (SLAP).

* @return A String Array that contains all the types of this enum
*/
public static String[] getNames() {
TaskType[] holder = TaskType.values();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe taskTypes is a better name.

Comment on lines 52 to 60
while (scanner.hasNextLine()) {
try {
String loadedInput = scanner.nextLine();
newTask = loadTaskFromStorageString(loadedInput);
taskList.addTask(newTask);
} catch (Exception e) {
System.out.println(e);
}
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Violation of Single Layer of Abstraction Principle (SLAP).

Comment on lines 77 to 83
for (String taskString : taskStrings) {
if (newTask == null) {
newTask = TaskList.createTaskFromString(taskString);
} else {
queuedTask = TaskList.createTaskFromString(taskString);
queuedTasks.getList().add(queuedTask);
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Violation of Single Layer of Abstraction Principle (SLAP).

Araavinds and others added 23 commits November 4, 2019 20:40
…n-for-expenditure

Added exceptions to expenditure
…k-change-help-formatting

Added function to help command .
…ator

Added simple arithmetic command line based functionalities
priyan-coder and others added 30 commits November 11, 2019 16:35
New feature CommandEdit added with Junit testing
…CS2113T-F09-1#315)

* Made some minor bugfixes.

Signed-off-by: Mudaafi <[email protected]>

* Moved Classes to their proper places.

Signed-off-by: Mudaafi <[email protected]>
* Made some minor bugfixes.

Signed-off-by: Mudaafi <[email protected]>

* Fixed height issue.

Signed-off-by: Mudaafi <[email protected]>
…tor-again-export

Done with refactor of export command
* Made some minor bugfixes.

Signed-off-by: Mudaafi <[email protected]>

* Fixed height issue.

Signed-off-by: Mudaafi <[email protected]>

* LAST BUGFIX

Signed-off-by: Mudaafi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants