Oracle Java SE 8 Programmer I 1z0-808 Question # 25 Topic 3 Discussion

Oracle Java SE 8 Programmer I 1z0-808 Question # 25 Topic 3 Discussion

1z0-808 Exam Topic 3 Question 25 Discussion:
Question #: 25
Topic #: 3

Given these requirements:

    Bus and Boat are Vehicle type classes.

    The start() and stop() methods perform common operations across the Vehicle class type.

    The ride() method performs a unique operations for each type of Vehicle.

Which set of actions meets the requirements with optimized code?


A.

1. Create an abstract class Vehicle by defining start() and stop() methods, and declaring the ride()

abstract method.

2. Create Bus and Boat classes by inheriting the Vehicle class and overriding the ride() method.


B.

1. Create an interface Vehicle by defining start() and stop() methods, and declaring the ride()

abstract method.

2. Create Bus and Boat classes by implementing the Vehicle class.


C.

1. Create an abstract class Vehicle by declaring stop(), start(), and ride() abstract methods.

2. Create Bus and Boat classes by inheriting the Vehicle class and overriding all the methods.


D.

1. Create an interface Vehicle by defining default stop(), start(), and ride() methods.

2. Create Bus and Boat classes by implementing the Vehicle interface and overriding the ride()

method.


Get Premium 1z0-808 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.