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

Level 7: Save #3

Closed
therizhao opened this issue Aug 22, 2020 · 0 comments · Fixed by #12
Closed

Level 7: Save #3

therizhao opened this issue Aug 22, 2020 · 0 comments · Fixed by #12
Assignees
Labels
enhancement New feature or request

Comments

@therizhao
Copy link
Owner

therizhao commented Aug 22, 2020

Level 7. Save

Link: https://nus-cs2103-ay2021s1.github.io/website/schedule/week3/project.html#level-7-save

  • Save the tasks in the hard disk automatically whenever the task list changes. Load the data from the hard disk when Duke starts up.
  • You may hard-code the file name and location e.g., [project_root]/data/duke.txt

The format of the file is up to you. Example:

T | 1 | read book
D | 0 | return book | June 6th
E | 0 | project meeting | Aug 6th 2-4pm
T | 1 | join sports club

Your code must handle the case where the file doesn't exist at the start. Reason: when someone else takes your Duke and runs it for the first time, the required file might not exist in their computer. Similarly, if you expect the data file to be in as specific folder (e.g., ./data/), you must also handle the 'folder does not exist yet' case.

@therizhao therizhao self-assigned this Aug 22, 2020
@therizhao therizhao added the enhancement New feature or request label Aug 22, 2020
@therizhao therizhao linked a pull request Aug 22, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant