The following test is related to questions 1, 2 and 3: Suppose Emotable is an in
ID: 2247103 • Letter: T
Question
The following test is related to questions 1, 2 and 3: Suppose Emotable is an interface and class Bird implements Emotable. Also assume that class BigBird extends Bird. Now consider the following code. Emotable e = new BigBird(): Bird b = new Bird(): How many instances of Bird are created in the code above? a) 0 b) 1 c) 2 d) 3 e) 4 How many Bird objects are created in the code above? a) 0 b) 1 c) 2 d) 3 e) 4 How many Bird classes exist? a) 0 b) 1 c) 2 d) 3 e) 4 Abstract classes and interfaces are very similar. One difference is that: a) Abstract classes can have constructors b) Interfaces can contain state c) Interfaces can be instantiated d) Abstract classes cannot have static methods e) None of the above Use case diagrams a) Describe the order in which classes and actors interact with each other b) Describe what functionality is needed by actors that interact with the c) Describe class attributes, operations, and how classes relate to each d) Describe the state transformations made between object instance e) All of the aboveExplanation / Answer
1)Ans) b
Reason:
Bird b=new Bird();
here b is instance variable which is pointing to the Bird class object.
______________
2)Ans) C
when we call Emotable e=new BigBird();
Internally its super class Bird class Object will be created.
and also whn we call Bird b=new Bird(); another Bird Class Object will be created.
_________________
3)Ans) 2
Reason: Bird is a class of Type Bird and also BigBird is also a Bird type class.
_________________
4)Ans) a
we can have constructors in the abstract class.
________________
5)Ans) a
_______________Thank you
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.