Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
The passenger traveling at the fare being validated that is required to travel with another passenger.
In an interface class, all methods are abstract - there is no implementation.
In an abstract class some methods can be concrete. In an interface class, no accessibility modifiers are allowed.
An abstract class may have accessibility modifiers.
Yes. .NET does support multiple interfaces.
They all must be public, and are therefore public by default.
Interfaces, like classes, define a set of properties, methods, and events. But unlike classes, interfaces do not provide implementation. They are implemented by classes, and defined as separate entities from classes.
A class that cannot be instantiated. An abstract class is a class that must be inherited and have the methods overridden. An abstract class is essentially a blueprint for a class with or without implementation.
Yes. Just leave the class public and make the method sealed.
Yes. The keyword “sealed” will prevent the class from being inherited.
The data value may not be changed. Note: The variable value may be changed, but the original immutable data value was discarded and a new data value was created in memory.
System.String is immutable. System.StringBuilder was designed with the purpose of having a mutable string where a variety of operations can be performed.
It is available to classes that are within the same assembly and derived from the specified base class.