Alright, have a project due, and would like to figure a little something extra.
I have to create a simple class that basically keeps track of billing for an electric company.
Say I have two variables of type billing declared in my driver file,
june, and july. Two of variables under each are curent_reading, and previous_reading. The default constructor sets each of those two values to 0.
Alright, lets say using function june.setCurrentReading(int value), I set june's current value. Now the question comes, for july, using the function july.setPreviousReading, I need it to equal june's current reading. How would you all go about doing this, I mean I know I could manually do it in the driver function (thats what we are expected to do at this point) but I would prefer to be able to do it in the class. Just say july.setPrevious Reading(); and have it automatically set.
Alright so does anyone understand waht im asking, or have I confused everyone?? Thanks.
ILC