-
What is the correct option with regards to below snippet?
interface NewCustomer
{
}
class RegCustomer implements NewCustomer
{
}
class QuickCustomer implements NewCustomer
{
}
-
- QuickCustomer can be replaced with RegCustomer
- We can instantiate objects of NewCustomer
- NewCustomer can be replaced with RegCustomer
- RegCustomer can be replaced with QuickCustomer
- None of these
Correct Option: C
According to Liskov substitution principle we can replace NewCustomer with RegCustomer or QuickCustomer without affecting functionality.