1. How is generalization/specialization represented on a UML class diagram? a) a
ID: 3827070 • Letter: 1
Question
1. How is generalization/specialization represented on a UML class diagram?
a) a solid line.
b) an unfilled arrow.
c) a filled diamond.
d) a dashed line.
2. A base class may also be called a(n)
a) superclass.
b) subclass.
c) derived class.
d) existent class.
3. The process of reimplementing in a subclass a method from the base class is called
a) overriding.
b) overloading.
c) polymorphism.
d) inheritance
4. When two classes have a generalization/specialization relationship, the more specific class may contain additional information.
True
False
5. Which of the following is not an example of a generalization/specialization relationship?
a) vehicle/car
b) furniture/chair
c) food/groceries
d) building/fire station
6. The class at the highest level in a class diagram
a) is an abstract class.
b) points directly to all of its subclasses.
c) has definitions for all methods in the class hierarchy.
d) is the most general class in the class diagram.
7. A polymorphic method
a) has multiple implementations within the same class definition.
b) is uniquely identified by the data types of its arguments.
c) can be used in a subclass if it’s not used in a base class.
d) has the same name as another method within the same class hierarchy.
8. A tennis player is a kind of athlete is an example of
a) generalization/specialization.
b) class hierarchy.
c) polymorphism.
d) inheritance
9. An abstract class
a) has at least one method that is identified but not defined.
b) is defined in each class in which it appears.
c) has no constructor method.
d) has at least one data member that is not referenced during processing.
10. Structured programming control structures do not apply in designing a class when inheritance is used.
True
False
a) a solid line.
b) an unfilled arrow.
c) a filled diamond.
d) a dashed line.
Explanation / Answer
1. How is generalization/specialization represented on a UML class diagram?
Ans) a) a solid line.
2. A base class may also be called a(n)
Ans) a) superclass.
3. The process of reimplementing in a subclass a method from the base class is called
Ans) a) overriding.
4. When two classes have a generalization/specialization relationship, the more specific class may contain additional information.
Ans)True
5. Which of the following is not an example of a generalization/specialization relationship?
Ans) d) building/fire station
6. The class at the highest level in a class diagram
Ans) d) is the most general class in the class diagram.
7. A polymorphic method
Ans) d) has the same name as another method within the same class hierarchy
8. A tennis player is a kind of athlete is an example of
Ans) a) generalization/specialization.
9. An abstract class
Ans) is defined in each class in which it appears.
10. Structured programming control structures do not apply in designing a class when inheritance is used.
Ans) True
___________________Thank You
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.