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

[CS2113-W12-3] WheresMyMoney #4

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

Conversation

Hackin7
Copy link

@Hackin7 Hackin7 commented Sep 18, 2024

WheresMyMoney helps frugal and tech-savvy university students track how much they are spending and what they are spending it on. The application can provide summaries and statistical insights on their spending habits, optimised for people who prefer a CLI

Copy link

@okkhoy okkhoy left a comment

Choose a reason for hiding this comment

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

Please pay attention to coding standards.
Many non-trivial methods don't have header comments

Comment on lines 18 to 34
public Float getPrice() {
return price;
}
public String getDescription() {
return description;
}
public String getCategory() {
return category;
}
public void setPrice(Float price) throws WheresMyMoneyException {
if (price == null) {
throw new WheresMyMoneyException("Expense's price shouldn't be null.");
}
this.price = price;
assert this.price != null : "Expense's price shouldn't be null.";
}
public void setDescription(String description) throws WheresMyMoneyException {
Copy link

Choose a reason for hiding this comment

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

include some blank lines in between the methods for better readability



/**
* Add an expense to the end of the list
Copy link

Choose a reason for hiding this comment

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

doesn't follow our guidelines for header comments

addExpense(Float.parseFloat(line[2]), line[1], line[0]);
}

// closing writer connection
Copy link

Choose a reason for hiding this comment

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

It's a redundant comment and also looks incorrect.
Comment mentions writer; code references reader!


import java.util.HashMap;

public abstract class Command {
Copy link

Choose a reason for hiding this comment

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

this and its child classes can do better with some header comments

Copy link

@KSanjith KSanjith left a comment

Choose a reason for hiding this comment

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

Almost there

Comment on lines 116 to 122
<u>Implementation Details</u>

The following diagram is an inheritance diagram for Command and its children classes.
This has been heavily simplified and only shows the key commands.

![CommandInheritance.png](diagrams%2Fimages%2FCommandInheritance.png)

Choose a reason for hiding this comment

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

Given how simplified it is and how few details it contains, is this diagram really necessary? Feel like you could either add more details or remove this diagram.

Comment on lines 123 to 127

The following diagram is a sequence diagram for execution of Command.

![CommandExecutionSequence.png](diagrams%2Fimages%2FCommandExecutionSequence.png)

Choose a reason for hiding this comment

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

Is the execute method missing a return arrow and value?

Comment on lines +179 to +183

The following diagram is a UML class diagram for `Expense` and `ExpenseList`:

![ExpenseAndExpenseList.png](diagrams%2Fimages%2FExpenseAndExpenseList.png "UML Class Diagram for Expense and ExpenseList")

Choose a reason for hiding this comment

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

Should multiplicity be 0..1 and not 0.1 ?

Comment on lines +245 to +249

Below is the UML class diagram for `RecurringExpense` and `RecurringExpenseList`:

![RecurringExpenseAndRecurringExpenseList.png](diagrams%2Fimages%2FRecurringExpenseAndRecurringExpenseList.png "UML Class Diagram for RecurringExpense and RecurringExpenseList class")

Choose a reason for hiding this comment

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

Should multiplicity be 0..1 and not 0.1 ?

Comment on lines +125 to +127

![CommandExecutionSequence.png](diagrams%2Fimages%2FCommandExecutionSequence.png)

Choose a reason for hiding this comment

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

The return arrow from isExit() method is labelled as "boolean", which is a variable type. Should it instead be "exit :boolean" or "exit" or something similar, instead of just "boolean"

Comment on lines +251 to +253

![RecurringExpenseLoadFromCsvSequence.png](diagrams%2Fimages%2FRecurringExpenseLoadFromCsvSequence.png "UML Sequence Diagram for calling load command")

Choose a reason for hiding this comment

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

When instantiating new objects for File, FileReader and CSVReader, should the arrow point to the side of the object box, with an activation box coming right out of the object box to represent the constructor? And maybe you could perhaps not include the "new" keyword in the arrow? Can refer to https://nus-cs2113-ay2425s1.github.io/website/schedule/week10/topics.html#W10-1 for the proper formatting for object creation in sequence diagrams.

Copy link

@ayushi0803 ayushi0803 left a comment

Choose a reason for hiding this comment

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

overall, a commendable effort that needs a little more work and you'll be there! good luck team x

Choose a reason for hiding this comment

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

Screenshot 2024-10-30 at 13 23 46 can you make the definitino of 'expense' classes more specific? Is expense an overarching umbrella over ExpenseList and ExpenseFilter? Can you make it more specfific with an appended suffix perhaps?

Choose a reason for hiding this comment

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

what does the command class do? can it be described further? maybe you can make categories of classes and define each class under the relevant category to ensure a seamless explanation
Screenshot 2024-10-30 at 13 26 52

Choose a reason for hiding this comment

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

Screenshot 2024-10-30 at 13 32 22

i cant really see the 1? can it be rewritten as something else? or can it be highlighted to make it more visible because it looks like its a dotted line

Choose a reason for hiding this comment

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

could you use colours for class diagrams to increase readability? perhaps the line spacing can be increased too?

Choose a reason for hiding this comment

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

Screenshot 2024-10-30 at 13 39 42 why are these lines of code overlapping the vertical box on the left side of the diagram eg - [while line = csvReader.readNext)!= null] [for each RecurringExpense] etc

Choose a reason for hiding this comment

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

overall, a commendable effort that needs a little more work and you'll be there! good luck team x

Copy link

@Sukkaito Sukkaito left a comment

Choose a reason for hiding this comment

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

LGTM! I noted some possible changes that you guys might want to apply. Keep the good work! 👍

Copy link

@Sukkaito Sukkaito Oct 30, 2024

Choose a reason for hiding this comment

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

I don't think constructors should return any value, as constructors don't really return anything 🤔

Choose a reason for hiding this comment

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

image
Also, should this be a "0..1"? (2 dots)

Choose a reason for hiding this comment

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

Same issue here, constructors having return value. Shouldn't this be the case?

Choose a reason for hiding this comment

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

image
Same issue here, should this be "0..1" instead?

Choose a reason for hiding this comment

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

image
Should this be an opt block, because there is no "else" block in this case?

2. `Expense`, `ExpenseList`, `ExpenseFilter` classes: Model expenses that commands can interact with.
3. `Storage` class: Stores information between sessions.
4. Logger and other utility classes: Provide extra functionalities for the software.
### UI and Parser

Choose a reason for hiding this comment

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

the indentation is off. The formatting could be better


The following diagram is a sequence diagram for execution of Command.

![CommandExecutionSequence.png](diagrams%2Fimages%2FCommandExecutionSequence.png)

Choose a reason for hiding this comment

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

I think the diagram can be a bit confusing since i have to navigate both in the left and right direction. it might be better to should all the flows towards 1 direction
image


![ExpenseAndExpenseList.png](diagrams%2Fimages%2FExpenseAndExpenseList.png "UML Class Diagram for Expense and ExpenseList")

### Expense Filter

Choose a reason for hiding this comment

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

would it be better to have a sequence diagram to showcase each of the commands and how they work


Commands interact with `UI` and `Parser` classes via `Main`, as illustrated in the following class diagram:

![UiToCommand.png](diagrams%2Fimages%2FUiToCommand.png)

Choose a reason for hiding this comment

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

This has alot of details. Do you think we can make it more concise

Copy link

@AjayShanker-geek AjayShanker-geek left a comment

Choose a reason for hiding this comment

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

Overall, your groups UG makes me worried for my team UG. Amazing work!

Comment on lines 4 to 10
## Table of Contents
- [Introduction](#introduction)
- [Quick Start](#quick-start)
- [Features](#features-)
- [FAQ](#faq)
- [Others](#others)
- [Command Summary](#command-summary)

Choose a reason for hiding this comment

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

Great that you added Table of Content (TOC) to improve readability of the Developer Guide.

Choose a reason for hiding this comment

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

Starting the Developer Guide with high-level overview diagram is good for me quickly understand architecture. The amazing part that is looks way better than plantuml.

Choose a reason for hiding this comment

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

This is a minor issue, but it is difficult to see 1 at the head of the arrows.

Choose a reason for hiding this comment

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

Good effort on the sequence diagrams. Two minor issues: firstly will be the conditions overlapping with activation bar makes it hard to read. Secondly, should the function called be closer to the head of the arrow?

Progresst-8 and others added 23 commits November 4, 2024 21:56
Update UG and Help Command with Set feature
Update UserGuide, HelpCommand and PPP
MVP of Visualization command
- Remove unused imports & wildcard imports
- Visualizer can now work for time ranges up to three years
Hackin7 and others added 30 commits November 11, 2024 05:17
Add information about CategoryStorage
Correct link to category class UML diagram
Ignore the png in the commit before, that was the wrong png
into updatePPPandUGandDG

# Conflicts:
#	docs/diagrams/images/UiToCommand.png
#	docs/diagrams/plantuml/UiToCommand.puml
Update PPP and fix wrong file name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.