Point is a built-in type in Modelica.
Create a class Redeclaration, containing a Point P as a variable. You should set the values of x, y and z as well.
In the class below you should redeclare P as the type myPoint, which is a subtype of Point (you can write myPoint further below).
You can declare the class myPoint here, below.
The variable P must be declared replaceable in class Redeclaration.
myPoint is a subtype of Point, it changes type and prefix of P
If you instead had a class MyPoint with z as an Integer. Would that work?
No, because then MyPoint would not be a subclass of Point.