Ex10 Task 1

sfelsen
Neuling
Neuling
Beiträge: 3
Registriert: 20. Jan 2018 12:51

Ex10 Task 1

Beitrag von sfelsen » 24. Jan 2018 19:41

What is addTime() in Task supposed to do, add time to the dueDate? What if no dueDate is set? What if the task has already been marked done?
We are allowed to add constructor parameters to SimpleTask, right?
Are we supposed to set the startDate to Instant.now() inside the SimpleTask class as a default value or inside the build method?
In DependentTask, which fields of the first task/dependent actually depend on the second task? I don't really understand how DependentTask is supposed to behave.
Can a class fulfill the roles of both Builder and ConcreteBuilder?
Zuletzt geändert von sfelsen am 25. Jan 2018 18:14, insgesamt 2-mal geändert.

0b101101101
Endlosschleifenbastler
Endlosschleifenbastler
Beiträge: 179
Registriert: 15. Apr 2015 18:24

Re: Ex10 Task 1

Beitrag von 0b101101101 » 25. Jan 2018 15:21

"Are we supposed to set the startDate to Instant.now() inside the SimpleTask class as a default value or inside the build method?" → Probably irrelevant.

"What is addTime() in Task supposed to do, add time to the dueDate? What if no dueDate is set? What if the task has already been marked done?" → I guess it sets the date like the other methods called add*.

"In DependentTask, which fields of the first task/dependent actually depend on the second task? I don't really understand how DependentTask is supposed to behave." → In the other threads it says to you can delegate everything to the dependent.

"Can a class fulfill the roles of both Builder and ConcreteBuilder?" → Don't know.

meichholz
Endlosschleifenbastler
Endlosschleifenbastler
Beiträge: 167
Registriert: 30. Mär 2016 08:28

Re: Ex10 Task 1

Beitrag von meichholz » 26. Jan 2018 11:48

Hi,
sfelsen hat geschrieben:
24. Jan 2018 19:41
What is addTime() in Task supposed to do, add time to the dueDate?
I answered this question here: viewtopic.php?f=234&t=37516
sfelsen hat geschrieben:
24. Jan 2018 19:41
What if the task has already been marked done?
You don't need to consider this case.
sfelsen hat geschrieben:
24. Jan 2018 19:41
Can a class fulfill the roles of both Builder and ConcreteBuilder?
Yes.

Best,
Matthias

Antworten

Zurück zu „Archiv“