nus-cs2103-AY2223S2 / forum

12 stars 0 forks source link

Associations that are not explicitly mentioned in the question #401

Closed pangrwa closed 1 year ago

pangrwa commented 1 year ago
Screenshot 2023-04-21 at 11 26 06 AM

In this question, it was mentioned that ActionFactory adds ActionX and ActionY into History, is it possible to put an association/dependency from History -> Action. Since for History to be able to receive ActionX and ActionY, it should be associated to Action am I right?

hingen commented 1 year ago

Action implements Repeatable. Actions are added to History as Repeatable (referring to the code snippet for History).

Hence, I believe the answer to your question would be no. History does not know about Action, it just knows about Repeatable (which Action implements).

EvitanRelta commented 1 year ago

@pangrwa where's this video from?