title: instance variable in another class
body: <p>I'm working on homework and I won't post the full code but I'm stuck on something that's probably simple and I can't find it in my book so I need to be pointed in the right direction.
  I'm working with classes and interfaces.</p>
  
  <p>Basically in my main code I have a line like this </p>
  
  <pre><code>    CheckingAccount checking = new CheckingAccount(1.0);  // $1 monthly fee
  </code></pre>
  
  <p>I was told to create a class called CheckingAccount and in that class I am told "This class should include an instance variable for the monthly fee that's initialized to the value that's passed to the constructor.</p>
  
  <p>Since I'm new this is barely english to me and I'm assuming what that is saying is to take that 1.00 fee and declare it in the CheckingAccount class so I can create a method using that variable to calculate something.</p>
  
  <p>soooo... How do I do that? I know how to create an instance variable it would be something like </p>
  
  <pre><code>    public double  monthly fee =
  </code></pre>
  
  <p>but then what? or I could be wrong. I am really doing bad at this java stuff. Any help is appreciated. </p>
  
  <p>I guess another way to ask it is am I just declaring it as 1.0? or am I "importing" that value in case it changes later at some point you don't have to go through the code to change it in all of the classes?</p>