subject

A bear is an animal and a zoo contains many animals, including bears. Three classes Animal, Bear, and Zoo are declared to represent animal, bear and zoo objects. Which of the following is the most appropriate set of declarations? a) public class Animal extends Bear
{
...
}
public class Zoo
{
private Animal[] myAnimals;
...
}
b) public class Animal extends Zoo
{
private Bear myBear;
...
}
c) public class Bear extends Animal, Zoo
{
...
}
d) public class Bear extends Animal implements Zoo
{
...
}
e) public class Bear extends Animal
{
...
}
public class Zoo
{
private Animal[] myAnimals;
...
}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 23:00
In a file-oriented information system, a work file stores relatively permanent data about an entity is created and saved for backup and recovery purposes stores records that contain day-to-day business and operational data is a temporary file created by an information system for a single task
Answers: 1
question
Computers and Technology, 22.06.2019 20:00
Which type of file can be used to import data into a spreadsheet?
Answers: 1
question
Computers and Technology, 23.06.2019 11:00
How should you specify box sizes on a web page if you want the boxes to vary according to the font size of the text they contain? a. in pixels b. in inches c. as percentages d. in em units
Answers: 2
question
Computers and Technology, 23.06.2019 11:30
Which excel file extension stores automated steps for repetitive tasks?
Answers: 1
You know the right answer?
A bear is an animal and a zoo contains many animals, including bears. Three classes Animal, Bear, an...
Questions
question
Mathematics, 13.10.2020 01:01
question
Mathematics, 13.10.2020 01:01
question
Mathematics, 13.10.2020 01:01
question
Mathematics, 13.10.2020 01:01
Questions on the website: 13722362