Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Can anyone explains why this one is true or false? True/ False 5. A process that

ID: 3741454 • Letter: C

Question

Can anyone explains why this one is true or false?

True/ False

5. A process that involves recognizing and focusing on the important characterisitics of a situation or objext is known as inheitance.

6. If a class inherits from some other class, i should override all the methods of its parent class to make it better

7. Consider the following code segment :

...

Rectangle r1 = new Rectangle ();

r1.setColor(Color.blue);

Rectangle r2 = r1;

r2.setColor(Color.red);

8. The correct order of the declarations in a Java program is import statement, package declaraion, class declaration.

9. An overloaded method consists of the same method name and same number and type of parameters with different return type.

10. A sub class can override parent methods and its field attributes.

11. extends keyboard can be used in subclass to call the constructor of superclass?

12. All classes in Java are inherited from java.lang.Class.

13. B is a sub class of A. C is a sub class of B. This statement is legal: C c = new A();

14. An abstract Data Type (ADT) must obviously have some kind of representation for its data. We often make this presentation public so that a user can change it to improve our coding.

15. Consider the statement "x=(a>)? a: b"; then the value of x is 27, if a = 18 and b = 27.

Explanation / Answer

5. A process that involves recognizing and focusing on the important characterisitics of a situation or objext is known as inheitance.

Ans: True

6. If a class inherits from some other class, i should override all the methods of its parent class to make it better

Ans: False , not all, some of specific methods

8. The correct order of the declarations in a Java program is import statement, package declaraion, class declaration.
Ans: False

9. An overloaded method consists of the same method name and same number and type of parameters with different return type.
Ans: False

10. A sub class can override parent methods and its field attributes.
Ans: False, only method can be overrided

11. extends keyboard can be used in subclass to call the constructor of superclass?
Ans: False, super keyword used to call constructor of super class

12. All classes in Java are inherited from java.lang.Class.
Ans: Fasle, All classes in Java are inherited from java.lang.Object.

13. B is a sub class of A. C is a sub class of B. This statement is legal: C c = new A();
Ans: False

14. An abstract Data Type (ADT) must obviously have some kind of representation for its data. We often make this presentation public so that a user can change it to improve our coding.
Ans: False, we make data private
15. Consider the statement "x=(a>)? a: b"; then the value of x is 27, if a = 18 and b = 27.
Ans: true

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote