Limited access

Upgrade to access all content for this subject

Mohamed notices that the same six lines of code appear in his program in multiple places. He writes a procedure that does these six lines of codes, then replaces them in the program with a call to the procedure.

Why will this help Mohamed reason through his program later?

Select TWO answers.


The procedure makes those six lines more abstract, so he doesn’t have to think through them each time he comes to them in the code.


The separate procedure will make the program more efficient, spending less time doing the same six lines over and over again.


If there’s an error in the procedure, he can fix the error in the procedure without having to search through his code for each place the procedure is used.


He will have less code to document, making his program less cluttered and easier to read.

Select an assignment template