Examine the given definitions: and the code fragment: Which statement is true about the implementation of Object-Oriented Programming concepts in the given code?
A.
Polymorphism, abstraction, and encapsulation are implemented.
B.
Only polymorphism and inheritance are implemented.
C.
Polymorphism, inheritance, and abstraction are implemented.
D.
Only inheritance and encapsulation are implemented.
The answer should be A as the encapsulation is done by .setPlayers and setting the players list as private, thus hiding the data. There is no inheritance as Game only implements, but not extends, the interface
The answer is C. We make a polymorphism when we instantiate a variable of type "playable" referencing an object of type "Game", we have erance because the "Game" class inherits the methods of the "playable" interface and we have abstraction because by default any method of an interface is abstract, public and void, so we have abstraction as well.
As said there in polyorphism but other 2 are implemented
upvoted 1 times
...
...
This section is not available anymore. Please use the main Exam Page.1z0-808 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
alex_au
Highly Voted 2 years, 7 months agoMPignaProTech
Most Recent 6 months, 3 weeks agosina_
1 year, 10 months agoakbiyik
2 years, 5 months agocarloswork
2 years, 7 months agoiSnover
2 years, 7 months agoShaileshRaj
1 year, 7 months ago