Multiple choice technology programming languages

You have the following class definitions: public abstract class Vehicles { } public class Bus { } public class MyClass { public Vehicles go() { return new Bus(); } } What change would have to be made to allow this code to compile?

    1. Change public abstract class Vehicles { } to public class Vehicles { }
    1. Change public class Bus { } to public class Bus extends Vehicles { }
    1. Change public class MyClass { to private class My Class {
    1. Change public abstract class Vehicles { } to protected abstract class Vehicles { }
Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The go() method returns Vehicles but tries to return a Bus instance. This is only valid if Bus is a subclass of Vehicles. Changing Bus to extend Vehicles establishes this inheritance relationship, allowing the return.