edited by
1,444 views
2 votes
2 votes

Match the following style rules for reusability $:$

$\begin{array}{}   & \textbf{List – I} && \textbf{List – II} \\ \text{a.} & \text{Keep methods coherent} & \text{i.} & \text{Write a method to get the last} \\ &&& \text{element of a list} \\ \text{b.} & \text{Keep methods small} & \text{ii.} & \text{Maintain a parallel structure} \\ &&& \text{when possible} \\ \text{c.} & \text{Keep methods consistent} & \text{iii.} & \text{Breaking a method into smaller parts} \\ \text{d.} & \text{Provide uniform coverage} & \text{iv.} & \text{Performs a single function or a group} \\ &&& \text{of a closely related functions} \\  \end{array}$

$\textbf{Codes :}$

  1. $\text{a-iv, b-iii, c-ii, d-i}$
  2. $\text{a-ii, b-i, c-iv, d-iii}$
  3. $\text{a-iii, b-iv, c-ii, d-i}$
  4. $\text{a-ii, b-iii, c-iv, d-i}$
edited by

1 Answer

1 votes
1 votes

ans is A

Keep methods coherent  --->    Performs a single function or a group of a closely related functions

Keep methods small----> Breaking a method into smaller parts

Keep methods consistent--->Maintain parallel structure when possible

Provide uniform coverage--->Write a method to get the last element of a list

Answer:

Related questions

993
views
1 answers
2 votes
go_editor asked Jul 27, 2016
993 views
Important advantage of using new and delete operators in C++ isAllocation of memoryFrees the memory previously allocatedInitialization of memory easilyAllocation of memory and frees the memory previously allocated
1.4k
views
1 answers
2 votes
go_editor asked Jul 27, 2016
1,446 views
C++ actually supports the following two complete dynamic systems:One defined by C++ and the other not defined by COne defined by C and one specific to C++Both are specific to C++Both of them are improvements of C
2.5k
views
1 answers
2 votes
go_editor asked Jul 27, 2016
2,478 views
Match the following with respect to relationship objects and classes $:$\begin{array}{} & \textbf{List - I} && \textbf{List - II} \\ \text{a.} & \text{State diagram} & \text{i.} & \ ... a-iii, b-iv, c-ii, d-i}$\text{a-ii, b-iv, c-i, d-iii}$
4.7k
views
1 answers
2 votes
go_editor asked Aug 10, 2016
4,698 views
Which of the following is/are correct with reference to Abstract class and interface?A class can inherit only one Abstract class but may inherit several interfacesAn ... is trueii is trueBoth i and ii are trueNeitehr i nor ii are true