# UGC NET COMPUTER SCIENCE SOLVED PAPERS 2014-16 - UGC NET Computer Science Paper 3 August 2016

>>>>>>>>UGC NET Computer Science Paper 3 August 2016

 a. Prim's algorithm i. O(V2E) b. Bellman-Ford algorithm ii. O(VE lgV) c. Floyd-warshall algorithm iii. O(E lgV) d. Johnson's algorithm iv. O(V3)

Where V is the set of nodes and E is the set of edges in the graph.
Codes:

 a b c d (1) i iii iv ii (2) i iii ii iv (3) iii i iv ii (4) iii i ii iv

• Option : C
• Explanation :
• Prim’s algorithm takes O(E lgV) time.
• Bellman-Ford algorithm takes O(V2E) time.
• Floyd-Warshall algorithm takes O(V3) time.
• Johnson’s algorithm takes O(VE lgV) time.
• So, option (C) is correct.

• Option : D
• Explanation :
Constructors have no return type. For more information on constructors Refer:Constructors in C++ Option (D) is correct.

• Option : B
• Explanation :
Method over-riding can be prevented by using final as a modifier at the start of method declaration. For detailed information and program Refer:Overriding in Java Option (B) is correct.

• Option : A
• Explanation :
• Composition is a strong type of association between two classes with full ownership. Correct.
• Composition is a strong type of association between two classes with partial ownership.Incorrect
• Composition is a weak type of association between two classes with partial ownership.Incorrect
• Composition is a weak type of association between two classes with strong ownership.Incorrect
• So, option (A) is correct.

• Option : B
• Explanation :
• Every class containing abstract method must be declared abstract.Correct Declaration is required.
• Abstract class can directly be initiated with ‘new’ operator. No it can't be initiated directed by only 'new' operator. So, it is Inorrect
• Abstract class can be initiated.Correct
• Abstract class does not contain any definition of implementation.Correct
• So, option (B) is correct.