0
Why is Car.newtires not being stored correctly or called correctly.
https://code.sololearn.com/cvLRXSSI08MJ/?ref=app please note _tires is a protected variable and cannot be accessed from the main method
5 odpowiedzi
0
c9mpare this one to your approach. ReadLine at the start helps the compiler here on sololearn to ask things. also, you have juat messes a dew calls on a _tires and wrote it without _. the property TireAmount was missing a semicolon (why it is set to null when trying to assign it?) if something is unclear, feel free to ask, i can help you a little if possible!
0
Paul I would honestly love to do that but _tires is a private member of the class so I can't directly call it
0
Also null a the default value
0
then when assigning a balue to tires, change it to "newTores.TiresAmount = somevalue;" but change the property TiresAmonut so the "set" part looks like this:
_tires = value