Here, we try to explain OCP using codebase. First we'll show a scenario that violate OCP and then we'll remove that violation.
Area Calculation (OCP violation Code) :
public class Rectangle{
public double Width {get; set;}
public double Height {get; set;}
}
public class Circle{
public do...