Constrains in extended class

In reply to jjose:
Your question does not make a lot of sense, or there are a lot of typos in your example. There are no soft constraints, and the is no variable called num.

Also, if you intend to declare constraints outside the class body, you should use

   extern constraint c_num1;
   extern constraint c_num2;

But there should be no functional difference between constraints declare in our outside a class.