-
Notifications
You must be signed in to change notification settings - Fork 233
[CS2113-T11a-4] CommonCents #48
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
base: master
Are you sure you want to change the base?
[CS2113-T11a-4] CommonCents #48
Conversation
Add YS' PPP
…e 1. (Now solved)
Update UG, PPP
Moved YS' PPP into docs/team
Add assertions
Updated UG,DG, and added Jielei's PPP
# Conflicts: # docs/UserGuide.md
Updated UG and DG
okkhoy
left a comment
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.
Generally, the code is well written.
There are many redundant comments in the code; please consider removing them.
The number of assertions and logging in the codebase is not as much as I would like. The distribution is also not uniform across the codebase.
There is some scope to improve SLAP in the code. Pl. check the individual comment to get an idea.
| } | ||
|
|
||
| static { | ||
| configureLogger(); // Configure the logger when the class is loaded |
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.
redundant comment; naming is pretty good to understand what it is
| try { | ||
| incomeCommand.incomeExecute(new IncomeManager(), ui); | ||
| } catch (BudgetTrackerException e) { | ||
| // Handle the exception by printing the message |
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.
remove all such redundant comments
src/main/java/savings/Saving.java
Outdated
| //substring functions (substring(17)/substring(20), etc.) are used to trim the input | ||
| //to only keep the amount/index/goal description part |
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.
these look like "note-to-self" comments. should be removed
src/main/java/savings/Saving.java
Outdated
| } else { | ||
| System.out.println("Here are the savings in your list:"); | ||
| for (int i = 0; i < savingsRecords.size(); i++) { | ||
| System.out.println((i + 1) + ". \t" + savingsRecords.get(i)); | ||
| } | ||
| System.out.println("You have " + savingsRecords.size() + " saving(s) in total."); | ||
| } |
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.
can consider using the if condition as a guard clause and remove the nesting.
src/main/java/savings/Saving.java
Outdated
| * Runs the savings management system, processing user commands. | ||
| * @param input The Scanner object for user input. | ||
| */ | ||
| public void run(String input) { |
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.
you can extract individual processing to different methods and improve the SLAP in this method.
src/main/java/seedu/duke/Duke.java
Outdated
| /** | ||
| * Runs the main program loop, processing user commands until exit. | ||
| */ | ||
| public void runDuke() { |
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.
what is this VS the other run method I saw earlier in the code here?
| fundsAlert.update(15.0, 100.0, 85.0, 0.0); | ||
| String output3 = outputStream.toString(); | ||
| assertFalse(output3.contains("WARNING"), | ||
| "No alert should be triggered when threshold is lowered below the available funds"); | ||
| } |
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.
Fixed summary call in savings
# Conflicts: # src/test/java/savings/SavingTest.java
deleted exitSavings and handled more exceptions
edited DG saving
Changed methods name in UG and DG, and edited typos in Jielei's PPP
changed DG
Enable first-year university undergraduates living on-campus to confidently manage their finances, so they can reduce financial stress and fully enjoy their university experience.