Theory to Practise Problems
Hi all,
I am trying to get my head arround the classes and inheritance.
I understand the thoery quite well I beleive but I am having trouble getting the structure of the code straight in my head.
I have a class named Person, and a class named User which inherits the Person class.
In my working example i wish to log the user in.
To do this I had planned on making the User constructor take the log in details, Username and Password.
My intension was the same for the Person to a point, the personID would be passed to the constructor.
My question is how do I run the two constructors to create a complete user with all the attributes of a person?
Or should I be looking at this all together differently?
PS.
I did not wish to have a set accessor to the PersonID or UserID. Which started my problems as I don't now how to set the PersonID varaible form the User class
======================================
They say, best men are molded out of faults,
And, for the most, become much more the better
For being a little bad.
======================================
__________________
======================================
"They say, best men are molded out of faults,
And, for the most, become much more the better
For being a little bad."
--Shakespeare
======================================
|