Meal Maker Project - Why do we need setters and getters?

Hi all, sorry if my question looks weird :slight_smile:

I’m working on the Meal Maker Project, and I was just wondering - why do we need to use the setters and getters (as described in points 4,5, 6) in the first place? Even if I remove them and only do the rest parts of the tasks, the code seems to work in the same way, returning the result perfectly well.

Can someone explain to me, why and if we really need using getters and setters here, or was it included mostly for us to train our skills?

Thanks in advance!
Regards,
Tatiana

Train your skills. Get the exercise to pass by the examples and instructions given, then challenge yourself to get it to work with the getters and setters. It is a challenge, to be sure but not an insurmountable one. You just need to keep a close eye on context.

Hey mtf, first of all, thanks for all the time and attention you give these forums.

Secondly, could you please explain how the task wants me to use the setters?
I feel like I understand what getters and setter can do, but I’ve been staring at this code for some time and I don’t know how I get 2 values (name & price) into the setter method when ‘set’ only accepts one parameter.

Thank you.