Could you please give me an explanation as to why you choose a specific answer?
ID: 3730042 • Letter: C
Question
Could you please give me an explanation as to why you choose a specific answer? Thank you
A certain Java/CN1 class named "Point has constructors "Point() and Point (int x, int y)". This is an example of A. abstraction B. encapsulation C. inheritance D. overloading E. overriding A certain Java/CN1 class named Sphere contains a method named getColor ) which returns the color of the Sphere object. This method is an example of a (an) A. accessor B. mutator C. aggregation D. design pattern E. abstraction A certain Java/CN1 class named "B extends another class named A". Class B defines a method named C with the same signature as that of a method named "C in Class A. Method C does not contain the keyword "super". A program constructs an instance of B and invokes method “C" in that object. The code which will be executed as a result of this invocation is A. the code in A.C B. the code in B.C C. the code in A.C followed by the code in B.C D. the code in B.C followed by the code in A.C E. it depends on the code in A.C F. it depends on the code in B.C G. None of the above If a Java/CN1 program contains a declaration such as "class A f...J", where "..." represents the code defining the class, then A. A has no parent class B. A is its own parent C. A is a superclass of Object D. A is a subclass of Object E. A is an abstraction of Object In Java/CN1, inheritance is indicated using the keyword A. abstract B. extends C. implements D. static E. new F. none of the aboveExplanation / Answer
1)
One class having multiples methods with same name is called overloading
D. Overloading
2)
method with name starting with get is called a accessor method
A. accessor
3)
since super is not called in C, it will only execute C method of B
B. The code in B.C
4)
Every class is a sub-class of Object
D. A is a subclass of Object
5)
C. implements