Our teacher gave us an exercise the other day and asked to make two constructors, one non parameterized and the other parameterized. Then she asked to initialize an attribute in the parameterized constructor using the initialization from the non-parameterized constructor, basically to initialize it with the same value each time we create a new object.
I've tried making a new object in the same class using the non-parameterized constructor and then taking the initialized value from it but I feel like it is kind of unnecessary.
So is there a method or something to do it more easily?
A sample of the code: