Question: 1. In C#, a class can inherit from multiple classes. only have one subclass. implement multiple interfaces. only implement one interface. 2. Which of the
1. In C#, a class can
| inherit from multiple classes. |
| only have one subclass. |
| implement multiple interfaces. |
| only implement one interface. |
2. Which of the following is NOT the major feature in OOP (Objected-Oriented Programming)?
| Encapsulation |
| Inheritance |
| Polymorphism |
| Generic |
3. Which keyword is used to prevent a class from being inherited?
| abstract |
| sealed |
| virtual |
| new |
4. Which of the following is TRUE in C#?
| In subclass, user can add new fields as well as deleting fields from superclass. |
| Methods declared as abstract don't have method body |
| Classes defined sealed can be inherited. |
| A superclass cannot have a superclass. |
| A base class can only be inherited once. |
5. Which of the following is TRUE for an abstract class?
| All methods in an abstract class must define as abstract |
| All methods in an abstract class cannot be implemented. |
| Static method cannot be defined as abstract. |
| Sealed keyword can be used for an abstract method. |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
