exam questions

Exam 1z0-808 All Questions

View all questions & answers for the 1z0-808 exam

Exam 1z0-808 topic 1 question 59 discussion

Actual exam question from Oracle's 1z0-808
Question #: 59
Topic #: 1
[All 1z0-808 Questions]

You are asked to develop a program for a shopping application, and you are given this information:
✑ The application must contain the classes Toy, EduToy, and ConsToy. The Toy class is the superclass of the other two classes.
✑ The int calculatePrice (Toy t) method calculates the price of a toy.
✑ The void printToy (Toy t) method prints the details of a toy.
Which definition of the Toy class adds a valid layer of abstraction to the class hierarchy?
A.

B.

C.

D.

Show Suggested Answer Hide Answer
Suggested Answer: A

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
iSnover
Highly Voted 1 year, 3 months ago
The wording of the question is a little complex, but looking at the answers we can eliminate the wrong ones and quickly mark the right option which is the letter A. An abstract class, unlike an interface, can exist without any abstract method, but when reading the question needs to have at least one abstract method to work correctly, eliminating options B and C. The "printToy" method doesn't need to be abstract because it can sell a toy without a description, but we can't sell a toy without a price so the only method that needs to be abstract is the "calculatePrice". Which indicates that the correct answer is the letter A.
upvoted 9 times
...
DarGrin
Most Recent 3 months, 1 week ago
A is correct
upvoted 2 times
...
Vicky_65
9 months, 2 weeks ago
A is correct
upvoted 1 times
...
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.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago