nus-cs2103-AY2425S1 / forum

11 stars 0 forks source link

Mock Exam part 2 #914

Open minhao23 opened 3 days ago

minhao23 commented 3 days ago

image image

Hi, I'm wondering where the dependency between Activity and Progress Watcher has come from. This is the mock paper part 2

Feng1231 commented 3 days ago

ProgressWatcher.MAX is used when declaring array in the Acitivity class.

So Activity class can't compile without ProgressWatcher class

rahula1008 commented 3 days ago

There was actually a similar question in the week 8 part 1 quiz. Firstly, just to clarify it's not an association because Activity is not holding any objects or references to ProgressWatcher so it can't be a straight line. Secondly, Activity still depends on the variable Progresswatcher.MAX and so cannot compile without ProgressWatcher.

minhao23 commented 3 days ago

Is it right to say

There was actually a similar question in the week 8 part 1 quiz. Firstly, just to clarify it's not an association because Activity is not holding any objects or references to ProgressWatcher so it can't be a straight line. Secondly, Activity still depends on the variable Progresswatcher.MAX and so cannot compile without ProgressWatcher.

is it right to say the cannot compile condition is suitable to be drawn as a dependency (provided it is not an association)