nus-cs2103-AY2324S2 / forum

16 stars 0 forks source link

Practice Paper 3.05 #1070

Closed ryanlimdx closed 5 months ago

ryanlimdx commented 5 months ago

Hi! May I ask why B instead of E is selected? Since ProgressWatcher implements Watcher, shouldn't it indicate the update method as well? In option B, there is the operations section which is empty while in option E, there is no visibility attribute standardisation (the update method do not have a visibility) image image

dillontkh commented 5 months ago

Abstract classes may not necessarily implenent the interface methods, and the code snippet does not suggest it does either, so it wouldn't be right to assume that the abstract ProgressWatcher implements update().

YuvBindal commented 5 months ago

Yes, as mentioned I believe B would be the correct answer due to ProgressWatcher not requiring to implement update() this can also be deduced from the implementation of ProgressWatcher in Part 2

ryanlimdx commented 5 months ago

I see..thank you!