Inheritance demo with Point class as an example