Answer:
a) public class Bear extends Animal{
...
}
public class Zoo
{ private Animal[] myAnimals;
...
}
Explanation:
The question is an illustration of inheritance in Java programming language.
The syntax to follow is:
class subclass extends superclass {...}
From the question:
Bear subclass
Animal superclass
So, the following declaration will be used:
class Bear extends Animal{
...
}
Also from the question, the zoo object represents collection of many animals.
So, its declaration will follow:
class class-name{ ..... }
i.e.
class zoo{ .... }
The ... can then be replaced with declaration of each animal or an array to represent the declarations..
<em>Hence, (e) is correct</em>
Wait what? I don’t understand
you distribute and then combine like terms. x=4 :))
Answer: A. Car
Explanation:
Here the base class member is being protected which is Vehicle. The base class is the Vehicle class and the derived class is Car class.
As the derived class is created or derived from another existing class. So here the class Car has been created through the process of inheritance from the base class which is vehicle. All the methods and variables in Vehicle class are in protected so the only the derived class is able to get access to those variables and methods.
class Car : protected Vehicle
The class Vehicle has been defined earlier and the class Car is created.
The left side is for derived and right side is for base class.
Answer:
Either, "Ignore all" or "add '...' to dictionary"
Explanation:
If "Ignore all" is clicked, the software will ignore all the words which it believes is incorrect currently written. Whilst, adding it to the dictionary, the word will always be seen as spelt correctly on the application. Therefore, both get rid of the flagged word, but one is permanent.