A has-a relationship is implemented via inheritance.
举一反三
- Which of the following conventions about inheritance in C# is correct? A: A subclass in C# can have multiple direct parents. B: C# does not support multiple inheritance. C: C# does not support multi-level inheritance. D: Inheritance is not passable in C#.
- Inheritance is also known as the ( ) A: uses-a relationship. B: has-a relationship. C: knows-a relationship. D: is-a relationship.
- Which statements about inheritance are true?() A: In Java programming language only allows single inheritance. B: In Java programming language allows a class to implement only one interface. C: In Java programming language a class cannot extend a class and implement a interface together. D: In Java programming language single inheritance makes code more reliable.
- The maintenance department has no relationship with other department.
- Our government has implemented ____ of religious belief policy. A: freedom B: strict C: friendly