Home > Back-end >  In facing the object method calculating the area of the rectangle, this error, how to change
In facing the object method calculating the area of the rectangle, this error, how to change

Time:10-06

CodePudding user response:

Constructor is not to use, as the constructor by system calls, direct tuning parameters in the constructor

CodePudding user response:

Constructor calls to define it in place, can't write like you
JX JX1 (h, w);
Or
Add a method to JX SetHW (float h, float w); To set up the two attribute
After reading, by calling the JX1. SetHW (h, w); To set the
  • Related