Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Need a little help understanding objects

$
0
0
I'm trying to get the logic right behind classes, objects, methods, properties, and all that jazz.

Let's say we have a class called "Car", the car has properties, or attributes..color, weight, model,etc
This car has methods...stop, go, turn, etc...

I understand that, but what if I want a weight reduction on the car. This is something that would modify the properties of the car. What would this be considered?

Would this be a method of the "Mechanic" class that would just modify the properties of the instanced objects of the class Car?

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>