Help shape GoConqr. What should we add next?

Quiz

MIssed itis questions

A G 4 questions

Take the quiz

Questions in this quiz (4)

  1. 1Student inherits Person. Person has a private field named height and a public getter/setter method pair to access height. How may Student access height?
    1. ADirectly
    2. BdietField is private and may never be accessed by Dog
    3. CStudent inherits the public getter/setter methods. It may access Height through these methods.
    4. DStudent may access height through the setter but not the getter.
    5. EStudent may access height through the getter but not the setter.
  2. 2If Student inherits Person, what is the first thing that must happen within the Student constructor when a Student object is created? Assume Person does not have a default constructor.
    1. ACall the Person constructor
    2. BInitialize the required Student fields
    3. CCreate all objects required for Student fields
    4. DMap the parameters coming into the constructor to Student fields
  3. 3Person is a fully defined class with a method called getId(). You define a second class, Student which inherits Person, and you define a method in Student also called getId(). These two getId() methods have the same signature. Which getId() method would be called in the following code segment:

    Student student = new Student();
    Person person;
    person = student;
    person.getId();
    1. AgetId() method of Person
    2. BgetId() method of Student
  4. 4Which of the following apply to both abstract Java classes and concrete Java classes?
    1. ABoth can be instantiated
    2. BBoth may contain concrete methods

Information

Description
Quiz on MIssed itis questions, created by A G on 04/05/2018.
Author
A G
Language
English
Views
1
Rating
No ratings yet
Rate this quiz
Rate this quiz

Feedback

What is it about?

What should we add next?