Match-the-columns question: Match the description in Column A with the correct t
ID: 3754632 • Letter: M
Question
Match-the-columns question: Match the description in Column A with the correct term from Column B. In your answer booklet, write down only the question number and, next to it, the letter of the correct answer Column A Column B Q.1.1 Aprogram or class that instantiates objects of A. Terabyte another prewritten class. Q.1.2 Describes situations in which one (1) method B. Gigabyte body is used with a variety of arguments. Q.1.3 The entire list of parent classes from which the C. Super class class is derived. Q.1.4 A class that is used as a basis for inheritance D. Ancestors E. Class Client F. Subclass G. Pure Polymorphism Q.1.5 A trillion bytes.Explanation / Answer
Q 1.1: A program or class that instantiates objects of another prewritten class.
Answer: E (Class Client)
Example:
class Student {
int id;String name;
}
class StudentClient{
public static void main(String[]arg)
{
Student student = new Student(); //instantiates Student class
}
}
Q 1.2: Describes situations in which one(1) method body is used with a variety of arguments.
Answer: G ( Pure Polymorphism)
Example:
class Test
{
int add(int a,int b) { return a+b;}
int add(int a,int b,int c) { return a+b+c;}
}
Q 1.3: The entire list of parent classes from which the class is derived.
Answer: D ( Ancestors)
Q 1.4: A class that is used as a basis for inheritance.
Answer: C (Super class)
Q 1.5: A trillion bytes
Answer : A (Terabyte)