nus-cs2113-AY2122S1 / forum

3 stars 1 forks source link

A few questions regarding the mock paper #156

Open alvynben opened 2 years ago

alvynben commented 2 years ago

image

Qn 3:

Can’t the answer be B also? The header is missing information on the parameters passed to the function. According to the textbook, the minimal content required for the header is:

image

alvynben commented 2 years ago

image

Qn 11:

What’s the justification for this answer? Is it iterative because the software needs to change as Facebook changes. One reason why I thought it can’t be iterative is because you can’t compete with Facebook with a MVP. You need to create something that is as fully-featured as Facebook which can be done with sequential models.

alvynben commented 2 years ago

image

Qn 14:

I think we can agree TP does use CI. Doesn’t it use CD too when the github pages gets deployed after every merge?

alvynben commented 2 years ago

image

Qn 17:

Isn’t acceptance testing supposed to focus on positive tests only, while system testing focuses on negative + positive testing? So, is this statement still supposed to be false?

alvynben commented 2 years ago

image

Qn 18:

Why is this considered as composition? Is it because the smaller tasks only exist while the larger task exists?

alvynben commented 2 years ago

Thank you for the help :) Apologies if this is the wrong format to ask questions about the mock exam.

okkhoy commented 2 years ago

No worries! This is a better way to ask rather than send me numerous emails :-)

Q3: You can infer the parameter via the method signature. In this case, it is named appropriately + considering that the comment says sets the "address to given value". No info is missing. Your argument would have been true if the method was throwing an exception and no info abt the exception is given in the header comment.

Q11: You need to create something that is as fully-featured as Facebook. We dunno the full feature set we want to implement. All we know is we want to compete with FB, but it doesn't mean we want to replicate it. It is better to have MVP and incrementally develop something so that we can incorporate new (or better) features along the way.

Q14: Publishing docs is not really considered CD.

Q17: System testing also considers positive tests. Hence false.

Q18: Focus is to understand the notations (syntax) rather than the semantics. However, with the given info (i.e., just the class diagram and nothing else) the smaller tasks only exist while the larger task exists is the correct interpretation.

alvynben commented 2 years ago

@okkhoy Thanks, that makes a lot of sense :)

okkhoy commented 2 years ago

Reopening the issue as others may benefit too.

zonglun99 commented 2 years ago

Q3: You can infer the parameter via the method signature. In this case, it is named appropriately + considering that the comment says sets the "address to given value". No info is missing. Your argument would have been true if the method was throwing an exception and no info abt the exception is given in the header comment.

Hello prof, wouldn't this mean that B is a valid answer, since it does not miss out any vital information which means B is an incorrect option

okkhoy commented 2 years ago

@zonglun99 I missed the "incorrect" part when I responded to @alvynben

The question is to choose the incorrect option. So let's go over the options to clear the confusion.

a: method name should be like a verb sounding, calling it address is bad (setAddress may have been better). So option a is correct b: header comment is missing vital information about the default behavior (in lines 6-9) *. So option b is correct c: line 10 is a redundant comment. So option c is incorrect** d: line 7 has magic literal (string/number treated the same way here under the umbrella term magic number). So option d is correct

*** However, do note that my explanation given earlier is still valid wrt parameters and exceptions. Unfortunately, in a hurry I missed the "setting default value behavior", which was crucial to answer this question. Sorry abt that!

zonglun99 commented 2 years ago

@okkhoy Got it! Thanks prof!