OCA7
Enkita mody wrote:UseCodeTags (<---click)
Sean Heise wrote:
1d, 2b, 3d, these are for the constructors which I must have one in each class except the AccountArray class. I believe I've set them up correctly, but I'm not 100% sure. I know I should know this, but I guess I'm just not seeing how it ties into the rest of the program.
Campbell Ritchie wrote:Another problem about what Henry calls “colour by numbers” is that you don’t know when something would be better done otherwise. Because you are told to use protected fields, for example, you never learn how much better private fields would have been.
Sean Heise wrote:Here you see I've set up my array of ten account objects
So I've got my five Checking and five savings as per the assignment instructions. But now I'm supposed to work in the balance of 1000 - 10000, I'm not seeing where this is supposed to be input.
I really kind of wish we could get more practice. We're able to do the "you do it" portions of the text book, but being that this is simply a "copy it out of the book" type of practice it doesn't really help me.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
If you have a well‑designed class with toString, equals, hashCode, getXXX and maybe setXXX methods, then the fields can be as private and inaccessible as you like.Sean Heise wrote: . . . I understand that in inheritance you can't use private variables/methods in any class other than the class that it's called in.
That is exactly the same mistake I told you to check about earlier. Actually you can’t use a protected member of a class in its superclasses.And for protected variables/methods you can't use them outside of the super/subclasses...
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |