nus-cs2103-AY2122S2 / forum

13 stars 1 forks source link

Mock Quiz Question 2 #302

Closed bingsen0806 closed 2 years ago

bingsen0806 commented 2 years ago

image

According to Luminus, the correct answer is line 1 and 2.

Is it correct to also say line 4 has coding standard violation because the variable named "FILE_SIZE" should also be changed there. If similar questions regarding coding violations on variable naming comes out in exam, should we only choose the line where the variable is first declared?

damithc commented 2 years ago

If similar questions regarding coding violations on variable naming comes out in exam, should we only choose the line where the variable is first declared?

Good question @bingsen0806 . Yes, select only the line(s) that 'violated' the standard, not the the lines that are affected by the violation.

bingsen0806 commented 2 years ago

Thank you prof