I'm trying to understand the SOLID principles behind OOP and came across with this doubt.
Following the previous class diagram, I am going to calculate the base_cost for a Vehicle. For such, I need to access the horsepower and the tax and then calculate everything with the base_cost() function.
From what I understood in this link I could guess that it DOES NOT violate Demeter's law since you are accessing methods from a class created locally (Vehicle). Am I right?

