So I'm learning Object Oriented Programming and I need to declare a class called myAccount.
I have this code and it's very very simple but I now need to answer the question asked
"What information should be public, what should be private?"
We had a very basic introduction to OO programming yesterday and it is our last half lesson of the semester. I'm not too sure about object oriented and I could use some help.
Thanks!
"What information should be public, what should be private?"
Any non-static member variable should be private by default. In fact your question should be "is there any very compelling reasong to make variable protected/public".
Well this is the overall question she wants us to practice with until the next semester starts
"Suppose you are going to write an object-oriented program for maintaining your financial records. Declare a class called MyAccount to maintain your financial records. What information should be public, what should be private? What data should be stored inside the object representing your checking account? To what messages should that object be able to respond? What are other objects that might be used in the program? "
Confuses me, maybe I'm just dumb? The reason I ask for help is that the semester is over and I'm not sure how to contact her.