Classes declared with the sealed keyword cannot be base class.
Sealed classes are used to restrict the users from inheriting the class, hence Classes declared with the sealed keyword cannot be base class.
All methods in an abstract base class must be declared abstract.
Yes, we can have an abstract class without Abstract Methods; hence it's not necessary to have all abstract methods in abstract class. Declaring a class abstract means that it can not be instantiated on its own and can only be subclassed. Declaring a method abstract means that Method will be defined in the subclass
When to say Polymorphism occurs when the methods of the child class.
Polymorphism is the ability of an object to take on many forms. The most common use of polymorphism in OOP occurs when a parent class reference is used to refer to a child class object.
What composition specifies?
The composition is a special type of Aggregation. It is a strong type of Aggregation. In this type of Aggregation, the child object does not have their own life cycle. The child object's life depends on the parent's life cycle. Only the parent object has an independent life cycle. If we delete the parent object then the child object(s) will also be deleted. We can define the Composition as a "Part of" relationship. For example, the company and company location, a single company has multiple locations. If we delete the company then all the company locations are automatically deleted. The company location does not have an independent life cycle, it depends on the company object's life (parent object)
How class can user interface?
The class that implements an interface must implement all the methods and properties of that interface
What is proper way to implemented interface?
Which keyword is used to refer base class constructor to subclass constructor?
Which of the following members of base class are accessible to derived class members?
When deriving from a protected base class, public and protected members of the base class become protected members of the derived class.
Which of the following modifier applies when a virtual method is redefined by a derived class?
An override method provides a new implementation of a member that is inherited from a base class
Which of the following modifiers can be used to prevent Method overriding?
When an instance method declaration includes the sealed modifier, the method is said to be a sealed method. It means a derived class cannot override this method.