0% found this document useful (0 votes)
66 views5 pages

Dissection Quiz

The document summarizes a quiz on code dissection taken on the Coursera course Java for Android. The quiz consisted of 6 multiple choice and true/false questions testing understanding of code examples involving subclasses, inheritance, and method overriding. The student answered all questions correctly, receiving full points and passing the quiz.

Uploaded by

ACHRAF KADMIRI
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views5 pages

Dissection Quiz

The document summarizes a quiz on code dissection taken on the Coursera course Java for Android. The quiz consisted of 6 multiple choice and true/false questions testing understanding of code examples involving subclasses, inheritance, and method overriding. The student answered all questions correctly, receiving full points and passing the quiz.

Uploaded by

ACHRAF KADMIRI
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

22/03/2019 Java for Android - Home | Coursera

Module 7 quiz on code "dissection" 6/6 points (100.00%)


Quiz, 6 questions

Congratulations! You passed! Next Item

1/1
 point

1.
Lines 54-58 show an example of

a mutator method that makes an explicit call to a constructor in the super class.

a default constructor in a subclass.

a constructor that makes an implicit call to a constructor in the super class.

a constructor that makes an explicit call to a constructor in the super class.

Correct

1/1
 point

2.
Line _______ is the rst line of a overridden method in the subclass.

78

Correct Response

1/1
 point

https://www.coursera.org/learn/java-for-android/exam/kQeY7/module-7-quiz-on-code-dissection 1/5
22/03/2019 Java for Android - Home | Coursera

3.
Module 7 quiz
Line _______ is theon
rstcode
line of "dissection"
a mutator method that is inherited by the subclass. 6/6 points (100.00%)
Quiz, 6 questions

17

Correct Response

1/1
 point

4.
LIne _________ is the rst line of a method in the super class that is not inherited by the subclass.

31

Correct Response
Correct! Because this is a private method, it is not inherited by the subclass.

1/1
 point

5.
Select all of the lines of code that could be written in the subclass. (i.e. would not cause a compile error or
a runtime error)

1 String inputString;
2 ...
3 this.name = inputString;

Un-selected is correct

1 super.setMonth(8);

https://www.coursera.org/learn/java-for-android/exam/kQeY7/module-7-quiz-on-code-dissection 2/5
22/03/2019 Java for Android - Home | Coursera

Correct
Module 7 quiz on code "dissection" 6/6 points (100.00%)
super.setMonth(8); is correct.
Quiz, 6 questions

1 super.convertToString();

Un-selected is correct

1 setMonth(8);

Correct
setMonth(8) is correct.

1 int num = super.getDays();

Correct
int num = super.getDays() is correct! The keyword super here is optional.

1 convertToString();

Un-selected is correct

1/1
 point

6.

https://www.coursera.org/learn/java-for-android/exam/kQeY7/module-7-quiz-on-code-dissection 3/5
22/03/2019 Java for Android - Home | Coursera

Module 7 quiz on code "dissection" 6/6 points (100.00%)


Quiz, 6Select all of the lines of code that could be written in a client le that was in the same project as the Month
questions
and SchoolMonth classes.

1 Month x = new Month();

Un-selected is correct

1 SchoolMonth y = new SchoolMonth(11);


2 y.semester = 'F';

Un-selected is correct

1 Month[] summer = new Month[3];

Correct

1 SchoolMonth x = new SchoolMonth(7);


2 setMonth(4);

Un-selected is correct

1 SchoolMonth x = new SchoolMonth(7);


2 x.setMonth(3);

Correct

https://www.coursera.org/learn/java-for-android/exam/kQeY7/module-7-quiz-on-code-dissection 4/5
22/03/2019 Java for Android - Home | Coursera

Module 7 quiz on code "dissection" 6/6 points (100.00%)


Quiz, 6 questions

https://www.coursera.org/learn/java-for-android/exam/kQeY7/module-7-quiz-on-code-dissection 5/5

You might also like