title: Getting access to an attribute of another class
body: <p>I have two classes:</p>
  
  <p>Inside class A, I have a method, which needs an attribute (trainingDuration) of class B:</p>
  
  <pre><code>Class A {
       public int caloryConsumption (int minutes) {
         return ((caloriesBurnedPerHour / 60) * trainingDuration);
       }
  }
  </code></pre>
  
  <p>In class B, the attribute is set as a private String and I created a constructor, a setter and a getter but how am I able to get access to this attribute inside class A? I tried nearly everything, but it is shown as an error all the time...
  Shouldn't it just be "B.getTrainingDuration"?</p>