Object Oriented Programming

Dec 10, 2014 at 8:41pm
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!

1
2
3
4
5
6
 class myAccount
{
private:
	
public:
};
Dec 10, 2014 at 8:44pm
That's a very vague question and depends on a lot of factors. Are you sure there isn't more than that?
Dec 10, 2014 at 9:36pm
"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".
Dec 11, 2014 at 1:53am
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.
Dec 11, 2014 at 5:47am
Any help :(
Dec 11, 2014 at 6:36am
What further help do you require? MiiNiPaa answered the question fully.
Topic archived. No new replies allowed.