-
Notifications
You must be signed in to change notification settings - Fork 362
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
[nicholastan] iP #468
Open
nt-nic
wants to merge
38
commits into
nus-cs2103-AY2223S2:master
Choose a base branch
from
nt-nic:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[nicholastan] iP #468
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Conflicts: # src/main/java/duke/Task.java # src/main/java/duke/TaskList.java
The code does not use assertions. It is difficult identify bugs. The location of compilation errors may not be explicitly stated by the compiler, and for logical bugs it is not easy to debug without knowing which variables or methods are bugged. Let’s add `assert` statements at various points in the code. An Assertion is a statement that tests assumptions about the code. It can help the programmer to read the code better, detect any defects. The assert statement halts the code at the exact point if it is not fulfilled, allowing the programmer to identify the exact location there is a bug. This makes the process of debugging easier.
Add assertions
Improve code quality
There is no way to keep track of tasks which involve keeping track of money owed to someone. Let’s implement a class Loan which inherits Task, and the methods associated to the Loan class. A Loan contains the following fields: * Name of the task * Borrower * Lender * Amount * Status With the Loan class, the user can keep track of loans, including namely who owes how much money, and to who. Some of the associated methods include: * Loan.createLoan() which creates a new Loan based on user input * Loan.createLoanFromLog() which loads a Loan from a save
This reverts commit 8edff6a.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
DukeyList
DukeyList frees your mind of having to remember things that you need to do. It is:
Some features:
Go get DukeyList
soonNOW 👍Some basic DukeyList commands:
list
to view all the tasksmark
to mark a task as donebye
to exit the listPractice Java as well! Think about how you would build your own DukeyList!
The
main
method is given below.