[nicholastan] iP#468
Open
nt-nic wants to merge 38 commits into
Open
Conversation
# 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.
This file contains hidden or 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
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:
listto view all the tasksmarkto mark a task as donebyeto exit the listPractice Java as well! Think about how you would build your own DukeyList!
The
mainmethod is given below.