Put the code you need help with I havent coded this yet so I dont have anything to show, I am trying to figure out how it would work first.
I am trying to work out how my functions will work in different classes that inherit from each other.
First I have a USER class which I think is called the parent class, which the other classes inherit from.
Next I have a GUEST class, and thisclass as i said inherits from the USER class, thisclass has a function called CREATEACCOUNT, and this CREATEACCOUNT function makes use of another function called ENCRYPT
The next class is called REG_USER, and thisclass also inherits from the USER class, thisclass has a function called LOGIN, and this LOGIN, function also makes use of the ENCRYPT function, the same one that CREATEACCOUNT uses
So im wondering how do I set this up. At first i was just going to code 2 encrypt functions in each of the classes, but that seems like it would be bad coding.
Do i put the encrypt function into the USER class and let it work through the inheritance?
Or is there another way I am unfamiliar with?
here.