YOU MAY SELECT MORE THAN ONE ANSWER IF NEEDED. PLEASE PROVIDE EXPLANATION. THANK
ID: 3920841 • Letter: Y
Question
YOU MAY SELECT MORE THAN ONE ANSWER IF NEEDED. PLEASE PROVIDE EXPLANATION. THANK YOU.
Which of the following kinds of comments are acceptable in completed code?
A) Summaries of large blocks of code.
B) Markers and reminders for the developers.
C) Explanations of short or confusing variable names..
D) Meta-information that cannot be expressed in the code.
E) Descriptions of the programmer's intent.
A) Summaries of large blocks of code.
B) Markers and reminders for the developers.
C) Explanations of short or confusing variable names..
D) Meta-information that cannot be expressed in the code.
E) Descriptions of the programmer's intent.
Explanation / Answer
Answer : (a) , (c) , (d) , (e)
(a) Summaries of code are provided to tell what the code will do. It is helpful for a new programmer who needs to understand the code and make changes to it or use it.
(c) If there are a lot of variable names, sometimes it becomes confusing what a variable does. So, we need to provide explanations of short or confusing variable names.
(d) Some information like the links from where the code was taken or the link to the documentation of the code etc is provided which can't be mentioned in the code.
(e) It is helpful for a new programmer who needs to understand the code and make changes to it or use it.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.