nus-cs2113-AY2324S2 / forum

2 stars 0 forks source link

Uncertainties regarding ip level 7 - save's requirements #17

Closed LuoYu-uwu closed 4 months ago

LuoYu-uwu commented 4 months ago

hi all, i have some questions regarding the following requirements.

  1. "Save the tasks in the hard disk automatically whenever the task list changes. Load the data from the hard disk when the chatbot starts up.".
  1. "Your code must handle the case where the data file doesn't exist at the start. 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.".

Thanks in advance for any input or suggestions.

okkhoy commented 4 months ago

For q1: "Load the data from the hard disk when the chatbot starts up"

should we store data from previous runs

Yes, you should.

is it required to be able to manipulate previous tasks, such as marking or deleting tasks added in previous runs

once your data is in the memory, there is no difference between the new data and data read from the file; Yes. you should allow manipulation of previous tasks

"Save the tasks in the hard disk automatically whenever the task list changes"

Additionally, is it necessary to save tasks on every change ...

should be inferred from the above statement

For q2:

does this mean that when we first run the chatbot, we have to create the folder/file if it doesn't exist yet:

Yes, it follows from the statement you pasted/stated before. the question.

LuoYu-uwu commented 4 months ago

thank you prof!