In the parameterised constructor itself we are passing the value of minprice as 99 thn what is the point of initializing msp with minprice instead of directly initializing msp with 99?I did not understand the working of this
About minprice and msp
@Senjuti256, let’s say you want to set minimum price as 100 then you have to change every instance of 99 to 100, but if you use minprice then you just need to change the value of minprice to 100 its not a big deal but is for making the code more meaningful
can we ignore the assignment of 99 to min price? I mean can it vary for different objects as per the value decided by the programmer?
yeah if you want to have different value for minprice for objects then you can add another parameter in the constructor and assign that value to the minprice